/* Landing page for signed-out visitors (public/landing.js). Brand tokens only; calm, one main action (Google sign-in).
   Layout (16/11/2026): centred promise, the real home screen in a large window, the numbers, three steps to start,
   alternating rows of real screens, then a few more features, the exam-week story and answers. */
.auth-page #main:has(.landing){display:block;padding:0}
/* The app's main column is capped for its own pages; the landing spans the whole window. */
.auth-page #main > .landing{width:100%;max-width:none;margin:0}
.landing{--ld-max:1120px;--ld-gutter:clamp(16px,4vw,40px);color:var(--ink)}
.landing > *{width:100%;max-width:calc(var(--ld-max) + 2 * var(--ld-gutter));margin-inline:auto;padding-inline:var(--ld-gutter)}

/* Top bar: logo, EN | IT and a small sign-in button. It stays at the top while the page scrolls under it, so sign-in
   is always one tap away; full width, with its content on the page's column. */
.landing > .ld-bar{position:sticky;top:0;z-index:20;max-width:none;padding-inline:max(var(--ld-gutter),calc((100% - var(--ld-max)) / 2));background:var(--material-bar);-webkit-backdrop-filter:var(--material-blur);backdrop-filter:var(--material-blur);border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent)}
.ld-bar{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4);padding-block:var(--sp-3)}
.ld-brand{display:inline-flex;align-items:center;gap:10px;min-height:44px;color:var(--ink);text-decoration:none;font-weight:700;font-size:var(--fs-title3);letter-spacing:-.02em}
.ld-brand .brand-mark img{display:block;border-radius:var(--r-sm)}
.ld-bar-actions{display:flex;align-items:center;gap:var(--sp-3)}
.ld-signin-small{display:inline-flex;align-items:center;min-height:44px;padding:0 var(--sp-4);border-radius:var(--r-pill);background:var(--forest);color:#fff;font-weight:600;font-size:var(--fs-ui);text-decoration:none;transition:transform var(--dur-press) var(--ease-out)}
.ld-signin-small:active{transform:scale(var(--press-scale))}

/* Hero (16/11/2026): something visual on arrival. Wide screens: a short promise on the left, the real home screen on
   the right, both in the first view. Phones: the promise, the sign-in, then the screen right under it. */
.landing > .ld-hero{max-width:calc(1280px + 2 * var(--ld-gutter))}
.ld-hero{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);align-items:center;gap:clamp(32px,4vw,64px);padding-block:clamp(32px,5vw,72px) clamp(40px,6vw,88px)}
.ld-hero-copy{display:flex;flex-direction:column;align-items:flex-start}
.ld-eyebrow{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2);max-width:100%;margin:0 0 var(--sp-5);color:var(--muted);font-size:var(--fs-ui);font-weight:600;text-wrap:balance}
.ld-hero h1{max-width:10em;margin:0;font-size:clamp(2.5rem,5vw,4.25rem);line-height:1;letter-spacing:-.04em;font-weight:700;text-wrap:balance}
.ld-lead{max-width:30em;margin:var(--sp-5) 0 0;color:var(--muted);font-size:clamp(1rem,1.3vw,1.125rem);line-height:1.55;text-wrap:pretty}
.ld-cta{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-3) var(--sp-6);margin-top:var(--sp-8)}
/* The screen runs a little past the column on the right, so it reads as the larger, first thing. */
.ld-hero-visual{margin-right:calc(-1 * clamp(0px,4vw,64px))}
.ld-cta .google-signin,.ld-end .google-signin{display:inline-flex;align-items:center}
.ld-watch{display:inline-flex;align-items:center;gap:var(--sp-2);min-height:44px;color:var(--ink);font-weight:600;font-size:var(--fs-ui);text-decoration:none}
.ld-watch .icon{width:18px;height:18px}
.ld-trust{margin:var(--sp-5) 0 0;color:var(--muted);font-size:var(--fs-footnote)}
.ld-message:empty{display:none}
.ld-message{margin:var(--sp-4) 0 0;color:var(--ink);font-size:var(--fs-ui)}

/* The real home screen in a window, like a product shot (the film left the landing on 16/11). */
.ld-window{margin:0;padding:6px;border-radius:calc(var(--r-lg) + 6px);background:var(--surface);box-shadow:var(--shadow-3)}
.ld-window-bar{display:flex;align-items:center;gap:6px;height:30px;padding:0 var(--sp-3)}
.ld-window-bar i{width:10px;height:10px;border-radius:50%;background:var(--line)}
.ld-window-bar span{flex:1;margin-right:42px;color:var(--muted);font-size:var(--fs-caption);text-align:center}
.ld-window img{display:block;width:100%;height:auto;border-radius:var(--r-lg);background:var(--soft)}

