/* ============================================================
   home.css — the public home page (GitHub issue 449).

   One horizon for the whole page: night at the top (the promise and the
   app), the blue hour (three answers), violet (what the tool does), dawn
   (the offers), then day (trust, guides, questions) and one dark ending.
   Its own palette, not the app's light and dark themes: the page is the
   passage from one to the other. The pictures are always the dark ones.
   ============================================================ */

/* On top of site/public.css: the font, the colours, the header, the buttons and the footer every
   public page shares. */

.close-band :where(a, button):focus-visible { outline-color: var(--lav); }
/* "Ce que fait l'outil" starts right under the header, its held screen in place, nothing of the
   section before it showing. */
section[id] { scroll-margin-top: 16px; }
section.tour { scroll-margin-top: 0; }
h2 { font-size: 2.875rem; letter-spacing: -0.035em; line-height: 1.04; margin: 0 0 12px; text-align: center; }
.lead { font-size: 1.125rem; line-height: 1.5; max-width: 34em; margin: 0 auto 34px; text-align: center; }

.signup-soon { margin: 0; align-self: center; font-weight: 700; color: var(--lav); }
.signup-soon[hidden] { display: none; }

/* The horizon, one piece per section, each ending on the colour the next
   one starts with: the colours follow the content whatever the screen. */
