/* ============================================================
   Dr. Majtényi — design tokens + baseline
   DNA from the practice's existing website: brick red #9d2b24
   (the double <hr> rules), amber #da8f45 (table frames + the
   slogan graphic), calm white/warm-grey surfaces. Modernized:
   Fraunces display + Source Sans 3 body, soft 12px radius,
   generous air. All rules scope under #wrapwrap.o-mj; element
   resets use :where() to keep bare-element specificity (we
   still beat Bootstrap because these links load after the
   bundle).
   ============================================================ */

:root {
  /* palette — from the old site's rules + slogan graphic */
  --mj-ink: #262019;         /* body text */
  --mj-dark: #2e1613;        /* footer / dark band — the red, deepened */
  --mj-dark-2: #3c211d;      /* raised panels on dark */
  --mj-dark-3: #4f2d27;      /* hairlines on dark */
  --mj-paper: #faf8f4;       /* page background — warm white */
  --mj-sand: #f4eee5;        /* alternating sections */
  --mj-card: #ffffff;        /* card surface */
  --mj-red: #9d2b24;         /* the site's brick red (<hr> rules) */
  --mj-red-deep: #7e211c;    /* hover */
  --mj-red-wash: #f7ebe9;    /* tinted chips / icon plates */
  --mj-amber: #da8f45;       /* the table-frame / slogan amber */
  --mj-amber-deep: #b56f2c;
  --mj-line: rgba(38, 32, 25, 0.14);
  --mj-muted: #6e675e;       /* secondary text on light */
  --mj-cream: #f7f0e8;       /* text on dark */
  --mj-cream-dim: #cdb9ae;   /* secondary text on dark */
  --mj-amber-ondark: #e2a668;

  /* type */
  --mj-font-display: 'Fraunces', Georgia, serif;
  --mj-font-body: 'Source Sans 3', 'Segoe UI', 'Helvetica Neue', sans-serif;

  /* layout — soft radius: the practice should feel calm, not clinical */
  --mj-wrap: 1160px;
  --mj-radius: 12px;
  --mj-radius-sm: 8px;
  --mj-header-h: 92px;
  --mj-shadow: 0 10px 30px rgba(46, 22, 19, 0.08);
  --mj-shadow-lg: 0 24px 56px rgba(46, 22, 19, 0.13);
}

/* ---------- baseline ---------- */

/* The closed off-canvas drawer sits at translateX(102%) — without this the
   page gains ~340px of sideways scroll on phones (theme CSS loads on the
   frontend only, so this never touches the backend). */
body { overflow-x: clip; }

#wrapwrap.o-mj {
  background: var(--mj-paper);
  color: var(--mj-ink);
  font-family: var(--mj-font-body);
  font-size: 17.5px;
  font-weight: 400;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

:where(#wrapwrap.o-mj) img {
  max-width: 100%;
  height: auto;
}

