/* ============================================================================
   MasseterClass — landing page
   Direction: "Grid Spine" — Swiss minimal / typographic.
   One typeface (Switzer variable, self-hosted, 42 KB, one request).
   Zero JavaScript. Every colour is a token in the :root block below.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   FONT
   Switzer by Indian Type Foundry (Fontshare) — free for commercial use.
   One variable file covers every weight the page uses (400 / 500 / 600).
---------------------------------------------------------------------------- */
@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/switzer-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback so text does not jump when Switzer arrives. */
@font-face {
  font-family: "Switzer Fallback";
  src: local("Helvetica Neue"), local("Arial"), local("Segoe UI");
  size-adjust: 101%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ============================================================================
   TOKENS
   ↓↓↓ THIS IS THE ONLY BLOCK YOU NEED TO TOUCH TO RE-COLOUR THE SITE ↓↓↓
   ============================================================================ */
:root {
  /* ── PAPER & INK — warm near-monochrome ─────────────────────────────────── */
  --bg:             #F4F3F0;  /* page background, warm paper */
  --surface:        #FFFFFF;  /* cover-image frame fill */
  --text:           #12120F;  /* headlines, strong body */
  --text-muted:     #5E5D57;  /* sublines, descriptions, footer micro */
  --border:         #D7D5CE;  /* hairline dividers            (decorative) */
  --border-strong:  #ADAAA1;  /* cover frame, spec rule       (decorative) */
  --pressed-surface:#D9D8D2;  /* secondary button :active fill — dimmed hover fill */

  /* ── THE ONE SATURATED ACCENT ───────────────────────────────────────────── */
  /* Sampled from the annotation ink in your own guide illustrations.
     Reserved for the two $29 buy buttons. Nothing else on the page is this
     colour — that is what makes the money buttons the only saturated object. */
  --accent:         #48507C;
  --accent-hover:   #3B4269;
  --accent-pressed: #2F3454;
  --accent-ink:     #FFFFFF;  /* label on accent fill */

  /* ── ANNOTATION MARKS — the signature detail ────────────────────────────── */
  /* Hairline + terminal dot, borrowed from the measurement traces in the
     guide art. Low-saturation on purpose so it never competes with the CTAs. */
  --mark:           color-mix(in srgb, var(--accent) 55%, transparent);

  /* ── INVERTED BAND — the free-PDF section ───────────────────────────────── */
  --band-bg:        var(--text);
  --band-text:      var(--bg);
  --band-muted:     #A9A79F;

  /* ── FOCUS — re-declared per context further down ───────────────────────── */
  --focus:          #48507C;
  --focus-inverse:  #F4F3F0;

  /* ── MOTION ─────────────────────────────────────────────────────────────── */
  --t-fast: 140ms;
  --t-base: 220ms;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  /* ── GEOMETRY ───────────────────────────────────────────────────────────── */
  --radius: 0;                 /* square corners are a hard rule here */
  --hair: 1px;
  --shell-max: 1200px;
  --shell-pad: 20px;
  --tracking-display: -0.045em;

  /* 8px baseline — every vertical value is a multiple of this */
  --s1: 8px;   --s2: 16px;  --s3: 24px;  --s4: 32px;
  --s5: 40px;  --s6: 56px;  --s7: 72px;  --s8: 96px;
}

@media (min-width: 720px) {
  :root { --shell-pad: 40px; }
}

/* ── DARK MODE ───────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:             #0F0F0D;
    --surface:        #171714;
    --text:           #F2F1EC;
    --text-muted:     #9B998F;
    --border:         #2F2F2A;
    --border-strong:  #4A4A43;
    --pressed-surface:#2A2A26;

    --accent:         #9AA3E0;
    --accent-hover:   #AEB6E9;
    --accent-pressed: #7F88CC;
    --accent-ink:     #131530;

    --band-bg:        #F2F1EC;
    --band-text:      #0F0F0D;
    --band-muted:     #5E5D57;

    --focus:          #9AA3E0;
    --focus-inverse:  #0F0F0D;
  }
}

:root[data-theme="dark"] {
  --bg: #0F0F0D; --surface: #171714; --text: #F2F1EC; --text-muted: #9B998F;
  --border: #2F2F2A; --border-strong: #4A4A43; --pressed-surface: #2A2A26;
  --accent: #9AA3E0; --accent-hover: #AEB6E9; --accent-pressed: #7F88CC;
  --accent-ink: #131530;
  --band-bg: #F2F1EC; --band-text: #0F0F0D; --band-muted: #5E5D57;
  --focus: #9AA3E0; --focus-inverse: #0F0F0D;
}

/* ----------------------------------------------------------------------------
   ALTERNATIVE PALETTES — swap by replacing the four --accent* values above.
   Contrast ratios verified against --bg #F4F3F0 and --accent-ink #FFFFFF.

   Vermilion   --accent:#C0341A  --accent-hover:#A72C15  --accent-pressed:#8F2511
               5.05:1 on paper · 5.60:1 white-on-accent
   Ink black   --accent:#12120F  --accent-hover:#2A2A26  --accent-pressed:#000000
               16.91:1 on paper · 16.91:1 white-on-accent
   Clay        --accent:#8A4B2A  --accent-hover:#743E22  --accent-pressed:#5E321B
               6.05:1 on paper · 6.71:1 white-on-accent
---------------------------------------------------------------------------- */


@supports not (color: color-mix(in srgb, red, blue)) {
  :root { --mark: #7C83AB; }                        /* flat 55% accent on paper */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --mark: #5B6190; }
  }
  :root[data-theme="dark"] { --mark: #5B6190; }
}

/* ============================================================================
   RESET
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Switzer", "Switzer Fallback", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.006em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; }


/* ============================================================================
   UTILITIES
   ============================================================================ */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--shell-pad);
  top: 5px;              /* so the focus ring's top edge is not clipped off-canvas */
  z-index: 50;
  transform: translateY(-120%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ── Focus cascade ───────────────────────────────────────────────────────────
   The ring must contrast with whatever sits BEHIND it, so it is re-declared
   per context. An accent ring on an accent-filled button would disappear. */
.btn--primary { --focus: var(--text); }
.band         { --focus: var(--focus-inverse); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}


/* ============================================================================
   TYPOGRAPHY PRIMITIVES
   ============================================================================ */

/* Section label — "02  THE GUIDES", preceded by an annotation mark.
   The mark (dot + hairline) is the page's signature detail: it is the same
   device used to annotate the illustrations inside the guides. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  line-height: 1.7143;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.eyebrow::before {
  content: "";
  flex: none;
  inline-size: 34px;
  block-size: 6px;
  background:
    radial-gradient(circle at 3px 50%, var(--mark) 0 3px, transparent 3.5px)
      left center / 34px 6px no-repeat,
    linear-gradient(to right, transparent 0 6px, var(--mark) 6px)
      left center / 34px var(--hair) no-repeat;
}

.eyebrow__i { color: var(--text); }

.section-head { margin-block-end: var(--s6); }

.section-head__title {
  margin-block-start: var(--s2);
  font-size: clamp(1.75rem, 5.6vw, 2.75rem);
  line-height: 1.1429;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}


/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
  --btn-h: 56px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: var(--btn-h);
  padding-inline: 28px;
  border: var(--hair) solid transparent;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease),
    transform var(--t-fast) var(--ease);
}

.btn__ext,
.btn__arrow {
  font-size: 1em;
  line-height: 1;
  transition: transform var(--t-base) var(--ease);
}

/* Primary — the only saturated element on the page. */
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary:hover  { background: var(--accent-hover);   border-color: var(--accent-hover); }
.btn--primary:active { background: var(--accent-pressed); border-color: var(--accent-pressed); transform: translateY(1px); }
.btn--primary:hover .btn__ext { transform: translate(2px, -2px); }

/* Secondary — lives inside the inverted band. Border is --band-text, never a
   decorative token, so the control boundary always clears 3:1. */
.btn--secondary {
  background: transparent;
  color: var(--band-text);
  border-color: var(--band-text);
}
.btn--secondary:hover  { background: var(--band-text); color: var(--band-bg); }
.btn--secondary:active { background: var(--pressed-surface); color: var(--band-bg); transform: translateY(1px); }
.btn--secondary:hover .btn__ext { transform: translate(2px, -2px); }

/* Quiet — the hero CTA. Underscored rule rather than a filled box, so the
   first saturated thing a visitor meets is still a $29 button. */
.btn--quiet {
  padding-inline: 0;
  background: none;
  color: var(--text);
  border: 0;
  border-block-end: 2px solid var(--text);
  min-block-size: 44px;
  align-items: flex-end;
  padding-block-end: 10px;
}
.btn--quiet:hover { color: var(--accent); border-block-end-color: var(--accent); }
.btn--quiet:hover .btn__arrow { transform: translateY(3px); }


/* ============================================================================
   HEADER
   ============================================================================ */
.site-header {
  padding-block: var(--s3);
  border-block-end: var(--hair) solid var(--border);
}

.logo__word {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* ============================================================================
   2. HERO
   Deliberately NOT full-viewport: the top of the Guides section must be
   reachable in one short scroll on a phone.
   ============================================================================ */
.hero {
  padding-block: clamp(var(--s6), 13vw, 128px) clamp(var(--s6), 11vw, 104px);
  border-block-end: var(--hair) solid var(--border);
}

.hero__headline {
  margin-block-start: var(--s3);
  font-size: clamp(2.75rem, 11.4vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: var(--tracking-display);
  font-weight: 600;
  text-wrap: balance;
  max-width: 16ch;
}

.hero__subline {
  margin-block-start: var(--s3);
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1.2vw + 0.85rem, 1.1875rem);
  line-height: 1.5;
  letter-spacing: -0.011em;
  color: var(--text-muted);
}

.hero__cta { margin-block-start: var(--s5); }


/* ============================================================================
   3. GUIDES
   ============================================================================ */
.guides {
  padding-block: clamp(var(--s6), 10vw, var(--s8));
  scroll-margin-block-start: var(--s2);
}

.guide-grid {
  display: grid;
  gap: var(--s5);
}

.guide-card__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "media"
    "head"
    "desc"
    "foot";
  grid-template-rows: auto auto auto 1fr;  /* slack goes to the foot row, so the auto
                                              margin below pins both buttons in line */
  row-gap: var(--s3);
  height: 100%;
}

.guide-card__media { grid-area: media; }
.guide-card__head  { grid-area: head; }
.guide-card__desc  { grid-area: desc; }
.guide-card__foot  { grid-area: foot; }

.guide-card__media img {
  width: 100%;
  aspect-ratio: 16 / 9;  /* matches the supplied cover artwork */
  object-fit: cover;
  background: var(--surface);
  border: var(--hair) solid var(--border-strong);
  transition: transform var(--t-base) var(--ease);
}

.guide-card__title {
  font-size: clamp(1.5rem, 5.2vw, 2rem);
  line-height: 1.1429;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.guide-card__topic {
  margin-block-start: 6px;
  font-size: 0.875rem;
  line-height: 1.7143;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.guide-card__desc {
  max-width: 38ch;
  color: var(--text-muted);
}

.guide-card__foot { margin-block-start: var(--s1); }

/* Spec row — the price reads as a specification, not a price tag. It stays in
   --text so the accent belongs to the action rather than the number. */
.spec {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s1) var(--s2);
  padding-block: var(--s2);
  border-block: var(--hair) solid var(--border);
  margin-block-end: var(--s3);
}

.spec__price {
  font-size: 1.375rem;
  line-height: 1.0909;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.spec__meta {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.btn--stretch {
  display: flex;
  width: 100%;
  position: static;   /* .btn is position:relative; the overlay below must resolve
                         against the card, not against the button itself */
}

/* Whole card is tappable; the accessible name stays the button's. */
.btn--stretch::after {
  content: "";
  position: absolute;
  inset: 0;
}
.guide-card__inner { position: relative; }

.guide-card__inner:hover .guide-card__media img { transform: translateY(-3px); }
.guide-card__inner:hover .btn--primary:not(:active) { background: var(--accent-hover); border-color: var(--accent-hover); }
.guide-card__inner:hover .btn--primary .btn__ext { transform: translate(2px, -2px); }

/* ── DESKTOP: two columns, cover restored to full card width ─────────────── */
@media (min-width: 800px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s7);
  }

  /* Pins both buy buttons to the same line regardless of description length. */
  .guide-card__foot { margin-block-start: auto; }
}


/* ============================================================================
   4. FREE PDF — inverted band
   ============================================================================ */
.band {
  background: var(--band-bg);
  color: var(--band-text);
}

.free { padding-block: clamp(var(--s6), 10vw, var(--s8)); }

.free .eyebrow { color: var(--band-muted); }
.free .eyebrow__i { color: var(--band-text); }
.free .eyebrow::before {
  background:
    radial-gradient(circle at 3px 50%, var(--band-muted) 0 3px, transparent 3.5px)
      left center / 34px 6px no-repeat,
    linear-gradient(to right, transparent 0 6px, var(--band-muted) 6px)
      left center / 34px var(--hair) no-repeat;
}

.free__inner { max-width: 46ch; }

.free__title {
  margin-block-start: var(--s2);
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}

.free__desc {
  margin-block-start: var(--s3);
  color: var(--band-muted);
  max-width: 40ch;
}

.free__cta { margin-block-start: var(--s5); }

.free__note {
  margin-block-start: var(--s2);
  font-size: 0.875rem;
  color: var(--band-muted);
}


/* ============================================================================
   5. FOOTER
   ============================================================================ */
.site-footer {
  padding-block: var(--s6);
  text-align: center;
}

.social {
  display: flex;
  justify-content: center;
  gap: var(--s2);
  margin-block-end: var(--s4);
}

.social__link {
  display: grid;
  place-items: center;
  inline-size: 48px;       /* comfortably past the 44px tap-target minimum */
  block-size: 48px;
  color: var(--text-muted);
  border: var(--hair) solid var(--border);
  transition: color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}
.social__link:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.site-footer__disclaimer,
.site-footer__copy {
  font-size: 0.875rem;
  line-height: 1.7143;
  color: var(--text-muted);
}

.site-footer__copy {
  margin-block-start: var(--s1);
  font-variant-numeric: tabular-nums;
}


/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-timeline: none !important;   /* kills scroll-driven animations,
                                              which survive a duration nuke */
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Colour affordances stay; only movement is removed. */
  .btn:active,
  .guide-card__inner:hover .guide-card__media img { transform: none !important; }
}


/* ============================================================================
   PRINT
   ============================================================================ */
@media print {
  .skip-link, .social { display: none; }
  body { background: #fff; color: #000; }
  .band { background: #fff; color: #000; }
  a[href^="http"]:not(.btn)::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