html, body { overflow-x: clip; }
.horizon { background: var(--night); }
.answers { background: linear-gradient(180deg, var(--night) 0, #1b2a6b 45%, #3c3a8c 100%); }
.offers { background: linear-gradient(180deg, #6c58a6 0, #b47fa9 90px, #e3a4a3 170px, #f3d9cf 45%, var(--day) 100%); }

.promo-band { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 52px; background: var(--lav); color: var(--night); font-size: 0.9375rem; font-weight: 600; text-align: center; }
.promo-band-cta { font-weight: 800; color: var(--night); }
.promo-band-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--night); font-size: 1.25rem; cursor: pointer; }
.promo-band-close:hover { background: #0000001a; }

.notice { width: min(1120px, calc(100% - 32px)); margin: 8px auto 0; padding: 12px 16px; border-radius: 12px; background: var(--navy); border: 1px solid var(--rule-n); font-size: 0.875rem; }
.notice[hidden] { display: none; }

/* ---------- Night: the promise, the app rising once ---------- */
.hero { padding-top: 70px; text-align: center; }
h1 { font-size: 4.5rem; line-height: 1; letter-spacing: -0.04em; font-weight: 800; margin: 0 auto 20px; }
h1 span { display: block; } h1 .accent { color: var(--lav); }
.hero .lead { color: var(--muted-n); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.terms { font-size: 0.875rem; color: var(--muted-n); margin: 14px 0 0; }
/* The light behind the dashboard, as in the approved comp (the owner's choice, kept on purpose). */
.screen { margin: 52px auto 0; border-radius: 18px; overflow: hidden; border: 1px solid #ffffff22; box-shadow: 0 0 140px -20px #6d7cff77; }
.screen img { width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .screen { animation: rise 1s cubic-bezier(.2, .7, .2, 1) .15s both; }
}
@keyframes rise { from { transform: translateY(50px); opacity: 0; } }

/* ---------- The blue hour: three answers, three rows, the whole block on one screen ---------- */
.answers { padding: 100px 0 24px; }
.answers h2 { font-size: 2.5rem; }
.answers .lead { color: var(--soft-n); max-width: 46em; margin-bottom: 22px; }
.rows { border-bottom: 1px solid var(--rule-n); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto 380px; gap: 36px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule-n); }
.row h3 { margin: 0 0 4px; font-size: 1.25rem; letter-spacing: -0.015em; }
.row p { margin: 0; color: var(--soft-n); font-size: 0.9375rem; line-height: 1.5; max-width: 24em; }
.row .figure { margin: 0; max-width: none; white-space: nowrap; font-size: 4.25rem; letter-spacing: -0.045em; line-height: 1; font-weight: 800; color: var(--ink-n); font-variant-numeric: tabular-nums; }
.row .figure.up { color: var(--green-n); }
/* The screens of the app, shown at about the size they were captured: what they say can be read. */
.frames { position: relative; aspect-ratio: 380 / 192; border-radius: 14px; overflow: hidden; border: 1px solid #ffffff22; background: #16171d; box-shadow: 0 24px 40px -28px #000; }
.frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0 0; opacity: 0; transition: opacity .7s ease; }
.frames img.on { opacity: 1; }
/* The dots inside the frame, at its foot. */
.dots { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 2; display: flex; gap: 0; padding: 0 4px; border-radius: 999px; background: #07080d73; }
.dots button { position: relative; width: 16px; height: 14px; border: 0; padding: 0; background: none; cursor: pointer; }
.dots button::before { content: ''; position: absolute; inset: 6px 4px; border-radius: 2px; background: #ffffff4d; transition: background .3s; }
.dots button[aria-current]::before { background: var(--ink-n); }

/* A short screen (a laptop at 720 px): the three answers smaller, still on one screen with their title. */
@media (min-width: 901px) and (max-height: 820px) {
  .answers { padding-top: 80px; }
  .answers h2 { font-size: 2.125rem; }
  .answers .lead { margin-bottom: 16px; }
  .row { padding: 10px 0; }
  .row .figure { font-size: 3.5rem; }
  .row { grid-template-columns: minmax(0, 1fr) auto 324px; }
}

/* ---------- Violet: what the tool does ---------- */
.tour { position: relative; }
.tour-stage { background: linear-gradient(180deg, #3c3a8c 0, #6c58a6 100%); padding: 90px 0 90px; }
.tour h2 { font-size: 2.5rem; }
.tour .lead { color: #e7e4f6; margin-bottom: 26px; }
.tour-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 44px; align-items: start; }
.steps h3 { margin: 16px 0 4px; padding: 0 18px 6px; font-size: 0.875rem; font-weight: 700; color: #fff; border-bottom: 1px solid #ffffff26; }
.steps h3:first-child { margin-top: 0; }
.step { padding: 10px 18px; border-radius: 14px; border: 1px solid transparent; cursor: pointer; transition: background .3s, border-color .3s; }
.step.on { background: var(--navy); border-color: #ffffff26; box-shadow: 0 20px 50px -30px #000a; cursor: default; }
.step h4 { margin: 0; font-size: 1.125rem; letter-spacing: -0.01em; color: #fff; }
/* Only the step being read says more; the others keep their title. */
.step-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.step-more > p { min-height: 0; overflow: hidden; margin: 0; color: #c9cbe6; font-size: 0.9375rem; line-height: 1.5; }
.step.on .step-more { grid-template-rows: 1fr; }
.step.on .step-more > p { padding-top: 6px; }
.prem { display: inline-block; vertical-align: 2px; margin-left: 4px; font-size: 0.6875rem; font-weight: 700; letter-spacing: .01em; color: #fff; background: #10153a8c; border-radius: 999px; padding: 2px 8px; }
.step.on .prem { background: var(--lav); color: var(--night); }
.step-shot { display: none; }
/* The frame as tall as the picture shown; the others laid over it, faded out. */
.pin { position: relative; background: var(--panel-n); border: 1px solid #ffffff22; border-radius: 20px; padding: 10px; }
.pin img { width: 100%; height: auto; max-height: calc(100vh - 300px - var(--nav-h) - var(--promo-band-h, 0px)); max-height: calc(100svh - 300px - var(--nav-h) - var(--promo-band-h, 0px)); object-fit: contain; object-position: left top; display: block; border-radius: 12px; opacity: 0; transition: opacity .45s ease; }
.pin img:not(.on) { position: absolute; top: 10px; left: 10px; width: calc(100% - 20px); }
.pin img.on { position: relative; opacity: 1; }
/* A wide and tall enough screen: the section held in place, one screen, while the page
   scrolls through it (home.js moves the step being read with the scroll). */
@media (min-width: 901px) and (min-height: 620px) {
  /* svh: the screen without the browser's bars (Safari on an iPad), vh where it is not known. */
  .tour { height: calc(100vh - var(--nav-h) + 5 * 45vh); height: calc(100svh - var(--nav-h) + 5 * 45svh); }
  .tour-stage { position: sticky; top: calc(var(--promo-band-h, 0px) + var(--nav-h)); height: calc(100vh - var(--nav-h) - var(--promo-band-h, 0px)); height: calc(100svh - var(--nav-h) - var(--promo-band-h, 0px)); display: flex; align-items: center; padding: 0; overflow: hidden; }
  .tour-stage > .wrap { flex: none; }
}
/* Otherwise every step one under the other, each with its picture. */
@media (max-width: 900px), (max-height: 619px) {
  .tour-grid { grid-template-columns: 1fr; }
  .pin { display: none; }
  .step { padding: 16px 0; background: none !important; border: 0 !important; box-shadow: none !important; cursor: default; }
  .steps h3 { padding: 0 0 8px; margin-top: 24px; }
  .step-more { grid-template-rows: 1fr; }
  .step-more > p { padding-top: 6px; color: #eceaf8; }
  .step .prem { background: var(--lav); color: var(--night); }
  .step-shot { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: 12px; border: 1px solid #ffffff22; }
}

/* ---------- Dawn: the offers (GitHub issue 448) ---------- */
.offers { padding: 170px 0 60px; color: var(--ink); }
.offers .lead { color: var(--ink); }
.switch { display: flex; width: fit-content; margin: -10px auto 28px; background: #ffffff8c; border-radius: 999px; padding: 4px; }
.switch[hidden] { display: none; }
.switch button { border: 0; background: none; font: inherit; font-size: 0.875rem; font-weight: 700; color: var(--ink); padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.switch button[aria-pressed="true"] { background: var(--panel); box-shadow: 0 1px 4px #0002; }
.switch #yearSaving:not(:empty)::before { content: ' · '; }
/* The two cards aligned row by row: name, who it is for, price, button, trial, what it gives. */
.plans { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, auto); gap: 0 18px; max-width: 860px; margin: 0 auto; }
/* What both offers give, said once under the cards, quietly: the terms, not features. */
.both { list-style: none; padding: 0; margin: 24px auto 0; display: flex; gap: 6px 18px; justify-content: center; flex-wrap: wrap; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.both li::before { content: '✓'; color: var(--indigo); margin-right: 6px; }
.plan { grid-row: span 6; display: grid; grid-template-rows: subgrid; background: var(--panel); border-radius: 22px; padding: 30px; box-shadow: 0 30px 60px -40px #5a2d4a55; }
.plan.paid { background: var(--navy); color: var(--ink-n); }
.plan h3 { margin: 0; font-size: 1.3125rem; }
.who { font-size: 0.90625rem; margin: 4px 0 18px; color: var(--muted); }
.paid .who { color: var(--muted-n); }
.price { margin: 0; font-size: 1rem; font-weight: 600; }
.price b { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; }
.price s { font-size: 1.25rem; font-weight: 600; color: var(--muted-n); margin-right: 8px; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.paid .price small { color: var(--muted-n); }
.price-detail, .price-offer { margin: 4px 0 0; font-size: 0.875rem; font-weight: 600; }
.price-detail { color: var(--muted-n); }
.price-offer { color: var(--lav); }
.price-detail[hidden], .price-offer[hidden], .after[hidden] { display: none; }
.plan-cta { margin-top: 20px; }
.plan-cta .btn { width: 100%; }
.after { margin: 8px 0 0; text-align: center; font-size: 0.8125rem; color: var(--muted); min-height: 1em; }
.paid .after { color: var(--muted-n); }
.plan ul { margin: 20px 0 0; padding: 20px 0 0 18px; border-top: 1px solid var(--border); font-size: 0.9375rem; display: flex; flex-direction: column; gap: 8px; }
.paid ul { border-top-color: #ffffff1f; }
/* The details, unfolded under the cards. */
.compare { max-width: 860px; margin: 28px auto 0; }
.compare summary { list-style: none; cursor: pointer; width: fit-content; margin: 0 auto; padding: 10px 18px; border-radius: 999px; background: #ffffff8c; font-weight: 700; font-size: 0.9375rem; display: flex; align-items: center; gap: 8px; }
.compare summary::-webkit-details-marker { display: none; }
.compare summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.compare[open] summary::after { transform: translateY(1px) rotate(225deg); }
.compare-scroll { margin-top: 16px; overflow-x: auto; background: var(--panel); border-radius: 18px; box-shadow: 0 20px 40px -32px #5a2d4a55; }
.compare table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.compare th, .compare td { padding: 12px 18px; text-align: left; border-top: 1px solid var(--border); }
.compare thead th, .compare thead td { border-top: 0; font-size: 0.875rem; }
.compare thead th { width: 7.5em; text-align: center; }
.compare tbody th { font-weight: 500; }
.compare td { text-align: center; font-weight: 600; white-space: nowrap; }
.mark { display: inline-block; width: 18px; height: 18px; border-radius: 50%; position: relative; vertical-align: middle; }
.mark.yes { background: var(--indigo); }
.mark.yes::after { content: ''; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mark.no::after { content: ''; position: absolute; left: 4px; right: 4px; top: 8px; height: 2px; border-radius: 2px; background: #b9b3aa; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Day ---------- */
.day { color: var(--ink); background: var(--day); }
.day .lead { color: var(--muted); }
.daylight { padding-top: 120px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.three h3 { font-size: 1.1875rem; margin: 0 0 6px; }
.three p { margin: 0; color: var(--muted); font-size: 0.96875rem; line-height: 1.55; }
.guides { padding-top: 110px; }
.gcards { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.g { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 22px 22px 20px; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s; }
.g:hover { border-color: #c9c3ba; transform: translateY(-2px); }
.g h3 { margin: 0 0 6px; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.25; }
.g p { margin: 0 0 18px; color: var(--muted); font-size: 0.90625rem; line-height: 1.5; }
.g span { margin-top: auto; font-weight: 700; font-size: 0.875rem; color: var(--indigo); }
.g.first { grid-row: span 2; background: var(--navy); border-color: transparent; color: var(--ink-n); padding: 30px; }
.g.first h3 { font-size: 1.625rem; letter-spacing: -0.02em; }
.g.first p { color: var(--soft-n); font-size: 1rem; }
.g.first span { color: var(--lav); }
.faq { padding: 110px 0 20px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 1.03125rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }
.faq a { color: var(--indigo); font-weight: 600; }

/* The one dark ending: the last call, then the footer. */
.close-band { margin-top: 110px; background: var(--night); color: var(--ink-n); padding: 64px max(64px, calc((100% - 1120px) / 2)); display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: center; }
.close-band h2 { font-size: 2.875rem; margin: 0; text-align: left; max-width: 14em; }
.close-band > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
@media (prefers-reduced-motion: reduce) {
  .frames img, .pin img, .step, .step-more, .g, .btn { transition: none; }
  .g:hover { transform: none; }
}

/* Touch: every control at least 44px high. */
@media (pointer: coarse) {
  .dots button { width: 44px; height: 44px; } .dots button::before { inset: 19px 12px; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .row { grid-template-columns: minmax(0, 1fr) 340px; }
  .row .figure { grid-column: 1; grid-row: 2; font-size: 3.5rem; }
  .row .show { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 700px) {
  .hero { padding-top: 36px; }
  /* Three sentences, one per line, never broken (GitHub issue 312): the size follows the width. */
  h1 { font-size: min(2.625rem, 9.2vw); } h1 span { white-space: nowrap; } h2 { font-size: 2rem; }
  .cta { flex-direction: column; align-items: center; }
  .screen { margin-top: 30px; }
  .answers { padding-top: 80px; } .answers h2, .tour h2 { font-size: 2rem; }
  .row { grid-template-columns: 1fr; gap: 12px; padding: 26px 0; }
  .row .figure { grid-row: auto; order: -1; font-size: 3.5rem; }
  .row .show { grid-column: auto; grid-row: auto; }
  .tour-stage { padding: 80px 0 70px; }
  .offers { padding-top: 130px; }
  .three, .gcards { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; } .plan { grid-row: auto; display: flex; flex-direction: column; }
  .compare th, .compare td { padding: 10px 12px; } .compare thead th { width: 5.5em; }
  .g.first { grid-row: auto; padding: 22px; } .g.first h3 { font-size: 1.3125rem; }
  .daylight { padding-top: 90px; } .guides, .faq { padding-top: 70px; }
  .close-band { grid-template-columns: 1fr; padding: 40px 16px; gap: 18px; margin-top: 70px; }
  .close-band h2 { font-size: 1.875rem; }
}
