/* Homepage composition; the older home.css is still used by How it works. */

.page-home {
    --home-font: var(--font-text);
    --home-control: #fff;
    --home-control-shadow: 0 1px 3px rgba(28,35,41,.06);
}

.page-home :is(a, button):focus-visible { outline-color: #007cae; }
.page-home .home-main { width: 100%; padding: clamp(20px, 2vw, 32px) clamp(16px, 4vw, 64px) 8px; color: var(--glass-ink); overflow-x: clip; }
.home-wrap { width: 100%; max-width: 1110px; margin-inline: auto; }
.home-hero-copy { text-align: center; }
.page-home .home-hero-copy h1 { position: relative; isolation: isolate; width: fit-content; margin: 0 auto; font-family: var(--font-headline); font-size: clamp(34px, 4.4vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -.045em; }
body.page-home .home-hero-copy h1 { color: #000; }
.home-hero-text { margin: 32px 0 0; font-size: clamp(16px, 1.8vw, 25px); line-height: 1.4; }
.home-hero-ctas { display: flex; justify-content: center; margin-top: 26px; }
.page-home .home-main .home-btn-primary {
    position: relative; top: 0; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    width: min(100%, 340px); min-height: 88px; padding: 14px 28px;
    border: 1px solid #fff; border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #fbfeff 55%, #eef8fc 100%);
    box-shadow: inset 0 2px 2px rgba(255,255,255,.95), inset 0 -2px 3px rgba(116,161,182,.12), 0 3px 0 rgba(153,192,207,.4), 0 8px 18px rgba(28,88,108,.14);
    color: #07112e; text-decoration: none; font-size: clamp(20px, 2vw, 28px); font-weight: 700; line-height: 1.2;
    -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-tap-highlight-color: transparent; transition: box-shadow .15s ease;
}
.home-cta-label { align-self: center; min-width: 0; text-align: center; white-space: nowrap; }
.home-cta-arrow { display: flex; flex: 0 0 24px; width: 24px; height: 24px; }
.home-cta-arrow svg { width: 100%; height: 100%; }
.home-rank-wordmark { color: inherit; }
.page-home .home-rank-wordmark .wordmark-ranked { color: inherit; background: none; font-style: normal; }
@media (hover: hover) {
    .page-home .home-main .home-btn-primary:hover { box-shadow: inset 0 2px 2px rgba(255,255,255,.95), inset 0 -2px 3px rgba(116,161,182,.12), 0 3px 0 rgba(153,192,207,.4), 0 10px 22px rgba(28,88,108,.18); }
}
.page-home .home-main .home-btn-primary:is(:active, .is-pressed) { top: 2px; background: linear-gradient(180deg, #f5fbfe, #eef8fc); box-shadow: inset 0 1px 3px rgba(28,88,108,.1), 0 1px 0 rgba(153,192,207,.4), 0 3px 7px rgba(28,88,108,.1); }

/* One SVG coordinate system keeps the front-facing comparison and score aligned.
   Its intrinsic ratio reserves space before the shared portraits load. */
.home-showcase { width: 100%; max-width: 600px; min-width: 0; margin: 28px auto 0; }
.home-rank-illustration { --home-portrait-height: calc(269px * 4 / 3); display: block; width: 100%; height: auto; aspect-ratio: 680 / 633; overflow: visible; }
/* Both photos use 3:4 frames. Keep the surrounding frame and flight destination
   aligned with their height without resizing the score tile. */
.home-portrait-source, .home-portrait-clip { height: var(--home-portrait-height); }
.home-comparison-surface { height: calc(var(--home-portrait-height) + 24px); }
.home-comparison-focus { height: calc(var(--home-portrait-height) - 4px); }
.home-comparison-vs { transform: translateY(calc((var(--home-portrait-height) - 286px) / 2)); }
#homeResultCard { transform: translate(245px, calc(var(--home-portrait-height) + 244px)); }
.home-rank-illustration text { font-family: var(--home-font); }
.home-rank-illustration .home-illustration-vs { fill: #091b36; font-size: 35px; font-weight: 700; font-style: normal; }
.home-rank-illustration .home-illustration-label { fill: #081a36; font-size: 21px; font-weight: 600; }
.home-rank-illustration .home-illustration-score { fill: #081a36; font-size: 76px; font-weight: 700; font-style: normal; letter-spacing: -3px; font-variant-numeric: tabular-nums; }
.home-comparison-flight { pointer-events: none; }
.home-comparison-link { outline: none; }
.home-comparison-focus { fill: none; stroke: #007cae; stroke-width: 4px; opacity: 0; pointer-events: none; }
.home-comparison-link:focus-visible .home-comparison-focus { opacity: 1; }
body.page-home .site-footer, body.page-home .site-footer-copyright { color: #526985; }
body.page-home .site-footer { border-top-color: rgba(82, 105, 133, .18); }
body.page-home .site-footer a:hover { color: #07112e; }
@media (min-width: 1100px) {
    .page-home .home-main {
        position: relative;
        isolation: isolate;
        display: flex; align-items: center;
        /* Leave room for the compact counts and three steps on the first
           screen; short windows still scroll at the natural content size. */
        min-height: calc(100svh - var(--navbar-footprint) - 400px);
        padding-block: 16px;
    }
    .home-wrap { display: grid; grid-template-columns: minmax(0, .47fr) minmax(0, .53fr); align-items: center; gap: clamp(40px, 4vw, 64px); max-width: 1320px; }
    .home-hero-copy { min-width: 0; text-align: left; }
    .page-home .home-hero-copy h1 { margin-inline: 0; font-size: clamp(46px, 4.8vw, 78px); line-height: 1.2; }
    .home-headline-line { display: block; }
    .home-hero-text { max-width: 32ch; margin-top: 32px; font-size: clamp(20px, 1.55vw, 25px); }
    .home-hero-ctas { justify-content: flex-start; margin-top: 36px; }
    .page-home .home-main .home-btn-primary { width: min(100%, 340px); min-height: 88px; font-size: clamp(20px, 1.55vw, 25px); }
    .home-showcase { max-width: 600px; margin: 0 auto; }
}
@media (max-width: 700px) {
    .home-headline-line { display: block; }
    .page-home .home-main { --home-showcase-width: min(100%, 340px, 42svh); min-height: calc(100svh - var(--navbar-footprint) - 60px); padding: 28px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
    .page-home .home-hero-copy h1 { max-width: 17ch; margin-inline: auto; font-size: clamp(30px, 8vw, 40px); }
    .home-hero-text { max-width: 32ch; margin: 14px auto 0; font-size: 16px; }
    .home-hero-ctas { margin-top: 16px; }
    /* The visible comparison frame occupies 570 of the SVG's 680 units. */
    .page-home .home-main .home-btn-primary { width: calc(var(--home-showcase-width) * 570 / 680); min-height: 56px; padding-inline: 18px; font-size: clamp(18px, 4.4vw, 21px); }
    /* Size to the toolbar-expanded viewport so the score fits with the hero.
       svh stays stable while Safari's address bar hides during scrolling. */
    .home-showcase { width: var(--home-showcase-width); margin: 8px auto 0; }
    .page-home .site-footer { padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
}

