/* rafter.css — VERSION 5 — if this line is not in the file on your server, the upload did not land */
/* ===========================================================================
   Rafter Leads — site stylesheet
   One file for every page. Never hard-code a colour, font or size a token
   already carries; change it here and the whole site follows.

   Scheme A: light body, the logo's green as the single accent, and the
   dashboard's Nocturne ground (#161826) for the dark bands, so the site and
   the app read as one product.
   =========================================================================== */

:root {
  /* Light ground — faintly green paper, not grey */
  --bg:          #F1F4F1;
  --surface:     #FFFFFF;
  --surface-2:   #F7FAF7;
  --inset:       #EAEFEA;

  /* Ink — the near-black from the logo's arrows */
  --text:        #0B120E;
  --muted:       #4F5A53;
  --faint:       #7E8A83;

  /* The logo's hexagon green. One accent, nothing else. */
  --accent:      #0E8F42;
  --accent-hi:   #0A6F33;
  --accent-dim:  rgba(14, 143, 66, 0.10);
  --accent-line: rgba(14, 143, 66, 0.32);
  --accent-glow: rgba(14, 143, 66, 0.22);

  --line:        rgba(11, 18, 14, 0.10);
  --line-firm:   rgba(11, 18, 14, 0.18);

  /* Dark bands — the dashboard's Nocturne ground */
  --dark:        #161826;
  --dark-2:      #1B1D2D;
  --dark-3:      #212335;
  --dark-text:   #E9E9ED;
  --dark-muted:  #A2A3B2;
  --dark-faint:  #6E7082;
  --dark-line:   rgba(233, 233, 237, 0.11);
  --dark-accent: #2CD46E;

  --warn:        #8A6218;
  --danger:      #B23A2C;

  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  --wrap: 1140px;
  --fade: 48px;

  --shadow: 0 1px 2px rgba(11,18,14,.05), 0 1px 1px rgba(11,18,14,.03);
  --shadow-lift: 0 12px 32px -14px rgba(11,18,14,.18);
  --grad-page: radial-gradient(1100px 520px at 12% -8%, rgba(14,143,66,.07), transparent 60%);
  --grad-surface: linear-gradient(180deg, #FFFFFF 0%, #FCFDFC 100%);
  --highlight: inset 0 1px 0 rgba(255,255,255,.9);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--text);
  background: var(--grad-page), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.008em;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.14; letter-spacing: -.028em; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 19px; letter-spacing: -.02em; }
h4 { font-size: 15px; letter-spacing: -.012em; }

p { color: var(--muted); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--accent-dim); color: var(--text); }

/* --- layout ------------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-tight { max-width: 820px; margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }
.sec-sm { padding: 56px 0; }

/* Left aligned and asymmetric. Content hugs the left, air sits on the right. */
.lede { max-width: 760px; }
.lede.mid { margin-left: auto; margin-right: auto; text-align: center; }
.lede.mid .mark { margin-left: auto; margin-right: auto; }
.lede p { font-size: 18px; margin-top: 14px; }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  display: block;
}
.on-dark .eyebrow { color: var(--dark-accent); }

/* The Nocturne signature: rules fade out at both ends over 48px. */
.rule {
  height: 1px; border: 0; width: 100%;
  background: linear-gradient(to right, transparent 0,
    var(--line) var(--fade), var(--line) calc(100% - var(--fade)), transparent 100%);
}
.on-dark .rule {
  background: linear-gradient(to right, transparent 0,
    var(--dark-line) var(--fade), var(--dark-line) calc(100% - var(--fade)), transparent 100%);
}
/* Short accent marks stay solid. */
.mark { height: 2px; width: 34px; background: var(--accent); border: 0; display: block; }
.on-dark .mark { background: var(--dark-accent); }

/* --- dark bands --------------------------------------------------------- */
.band {
  background: var(--dark);
  color: var(--dark-text);
  position: relative;
  overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 460px at 8% -12%, rgba(44,212,110,.10), transparent 62%);
}
.band > * { position: relative; }
.band h1, .band h2, .band h3, .band h4 { color: var(--dark-text); }
.band p { color: var(--dark-muted); }
.band a { color: var(--dark-accent); }