/* The numbers sit right under the window: proof before the details. */
.ld-proof{padding-block:clamp(32px,5vw,56px)}

/* Three steps to start, the same ones as the onboarding. One row on wide screens, a list on phones. */
.ld-steps ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-6) clamp(20px,3vw,40px);margin:0;padding:0;list-style:none}
.ld-step{display:flex;gap:var(--sp-4);align-items:flex-start}
.ld-step-n{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:var(--r-pill);background:var(--lime);color:#25332c;font-weight:700;font-size:var(--fs-ui);font-variant-numeric:tabular-nums}
@supports (text-box:trim-both cap alphabetic){.ld-step-n{text-box:trim-both cap alphabetic}}
.ld-step h3{margin-top:6px!important}
.ld-step p{margin-top:var(--sp-1)!important;color:var(--muted);line-height:1.5}
.ld-step .ld-step-logos{display:flex;flex-wrap:wrap;align-items:center;gap:var(--sp-2);margin-top:var(--sp-3)!important;color:var(--ink);font-size:var(--fs-footnote);font-weight:600}
.ld-step-logos img{width:24px;height:24px;object-fit:contain;border-radius:6px}
.ld-step-logos img + img,.ld-step-logos img:not(:first-child){margin-left:var(--sp-3)}

/* Sections: one heading and generous space; whitespace separates them, no rules or boxes unless the content is a unit. */
.ld-section{padding-block:clamp(40px,7vw,88px)}
.ld-section > h2,.ld-end h2{margin:0 0 var(--sp-10);font-size:clamp(1.75rem,3.6vw,2.75rem);line-height:1.1;letter-spacing:-.03em;font-weight:700;text-align:center;text-wrap:balance}
.ld-section h3{margin:0;font-size:var(--fs-body);font-weight:700;letter-spacing:-.01em}
.ld-section p{margin:0}

/* "How it helps": text and a real screen, alternating sides. */
.ld-rows{display:flex;flex-direction:column;gap:clamp(48px,8vw,104px)}
.ld-row{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:clamp(24px,5vw,72px)}
.ld-row:nth-child(even){grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)}
.ld-row:nth-child(even) .ld-row-copy{order:2}
.ld-row h3{font-size:clamp(1.375rem,2.4vw,1.875rem);line-height:1.15;letter-spacing:-.025em;text-wrap:balance}
.ld-row-copy > p:last-child{margin-top:var(--sp-4);color:var(--muted);font-size:clamp(1rem,1.3vw,1.0625rem);line-height:1.6}
.ld-kicker{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:var(--sp-3)!important;color:var(--muted);font-size:var(--fs-ui);font-weight:600}
.ld-kicker-n{display:grid;place-items:center;width:26px;height:26px;border-radius:var(--r-pill);background:var(--lime);color:#25332c;font-size:var(--fs-caption);font-weight:700;font-variant-numeric:tabular-nums}
.ld-shot{margin:0;padding:6px;border-radius:calc(var(--r-md) + 6px);background:var(--soft)}
.ld-shot img{display:block;width:100%;height:auto;border-radius:var(--r-md);box-shadow:var(--shadow-1)}

.ld-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-8) clamp(20px,3vw,40px);margin:0;padding:0;list-style:none}
.ld-feature{display:flex;gap:var(--sp-3);align-items:flex-start}
.ld-feature .icon{flex:none;width:22px;height:22px;margin-top:1px;color:var(--forest)}
.ld-feature p{margin-top:var(--sp-1);color:var(--muted);line-height:1.5}