:where(#wrapwrap.o-mj) h1,
:where(#wrapwrap.o-mj) h2,
:where(#wrapwrap.o-mj) h3,
:where(#wrapwrap.o-mj) h4 {
  font-family: var(--mj-font-display);
  font-weight: 570;
  line-height: 1.16;
  color: inherit;
  margin: 0;
}

:where(#wrapwrap.o-mj) p {
  margin: 0 0 1em;
}

:where(#wrapwrap.o-mj) a {
  color: var(--mj-red);
  text-decoration: none;
}
:where(#wrapwrap.o-mj) a:hover {
  color: var(--mj-red-deep);
  /* Bootstrap re-underlines links on :hover (higher specificity than the
     bare-element reset above) — kill it here too, or the nav's current-page
     border-bottom shows a second line and the brand text underlines. */
  text-decoration: none;
}

:where(#wrapwrap.o-mj) ul,
:where(#wrapwrap.o-mj) ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:where(#wrapwrap.o-mj) address {
  font-style: normal;
}

.o-mj .wrap {
  max-width: var(--mj-wrap);
  margin-inline: auto;
  padding-inline: 22px;
}
.o-mj .wrap--narrow {
  max-width: 880px;
}

.o-mj .screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.o-mj .skip-link:focus {
  position: fixed; top: 10px; left: 10px; z-index: 10000;
  width: auto; height: auto; clip: auto;
  background: var(--mj-dark); color: #fff;
  padding: 10px 16px; border-radius: var(--mj-radius-sm);
}

/* ---------- shared type helpers ---------- */

.o-mj .kicker {
  font-family: var(--mj-font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mj-red);
  margin: 0 0 0.55rem;
}
.o-mj .kicker--ondark { color: var(--mj-amber-ondark); }

.o-mj .section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  letter-spacing: 0.005em;
  margin-bottom: 0.4em;
}
.o-mj .section-title--ondark { color: var(--mj-cream); }

.o-mj .section-lead {
  max-width: 660px;
  color: var(--mj-muted);
  font-size: 1.07rem;
}
.o-mj .section-head { margin-bottom: 2.4rem; }
.o-mj .section-head .section-lead { margin-inline: 0; }
.o-mj .section-head--center,
.o-mj .section-head--center .section-lead { text-align: center; margin-inline: auto; }

.o-mj .section { padding: 4.8rem 0; }
.o-mj .section--sand { background: var(--mj-sand); }

.o-mj .prose { max-width: 68ch; }
.o-mj .prose h2 {
  font-size: 1.35rem;
  margin: 1.6em 0 0.5em;
}
.o-mj .demo-note {
  border: 1px dashed var(--mj-red);
  border-radius: var(--mj-radius-sm);
  background: var(--mj-red-wash);
  color: var(--mj-red-deep);
  font-size: 0.92rem;
  padding: 10px 14px;
}

/* ---------- the double rule (old site's two <hr>s, reborn) ---------- */

.o-mj .rule-duo {
  display: block;
  width: 84px;
  height: 9px;
  margin: 0.9rem 0 0;
  background:
    linear-gradient(var(--mj-red), var(--mj-red)) 0 0 / 84px 3px no-repeat,
    linear-gradient(var(--mj-amber), var(--mj-amber)) 0 7px / 46px 2px no-repeat;
  border: 0;
}
.o-mj .rule-duo--center { margin-inline: auto; background-position: 0 0, 19px 7px; }
.o-mj .rule-duo--ondark {
  background:
    linear-gradient(var(--mj-amber-ondark), var(--mj-amber-ondark)) 0 0 / 84px 3px no-repeat,
    linear-gradient(var(--mj-cream-dim), var(--mj-cream-dim)) 0 7px / 46px 2px no-repeat;
}

/* ---------- buttons ---------- */

.o-mj .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--mj-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.78em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.o-mj .btn--lg { padding: 0.95em 2em; font-size: 1.02rem; }

.o-mj .btn--primary {
  background: var(--mj-red);
  color: #fff;
  box-shadow: 0 6px 18px rgba(157, 43, 36, 0.25);
}
.o-mj .btn--primary:hover {
  background: var(--mj-red-deep);
  color: #fff;
}

.o-mj .btn--ghost {
  border-color: var(--mj-ink);
  color: var(--mj-ink);
  background: transparent;
}
.o-mj .btn--ghost:hover {
  background: var(--mj-ink);
  color: var(--mj-paper);
}

.o-mj .btn--ghost-light {
  border-color: var(--mj-cream);
  color: var(--mj-cream);
  background: transparent;
}
.o-mj .btn--ghost-light:hover {
  background: var(--mj-cream);
  color: var(--mj-dark);
}

/* ---------- brand SVGs (inline via t-call) ---------- */

.o-mj .mj-pulse {
  display: block;
  width: min(220px, 60%);
  height: 24px;
}
.o-mj .mj-pulse path {
  stroke: var(--mj-red);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.o-mj .mj-pulse--center,
.o-mj .section-head--center .mj-pulse { margin-inline: auto; }
.o-mj .mj-pulse--ondark path { stroke: var(--mj-amber-ondark); }

.o-mj .motto {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.o-mj .motto em {
  font-family: var(--mj-font-display);
  font-style: italic;
  font-weight: 480;
  font-size: 1.12rem;
  color: var(--mj-amber-deep);
  letter-spacing: 0.02em;
  padding: 0 0.6em;
}
.o-mj .motto__arc {
  width: 180px;
  height: 16px;
}
.o-mj .motto__arc path {
  stroke: var(--mj-amber);
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* service icons — line art, ink + red/amber accents */
.o-mj .ico {
  display: block;
  width: 46px;
  height: 46px;
  color: var(--mj-ink);
}
.o-mj .ico path, .o-mj .ico rect, .o-mj .ico circle {
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.o-mj .ico .ico-a { stroke: var(--mj-amber); }
.o-mj .ico .ico-r { stroke: var(--mj-red); }

/* ---------- reveal on scroll ---------- */

.o-mj [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.o-mj [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
/* QA switch (?noanim=1) — render instantly, no transitions */
#wrapwrap.o-mj.qa-noanim [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .o-mj [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