/* --- cards -------------------------------------------------------------- */
.card {
  background: var(--grad-surface), var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow), var(--highlight);
  padding: 26px;
  position: relative;
}
.card-hover { transition: transform .32s cubic-bezier(.2,.7,.3,1), box-shadow .32s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift), var(--highlight); }
.on-dark .card {
  background: var(--dark-2); box-shadow: none;
  border: 1px solid var(--dark-line);
}

.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--accent); color: #fff; cursor: pointer;
  transition: background .2s ease, transform .12s ease, box-shadow .2s ease;
  letter-spacing: -.01em;
}
.btn:hover { background: var(--accent-hi); color: #fff; box-shadow: 0 8px 22px -10px var(--accent-glow); }
.btn:active { transform: translateY(1px); }

.btn-line {
  background: transparent; color: var(--accent); border-color: var(--accent-line);
}
.btn-line:hover { background: var(--accent-dim); color: var(--accent-hi); box-shadow: none; }
.on-dark .btn-line, .band .btn-line {
  color: var(--dark-accent); border-color: rgba(44,212,110,.38);
}
.on-dark .btn-line:hover, .band .btn-line:hover { background: rgba(44,212,110,.12); color: var(--dark-accent); }

.btn-sm { padding: 9px 18px; font-size: 14px; }

/* --- chips -------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-sm);
  background: var(--inset); color: var(--muted);
}
.chip-accent { background: var(--accent-dim); color: var(--accent-hi); }
.on-dark .chip { background: var(--dark-3); color: var(--dark-muted); }
.on-dark .chip-accent { background: rgba(44,212,110,.12); color: var(--dark-accent); }

/* --- stat figures ------------------------------------------------------- */
.stat-n {
  font-weight: 700; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
  font-size: clamp(30px, 4.4vw, 46px);
}
.stat-l {
  font-size: 12px; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--faint); margin-top: 12px;
}
.on-dark .stat-l, .band .stat-l { color: var(--dark-faint); }
.band .stat-n { color: var(--dark-text); }

/* --- nav ---------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(241,244,241,.86);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  transition: box-shadow .25s ease, background .25s ease;
}
.nav.stuck { box-shadow: 0 1px 0 var(--line), 0 8px 24px -20px rgba(11,18,14,.4); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 22px; }
.nav-logo img { height: 54px; width: auto; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 600; position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .26s cubic-bezier(.2,.7,.3,1);
}
.nav-links a:hover::after { width: 28px; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .login { color: var(--muted); font-size: 15px; font-weight: 600; }
.nav-cta .login:hover { color: var(--text); }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--text); }

/* --- footer ------------------------------------------------------------- */
.foot { background: var(--dark); color: var(--dark-muted); padding: 68px 0 34px; font-size: 15px; }
.foot h4 { color: var(--dark-text); font-size: 15px; margin-bottom: 14px; }
.foot a { display: block; color: var(--dark-muted); padding: 5px 0; font-weight: 500; }
.foot a:hover { color: var(--dark-text); }
.foot-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.foot-logo img { height: 52px; width: auto; margin-bottom: 16px; }
.foot p { color: var(--dark-faint); max-width: 340px; font-size: 14.5px; }
.foot-legal { padding-top: 26px; font-size: 13.5px; color: var(--dark-faint); }
.foot-legal a { display: inline; color: var(--dark-muted); }

/* --- prose (articles, legal) -------------------------------------------- */
.prose { max-width: 760px; margin-left: auto; margin-right: auto; }
.prose h2 { font-size: 27px; margin: 44px 0 14px; }
.prose h3 { font-size: 19px; margin: 30px 0 10px; }
.prose p { margin-bottom: 18px; font-size: 17px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 9px; color: var(--muted); }
.prose strong { color: var(--text); font-weight: 700; }

.callout {
  background: var(--surface); border-radius: var(--r-lg);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 26px 28px; margin: 36px 0; box-shadow: var(--shadow);
}
.callout h3 { margin: 0 0 8px; }
.callout p { margin-bottom: 16px; }