/* The exam-week story: a forest block, the only dark surface of the page. */
.landing > .ld-case{width:calc(100% - 2 * var(--ld-gutter));max-width:var(--ld-max)}
.ld-case{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:clamp(24px,4vw,56px);align-items:center;margin-block:clamp(24px,5vw,56px);padding:clamp(24px,4vw,48px);border-radius:var(--r-lg);background:#234735;color:#f7f8f5}
.ld-case h2{margin:0 0 var(--sp-4);font-size:clamp(1.5rem,3vw,2.25rem);line-height:1.15;letter-spacing:-.025em;color:#fff}
.ld-case p{margin:0;color:#d6e2d9;line-height:1.55}
.ld-case-eyebrow{margin-bottom:var(--sp-2)!important;color:#d9f578!important;font-size:var(--fs-ui);font-weight:600}
.ld-case .ld-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-4)}
.ld-case .ld-figure strong{color:#d9f578}
.ld-case .ld-figure span{color:#d6e2d9}

.ld-figure{display:flex;flex-direction:column;gap:var(--sp-1)}
.ld-figure strong{font-size:clamp(1.75rem,3.4vw,2.5rem);line-height:1;font-weight:700;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.ld-figure span{color:var(--muted);font-size:var(--fs-footnote);line-height:1.4}
.ld-numbers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-6);text-align:center}
.ld-numbers .ld-figure{align-items:center}

/* Short answers: native disclosure, one line each until opened. */
.ld-faq-list{max-width:760px;margin:0 auto;border-top:1px solid var(--line)}
.ld-faq-item{border-bottom:1px solid var(--line)}
.ld-faq-item summary{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4);min-height:56px;padding:var(--sp-3) 0;font-weight:600;font-size:var(--fs-body);cursor:pointer;list-style:none}
.ld-faq-item summary::-webkit-details-marker{display:none}
.ld-faq-item summary::after{content:'';flex:none;width:9px;height:9px;margin-right:4px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translateY(-2px);transition:transform var(--dur-hover) var(--ease-out)}
.ld-faq-item[open] summary::after{transform:rotate(225deg) translateY(-2px)}
.ld-faq-item p{padding:0 var(--sp-8) var(--sp-5) 0;color:var(--muted);line-height:1.6}
.ld-faq-more{margin-top:var(--sp-6)!important;text-align:center;font-size:var(--fs-ui)}
.ld-faq-more a{display:inline-flex;align-items:center;min-height:44px;color:var(--ink);font-weight:600}

.ld-end{padding-block:clamp(56px,9vw,112px);text-align:center}
.ld-end h2{margin-bottom:var(--sp-3)}
.ld-end p{margin:0 0 var(--sp-6);color:var(--muted)}
.ld-end .google-signin{margin-inline:auto}

.ld-footer{padding-block:var(--sp-6) var(--sp-10);text-align:center}
.ld-footer .account-footnote{max-width:40em;margin:0 auto var(--sp-3)}

@media (hover:hover) and (pointer:fine){
  .ld-watch:hover{color:var(--forest)}
  .ld-signin-small:hover{background:#2c5a43}
  .ld-faq-item summary:hover{color:var(--forest)}
}
@media (prefers-reduced-motion:reduce){.ld-faq-item summary::after{transition:none}}

/* Dark mode: the forest token turns light, so the button, the icons and the story keep fixed brand colours. */
[data-bs-theme=dark] .ld-signin-small{background:#d9f578;color:#25332c}
[data-bs-theme=dark] .ld-feature .icon{color:#d9f578}
[data-bs-theme=dark] .ld-case{background:#1f3a2c}
[data-bs-theme=dark] .ld-window{box-shadow:0 0 0 1px var(--line)}
@media (hover:hover) and (pointer:fine){[data-bs-theme=dark] .ld-signin-small:hover{background:#e4f99a}}

@media (max-width:900px){
  .ld-hero{grid-template-columns:1fr;text-align:center}
  .ld-hero-copy{align-items:center}
  .ld-eyebrow{justify-content:center}
  .ld-cta{justify-content:center}
  .ld-hero-visual{margin-right:0;max-width:720px;margin-inline:auto}
  .ld-row,.ld-row:nth-child(even){grid-template-columns:1fr}
  .ld-row:nth-child(even) .ld-row-copy{order:0}
  .ld-case{grid-template-columns:1fr}
  .ld-features{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ld-steps ol{grid-template-columns:1fr;max-width:520px;margin-inline:auto}
  .ld-numbers{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:var(--sp-8)}
}
@media (max-width:640px){
  /* Phones: the screen comes into the first view; the students line says what the numbers strip says just below. */
  .ld-hero{gap:var(--sp-6);padding-top:var(--sp-6)}
  .ld-trust{display:none}
  .ld-cta{margin-top:var(--sp-6)}
  .ld-features{grid-template-columns:1fr}
  .ld-cta{flex-direction:column;align-items:stretch;width:100%}
  .ld-cta .google-signin{justify-content:center}
  .ld-watch{justify-content:center}
  .ld-window{padding:4px}
  .ld-window-bar{height:24px}
  .ld-case .ld-figures{gap:var(--sp-3)}
  .ld-faq-item p{padding-right:0}
}
@media (max-width:360px){
  .ld-signin-small{padding:0 var(--sp-3)}
  .ld-brand{font-size:var(--fs-body)}
}
