/* Second Shift landing pages. Palette from the app: dusk-blue ink, chart
   paper, ceil-blue scrubs, the amber call light and monitor green. */

@font-face { font-family: "Figtree"; src: url("fonts/Figtree_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/Figtree_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --ink: #1F2547;          /* dusk blue: hero, offer, text */
  --on-ink: #EEF1F6;
  --on-ink-soft: #B7BDD3;
  --paper: #EEF2F5;        /* chart paper */
  --card: #FFFFFF;
  --text: #1F2547;
  --text-soft: #596079;
  --rule: #D5DCE5;
  --scrubs: #46679A;       /* links, focus */
  --amber: #E79A2B;        /* call light: one accent on dark */
  --amber-text: #A9661A;   /* amber that passes contrast on light */
  --monitor: #7FD6A8;      /* the trace */
  --wash: #E2E9F3;
  --max: 1080px;
  --gutter: clamp(16px, 5vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #262F5E;
    --paper: #12162B;
    --card: #1B2140;
    --text: #EEF1F6;
    --text-soft: #A4ABC2;
    --rule: #2C3456;
    --scrubs: #9DB6DD;
    --amber: #F2B35A;
    --amber-text: #F2B35A;
    --wash: #27305A;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.6 "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--scrubs); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, .store:focus-visible, .button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem); }
p { margin: 0 0 1rem; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--gutter)); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--text); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header and hero share the dusk surface */
.top { background: var(--ink); color: var(--on-ink); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand img { border-radius: 8px; }
.top-note { margin: 0; font-size: 0.9rem; color: var(--on-ink-soft); }
@media (max-width: 560px) { .top-note { display: none; } }

.hero { background: var(--ink); color: var(--on-ink); position: relative; padding: clamp(24px, 5vw, 56px) 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: end; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.25fr 0.75fr; gap: 56px; } }
.hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem); max-width: 18ch; }
.sub { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); color: var(--on-ink-soft); max-width: 46ch; margin: 1.1rem 0 1.5rem; }
.hero-text { padding-bottom: clamp(24px, 4vw, 64px); }

.facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 8px; color: var(--on-ink); }
.facts li { display: flex; gap: 10px; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--monitor); transform: translateY(-1px); }