/* --- animation ---------------------------------------------------------- */
/* Everything with .reveal starts down and faded, then rises as it enters the
   viewport. Staggering is set per element with --d. */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

.reveal-l { opacity: 0; transform: translateX(-24px); }
.reveal-l.in { opacity: 1; transform: none; }
.reveal-l { transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); transition-delay: var(--d, 0ms); }

/* An accent rule that draws itself in from the left as it arrives. */
.draw { width: 0; transition: width .8s cubic-bezier(.2,.7,.3,1); transition-delay: var(--d, 0ms); }
.draw.in { width: 34px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-l { opacity: 1; transform: none; transition: none; }
  .draw { width: 34px; transition: none; }
  .card-hover:hover { transform: none; }
}

/* --- responsive --------------------------------------------------------- */
@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  section { padding: 60px 0; }
  .nav-in { height: 68px; }
  .nav-logo img { height: 40px; }
  .burger { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); flex-direction: column; align-items: flex-start;
    padding: 20px 24px; gap: 16px; box-shadow: 0 12px 28px -18px rgba(11,18,14,.5);
    border-top: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-cta .login { display: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .card { padding: 22px; }
}

/* --- anchor offset ------------------------------------------------------
   The nav is sticky, so a raw #anchor jump parks the section heading under
   it and cuts off the coloured band above. scroll-margin lands the section's
   own top edge just below the bar instead. */
section[id], [id].anchor { scroll-margin-top: 96px; }
@media (max-width: 860px) { section[id], [id].anchor { scroll-margin-top: 76px; } }

/* --- fit questionnaire -------------------------------------------------- */
.quiz { max-width: 620px; }
.quiz-step { display: none; }
.quiz-step.on { display: block; animation: quizIn .45s cubic-bezier(.2,.7,.3,1) both; }
@keyframes quizIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.quiz-bar { height: 2px; max-width: 420px; background: var(--dark-line); border-radius: 2px; overflow: hidden; margin-bottom: 32px; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--dark-accent);
              transition: width .5s cubic-bezier(.2,.7,.3,1); }

.quiz-q { font-size: clamp(21px, 2.6vw, 27px); font-weight: 700; letter-spacing: -.026em; line-height: 1.2; }
.quiz-hint { font-size: 15px; margin-top: 10px; }

.opt {
  display: block; width: 100%; max-width: 380px; text-align: left; cursor: pointer;
  background: transparent; color: var(--dark-text);
  border: 1px solid var(--dark-line); border-radius: var(--r);
  padding: 15px 18px; font-family: var(--font); font-size: 15.5px; font-weight: 500;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.opt + .opt { margin-top: 10px; }
.opt:hover { border-color: rgba(44,212,110,.4); background: rgba(44,212,110,.06); }
.opt.sel { border-color: var(--dark-accent); background: rgba(44,212,110,.12); }
.opt:active { transform: translateY(1px); }

.quiz input[type=text], .quiz input[type=email], .quiz input[type=number] {
  width: 100%; max-width: 420px; font-family: var(--font); font-size: 16px; font-weight: 500;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--dark-2); border: 1px solid var(--dark-line); color: var(--dark-text);
  transition: border-color .18s ease;
}
.quiz input::placeholder { color: var(--dark-faint); }
.quiz input:focus { outline: none; border-color: var(--dark-accent); }

.quiz-nav { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.quiz-back { background: none; border: 0; color: var(--dark-faint); font-family: var(--font);
             font-size: 15px; font-weight: 600; cursor: pointer; padding: 6px 2px; }
.quiz-back:hover { color: var(--dark-text); }

.verdict-n { font-size: clamp(38px, 6vw, 60px); font-weight: 800; letter-spacing: -.045em;
             line-height: 1; color: var(--dark-accent); font-variant-numeric: tabular-nums; }

/* --- contact form ------------------------------------------------------- */
.field { margin-bottom: 22px; display: block; }
.field label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .11em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 10px;
}
.field input, .field textarea, .field select {
  display: block; width: 100%; font-family: var(--font); font-size: 16.5px;
  font-weight: 500; line-height: 1.4;
  padding: 16px 18px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field select { appearance: none; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 26px, calc(100% - 16px) 26px;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-firm); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; background: var(--surface);
  border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-dim);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.hp { position: absolute; left: -9999px; }