/* Phone frames: the screenshots are cropped screens, the frame is CSS */
.phone { margin: 0; justify-self: center; width: min(280px, 72vw); border: 8px solid #0E1230; border-radius: 40px; overflow: hidden; background: #0E1230; box-shadow: 0 24px 60px -24px rgba(8, 10, 30, 0.55); }
.phone img { border-radius: 32px; }
.phone-hero { width: min(300px, 70vw); margin-bottom: -96px; position: relative; z-index: 1; }
@media (min-width: 860px) { .phone-hero { width: 320px; margin-bottom: -140px; } }

/* The monitor trace: the page's one moving part, drawn once on load */
.trace { position: absolute; left: 0; right: 0; bottom: 18px; width: 100%; height: 60px; pointer-events: none; }
.trace path { fill: none; stroke: var(--monitor); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s 0.3s ease-out forwards; opacity: 0.9; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .trace path { animation: none; stroke-dashoffset: 0; } }

/* Store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--amber); color: #1F2547; }
.store:hover { filter: brightness(1.06); }
.store-soon { background: transparent; color: inherit; border: 1.5px dashed currentColor; font-weight: 600; opacity: 0.85; }
.button { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 700; text-decoration: none; }

/* Sound familiar */
.familiar { padding: clamp(130px, 14vw, 190px) 0 clamp(32px, 5vw, 56px); }
.familiar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.familiar li { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.4; padding-left: 18px; border-left: 3px solid var(--amber-text); }
.familiar-end { margin-top: 1.75rem; color: var(--text-soft); }

/* The 10 reasons */
.reasons { padding: clamp(8px, 3vw, 32px) 0 clamp(48px, 7vw, 96px); }
.reason-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(40px, 6vw, 80px); }
.reason { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
.reason-text { max-width: 58ch; }
.reason h3 { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: baseline; margin-bottom: 0.8rem; }
.reason p { color: var(--text-soft); }
.num { font-size: clamp(2.4rem, 2rem + 2vw, 3.6rem); font-weight: 800; color: var(--amber-text); line-height: 0.9; min-width: 1.5ch; font-variant-numeric: tabular-nums; }
.reason .phone { width: min(240px, 64vw); }
.reason .flo { margin: 0; justify-self: center; width: min(200px, 50vw); }
.reason-cta { margin-top: 1rem; }
@media (min-width: 860px) {
  .reason.has-media { grid-template-columns: 1fr 280px; gap: 64px; }
  .reason.has-media:nth-child(even) .reason-text { order: 2; }
  .reason.has-media:nth-child(even) { grid-template-columns: 280px 1fr; }
}
.reason p a { color: var(--scrubs); }

.mid-cta { background: var(--wash); border-radius: 20px; padding: 24px clamp(20px, 4vw, 36px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.mid-cta p { margin: 0; max-width: 40ch; }
.mid-cta .store-soon { color: var(--text); }

/* First week */
.week { background: var(--card); padding: clamp(48px, 7vw, 88px) 0; border-block: 1px solid var(--rule); }
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .days { grid-template-columns: repeat(4, 1fr); gap: 28px; } }
.days li { display: grid; gap: 6px; padding-top: 14px; border-top: 3px solid var(--ink); }
.days b { font-size: 1.15rem; }
.days span { color: var(--text-soft); }

/* Comparison */
.compare { padding: clamp(48px, 7vw, 88px) 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
@media (max-width: 560px) { table { font-size: 0.88rem; } th, td { padding: 12px 8px; } }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 700; font-size: 0.95rem; color: var(--text-soft); }
tbody th { font-weight: 600; width: 36%; }
.us { background: var(--ink); color: var(--on-ink); font-weight: 600; }
thead .us { color: var(--on-ink); border-radius: 12px 12px 0 0; }
tbody tr:last-child .us { border-radius: 0 0 12px 12px; }
.note { font-size: 0.85rem; color: var(--text-soft); margin-top: 12px; }

/* Offer */
.offer { background: var(--ink); color: var(--on-ink); padding: clamp(56px, 8vw, 104px) 0; }
.offer-lede { color: var(--on-ink-soft); max-width: 52ch; font-size: 1.1rem; }
.plans { display: grid; gap: 16px; margin: 32px 0; }
@media (min-width: 860px) { .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.plan { border: 1px solid rgba(238, 241, 246, 0.18); border-radius: 20px; padding: 24px; }
.plan h3 { font-size: 1.2rem; font-weight: 700; }
.price { font-size: 2.6rem; font-weight: 800; margin: 6px 0 12px; letter-spacing: -0.02em; }
.plan ul { margin: 0; padding-left: 1.1rem; color: var(--on-ink-soft); display: grid; gap: 6px; }
.plan-main { border: 2px solid var(--amber); background: rgba(231, 154, 43, 0.08); }
.plan-why { color: var(--amber); font-weight: 600; }
.fine-print { margin-top: 20px; font-size: 0.9rem; color: var(--on-ink-soft); }
.offer a:not(.store) { color: var(--on-ink); }

/* FAQ */
.faq { padding: clamp(48px, 7vw, 88px) 0; }
details { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 700; font-size: 1.1rem; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; font-weight: 400; color: var(--text-soft); }
details[open] summary::after { content: "–"; }
details p { color: var(--text-soft); padding-bottom: 8px; }

/* Sticky bar: only rendered once store links exist */
.sticky { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); background: var(--ink); color: var(--on-ink); box-shadow: 0 -8px 24px -12px rgba(8, 10, 30, 0.5); }
.sticky p { margin: 0; font-weight: 600; font-size: 0.95rem; }
.sticky .store { min-height: 42px; padding: 0 14px; font-size: 0.9rem; }
@media (min-width: 860px) { .sticky { display: none; } }

/* Footer */
.foot { padding: 40px 0 56px; font-size: 0.85rem; color: var(--text-soft); border-top: 1px solid var(--rule); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.foot nav a { color: var(--text-soft); }
.disclaim { font-size: 0.78rem; max-width: 90ch; line-height: 1.5; }

/* Related guides at the bottom of each persona page */
.related { padding: 0 0 clamp(48px, 7vw, 88px); }
.related h2 { font-size: 1.25rem; }
.guide-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.guide-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; }
.guide-list a:hover { border-color: var(--scrubs); }

/* Guides index (/SecondShift/r/) */
.hub-hero { padding-bottom: clamp(32px, 5vw, 56px); }
.hub { padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 88px); }
.hub-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.hub-list li { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 20px 24px; }
.hub-list a { display: grid; gap: 4px; text-decoration: none; color: var(--text); }
.hub-label { font-size: 0.85rem; font-weight: 700; color: var(--amber-text); text-transform: uppercase; letter-spacing: 0.04em; }
.hub-title { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.hub-list a:hover .hub-title { color: var(--scrubs); }
.hub-list p { margin: 8px 0 0; color: var(--text-soft); }

/* "Get an email when it launches" link under the coming-soon buttons */
.soon-link { flex-basis: 100%; color: inherit; font-weight: 600; font-size: 0.95rem; }
.mid-cta .soon-link { color: var(--scrubs); }

/* Launch-list signup form (a light card, so it works on dark and light) */
.signup { background: var(--card); color: var(--text); border-radius: 20px; padding: clamp(18px, 3vw, 24px); margin-top: 1.5rem; max-width: 560px; box-shadow: 0 18px 40px -24px rgba(8, 10, 30, 0.55); }
.signup-fields { display: grid; gap: 14px; }
.signup-field { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.signup-field em { font-style: normal; font-weight: 400; color: var(--text-soft); }
.signup-row { display: grid; gap: 14px; }
@media (min-width: 560px) { .signup-row { grid-template-columns: 1fr 1fr; } }
.signup input, .signup select { font: inherit; font-weight: 400; color: var(--text); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; min-height: 48px; padding: 0 14px; width: 100%; }
.signup input:focus, .signup select:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--scrubs); }
.signup-button { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 700; background: var(--amber); color: #1F2547; }
.signup-button:disabled { opacity: 0.6; cursor: progress; }
.signup-fine { margin: 0; font-size: 0.82rem; color: var(--text-soft); }
.signup-fine a, .signup-thanks a { color: var(--scrubs); }
.signup-thanks p { margin: 0 0 8px; }
.signup-status { margin: 10px 0 0; font-size: 0.92rem; color: var(--amber-text); min-height: 1em; }
.signup-status:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup-hero { padding-bottom: clamp(32px, 5vw, 56px); }
.plan-teaser, .signup-again { padding: clamp(48px, 7vw, 88px) 0 0; }
.signup-again { padding-bottom: clamp(48px, 7vw, 88px); }
.signup-again .signup { margin-top: 0.5rem; }

/* Long-form guide (the 45-day retake plan) */
.article { padding: clamp(40px, 6vw, 72px) 0; }
.article h2 { margin-top: 2.6rem; }
.article h3 { margin-top: 1.6rem; font-size: 1.15rem; }
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 1.25rem; display: grid; gap: 6px; }
.article .answer { font-size: 1.15rem; background: var(--card); border-left: 4px solid var(--monitor); padding: 16px 20px; border-radius: 0 12px 12px 0; }
.article .updated { font-size: 0.9rem; color: var(--text-soft); }
.article table { margin-top: 12px; }
.article .callout { background: var(--wash); border-radius: 16px; padding: 18px 20px; }
.article .sources li { font-size: 0.9rem; color: var(--text-soft); }
.article .signup { margin-top: 1rem; }