.note-ok, .note-bad { border-radius: var(--r); padding: 14px 16px; font-size: 15px; margin-bottom: 18px; }
.note-ok { background: var(--accent-dim); color: var(--accent-hi); }
.note-bad { background: rgba(178,58,44,.09); color: var(--danger); }

/* --- article cards ------------------------------------------------------ */
.art { display: flex; flex-direction: column; height: 100%; }
.art-top { height: 6px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--accent); opacity: .9; }
.art h3 { font-size: 18px; margin-bottom: 10px; }
.art p { font-size: 15px; flex: 1; }
.art .more { font-size: 14.5px; font-weight: 700; color: var(--accent); margin-top: 16px; display: inline-block; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr !important; gap: 36px !important; }
}
@media (max-width: 560px) {
  .two-up { grid-template-columns: 1fr !important; }
}


/* --- magazine layout ---------------------------------------------------- */
.lead-art {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0; overflow: hidden; align-items: stretch;
}
.lead-art .lead-body { padding: 44px 46px; display: flex; flex-direction: column; justify-content: center; }
.lead-art .lead-side {
  background: var(--dark); position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 34px;
}
.lead-art .lead-side::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(520px 320px at 78% 12%, rgba(44,212,110,.16), transparent 66%);
}
.lead-art .lead-no {
  position: relative; font-size: 100px; font-weight: 800; letter-spacing: -.05em;
  line-height: .8; color: rgba(233,233,237,.09);
}
.lead-art h2 { font-size: clamp(25px, 2.9vw, 34px); margin: 14px 0 14px; }
.lead-art p { font-size: 17px; }
@media (max-width: 860px) {
  .lead-art { grid-template-columns: 1fr; }
  .lead-art .lead-side { display: none; }
  .lead-art .lead-body { padding: 30px 26px; }
}

/* A magazine row: hairline separated, number on the left, no card chrome. */
.row-art {
  display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 24px;
  align-items: baseline; padding: 24px 0;
  border-bottom: 1px solid var(--line); transition: background .2s ease;
}
.row-art:hover { background: var(--surface-2); }
.row-art:hover h3 { color: var(--accent); }
.row-art .rn { font-size: 14px; font-weight: 700; color: var(--faint);
               font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.row-art h3 { font-size: 19px; transition: color .2s ease; }
.row-art p { font-size: 15px; margin-top: 6px; max-width: 62ch; }
.row-art .meta { font-size: 13px; color: var(--faint); font-weight: 600; white-space: nowrap; }
@media (max-width: 720px) {
  .row-art { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .row-art .rn, .row-art .meta { font-size: 12px; }
}

.topic-head { display: flex; align-items: baseline; justify-content: space-between;
              gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.topic-head h2 { font-size: 27px; }

/* --- hero headline ------------------------------------------------------
   The second line is the problem, so it arrives on its own beat, a fraction
   late and underlined, rather than reading as one continuous sentence. */
.hit {
  display: block; position: relative; width: max-content; max-width: 100%;
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--d, 400ms);
}
.reveal.in .hit { opacity: 1; transform: none; }
.hit::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 4px; width: 0;
  background: var(--accent); border-radius: 2px;
  transition: width .7s cubic-bezier(.2,.7,.3,1);
  transition-delay: calc(var(--d, 400ms) + 380ms);
}
.reveal.in .hit::after { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .hit { opacity: 1; transform: none; transition: none; }
  .hit::after { width: 100%; transition: none; }
}
.hero-strip .stat-l { margin-top: 8px; }


/* --- dashboard glimpse --------------------------------------------------- */
.glimpse { border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 24px 60px -30px rgba(11,18,14,.45); }
.glimpse svg { display: block; width: 100%; height: auto; }
