/* Home page (/): hero with two phones running one flow, the proof strip, section heads, the product tabs and the
 * feature grid. Tokens, header, footer, buttons and surfaces come from site.css; the lower sections
 * are in home-sections.css. */

/* Section head: eyebrow, heading, one line of context */
.sec-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 64px; align-items: end; margin-bottom: 48px; }
.sec-head .eyebrow { grid-column: 1 / -1; margin: 0; }
.sec-head .h2 { max-width: 22ch; text-wrap: balance; }
.sec-head > p:last-child:not(.eyebrow) { margin: 0; color: var(--h-text-2); max-width: 46ch; justify-self: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }

/* Hero: copy on the left, a flow that runs on the right */
.hero { margin-top: -64px; padding-top: 64px; }
.hero .col { padding: 88px 32px 72px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-stat { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; padding: 6px 14px; border: 1px solid var(--h-tray-line); border-radius: 999px; background: var(--h-surface); font-size: 14px; color: var(--h-text-2); transition: border-color .2s; }
.hero-stat b { color: var(--h-blue); font-weight: 600; }
.hero-stat:hover { border-color: var(--h-blue-soft); }
.hero h1 { margin: 0; font-size: clamp(44px, 6vw, 80px); line-height: .98; font-weight: 500; letter-spacing: -.045em; max-width: 11ch; text-wrap: balance; }
.hero h1 .accent { display: block; }
.hero-lede { margin: 28px 0 0; font-size: 20px; color: var(--h-text-2); max-width: 46ch; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin: 20px 0 0; font-size: 14px; color: var(--h-text-3); }

/* Hero picture: two flows at once, checkout on an Android phone and sign-in on an iPhone. A 7 s loop:
 * the track fills, the iPhone types its fields, each tap lands, the confirmation shows and both pass. */
.duo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 22px; --loop: 7s; }
.duo-phones { display: flex; gap: 28px; align-items: flex-start; }
.duo-dev { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.duo-dev.ios { margin-top: 36px; }
/* Device screens stay in their light theme in either site theme */
.phone { --h-ink: #0B0C10; --h-tray: #EEF3FF; --h-blue: #2F5BEA; --h-text-3: #5B6478; --h-card-line: #E1E8F7; color: var(--h-ink); position: relative; width: 210px; height: 430px; padding: 14px 14px 18px; border: 8px solid #0B0C10; border-radius: 36px; background: #fff; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 30px 50px -24px rgba(10, 20, 60, .45); font-size: 12px; overflow: hidden; }
/* iPhone: thin black bezel inside a titanium rim, side buttons, Dynamic Island, iOS status icons,
 * home indicator and the system font */
.iphone { position: relative; padding: 3px; border-radius: 50px; background: linear-gradient(145deg, #C9CCD3, #8D9099 45%, #D7D9DE); box-shadow: 0 30px 50px -24px rgba(10, 20, 60, .45); }
.iphone::before, .iphone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #9A9DA5; }
.iphone::before { left: -2px; top: 96px; height: 92px; box-shadow: 0 -34px 0 -8px #9A9DA5; }
.iphone::after { right: -2px; top: 130px; height: 64px; }
.ios .phone { width: 212px; height: 440px; border-width: 7px; border-color: #050506; border-radius: 47px; padding: 12px 16px 22px; box-shadow: none; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
.ios .ph-bar { position: relative; height: 22px; padding: 0 2px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: -.01em; }
.ios .ph-bar .island { position: absolute; left: 50%; top: 0; width: 66px; height: 20px; margin-left: -33px; border-radius: 999px; background: #050506; }
.ph-status { width: 44px; height: 10px; fill: currentColor; }
.ios .ph-hello { font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.ios .ph-sub { font-size: 13px; color: #8A8A8E; }
.ios .ph-logo { margin-top: 18px; border-radius: 11px; }
.ios .ph-field { padding: 9px 12px; border-radius: 11px; background: #EFEFF4; }
.ios .ph-field small { color: #8A8A8E; }
.ios .ph-btn { padding: 12px; border-radius: 14px; background: #0A7AFF; font-size: 13px; }
.ios .ph-toast { padding: 10px 12px; border-radius: 14px; background: rgba(28, 28, 30, .92); }
.ph-home { position: absolute; left: 50%; bottom: 6px; width: 74px; height: 4px; margin-left: -37px; border-radius: 999px; background: #050506; }
.ph-bar { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 11px; }
.ph-bar i { width: 10px; height: 10px; border-radius: 50%; background: #0B0C10; }
.ph-img { height: 150px; margin-top: 6px; border-radius: 14px; background: var(--h-tray); display: grid; place-items: center; color: var(--h-blue); }
.ph-img svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ph-title { margin-top: 6px; font-size: 15px; letter-spacing: -.01em; }
.ph-price { color: var(--h-text-3); }
.ph-sizes { display: flex; gap: 6px; margin-top: 4px; }
.ph-sizes i { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--h-card-line); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 600; }
.ph-sizes .on { background: #0B0C10; border-color: #0B0C10; color: #fff; }
/* iPhone screen: a sign-in form whose fields fill in before the tap */
.ph-logo { width: 44px; height: 44px; margin: 22px 0 6px; border-radius: 12px; background: var(--h-tray); display: grid; place-items: center; color: var(--h-blue); }
.ph-logo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ph-hello { font-size: 18px; letter-spacing: -.02em; }
.ph-sub { color: var(--h-text-3); margin-bottom: 8px; }
.ph-field { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: #F2F3F7; }
.ph-field small { font-size: 10px; color: var(--h-text-3); }
.typed { display: block; height: 15px; overflow: hidden; white-space: nowrap; font-weight: 500; clip-path: inset(0 100% 0 0); animation: duoType var(--loop) var(--lag, 0s) infinite; }
.typed.pw { letter-spacing: .1em; animation-name: duoType2; }
.ph-toast { margin-top: auto; padding: 9px 12px; border-radius: 10px; background: #0B0C10; color: #fff; font-weight: 600; opacity: 0; transform: translateY(6px); animation: duoToast var(--loop) var(--lag, 0s) infinite; }
.ph-btn { position: relative; padding: 11px; border-radius: 12px; background: #2F5BEA; color: #fff; font-weight: 600; text-align: center; animation: duoPress var(--loop) var(--lag, 0s) infinite; }
.tapdot { position: absolute; left: 60%; top: 50%; width: 30px; height: 30px; margin: -15px; border-radius: 50%; background: rgba(255, 255, 255, .55); opacity: 0; animation: duoTap var(--loop) var(--lag, 0s) infinite; }
.duo-label { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.duo-label span { font-weight: 600; }
.duo-label small { color: var(--h-text-3); font-size: 13px; }
.duo-label .ok { font: 600 12.5px var(--h-sans); color: var(--h-ok-ink); opacity: 0; animation: duoPass var(--loop) var(--lag, 0s) infinite; }
.duo-run { width: 100%; max-width: 470px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--h-code-bg); color: var(--h-code-dim); font-size: 13px; }
.duo-file { font: 500 13px var(--h-mono); color: #fff; }
.duo-track { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--h-code-line); overflow: hidden; }
.duo-track i { display: block; height: 100%; width: 100%; background: var(--h-pass); transform-origin: left; animation: duoTrack var(--loop) infinite; }
.duo-state { display: inline-grid; justify-items: end; font-weight: 600; }
.duo-state > span { grid-area: 1 / 1; }
.duo-state .busy { color: var(--h-run); animation: duoBusy var(--loop) infinite; }
.duo-state .done { color: var(--h-pass); opacity: 0; animation: duoDone var(--loop) infinite; }
@keyframes duoTrack { 0% { transform: scaleX(0); } 44%, 94% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes duoPress { 0%, 30%, 36%, 100% { transform: none; } 33% { transform: scale(.96); } }
@keyframes duoTap { 0%, 29% { opacity: 0; transform: scale(.4); } 31% { opacity: 1; } 40%, 100% { opacity: 0; transform: scale(2.2); } }
@keyframes duoToast { 0%, 35% { opacity: 0; transform: translateY(6px); } 39%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(6px); } }
@keyframes duoPass { 0%, 42% { opacity: 0; } 46%, 92% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes duoBusy { 0%, 44% { opacity: 1; } 47%, 93% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes duoType { 0%, 6% { clip-path: inset(0 100% 0 0); } 16%, 94% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes duoType2 { 0%, 17% { clip-path: inset(0 100% 0 0); } 25%, 94% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes duoDone { 0%, 44% { opacity: 0; } 47%, 93% { opacity: 1; } 97%, 100% { opacity: 0; } }

/* Proof strip: four facts between rules */
.proof { border-top: 1px solid var(--h-rule); }
.proof .col { padding: 0 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.proof-cell { padding: 28px 24px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--h-rule); }
.proof-cell:first-child { border-left: 0; padding-left: 0; }
.proof-cell b { font-size: 32px; font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.proof-cell span { font-size: 14.5px; color: var(--h-text-3); }
a.proof-cell b { color: var(--h-blue); }
a.proof-cell:hover span { color: var(--h-ink); }

/* Product: numbered tabs over the app demo stage */
.product { scroll-margin-top: 72px; }
.prod { border: 1px solid var(--h-card-line); border-radius: 18px; background: var(--h-surface); box-shadow: 0 24px 60px -30px rgba(20, 40, 100, .25); }
.prod-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--h-card-line); }
.prod-tab { position: relative; text-align: left; border: 0; border-left: 1px solid var(--h-card-line); padding: 20px 20px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-content: start; background: var(--h-surface); color: var(--h-text-2); transition: background-color .2s, color .2s; }
.prod-tab:first-child { border-left: 0; border-top-left-radius: 18px; }
.prod-tab:last-child { border-top-right-radius: 18px; }
.prod-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--h-blue); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--h-ease); }
.prod-tab:hover { background: var(--h-art); color: var(--h-ink); }
.prod-tab[aria-selected="true"] { color: var(--h-ink); background: var(--h-art); }
.prod-tab[aria-selected="true"]::after { transform: none; }
.prod-tab .num { font: 500 13px/1.6 var(--h-mono); color: var(--h-blue-mute); }
.prod-tab[aria-selected="true"] .num { color: var(--h-blue); }
.prod-tab b { font-weight: 600; font-size: 16px; line-height: 1.4; }
.prod-tab small { grid-column: 2; margin-top: 4px; font-size: 13.5px; line-height: 1.4; color: var(--h-text-3); }
.prod-stage { min-width: 0; padding: 32px; background-color: var(--h-art); border-radius: 0 0 18px 18px; }
.prod-stage > [hidden] { display: none; }
.prod-stage > [role="tabpanel"].enter { animation: panelIn .32s var(--h-ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Features: a ruled 2×2 grid, no cards; each cell is text over its picture */
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feat { padding: 36px 40px 40px 0; display: flex; flex-direction: column; gap: 28px; border-bottom: 1px solid var(--h-rule); }
.feat:nth-child(even) { padding: 36px 0 40px 40px; border-left: 1px solid var(--h-rule); }
.feat h3 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.feat p { margin: 8px 0 0; font-size: 15.5px; color: var(--h-text-2); max-width: 46ch; }
.feat p a { color: var(--h-blue); }
.art { margin-top: auto; display: flex; }
/* A small light card inside the art, in the look of the app */
.mini { width: 100%; max-width: 420px; padding: 14px 16px; border: 1px solid var(--h-card-line); border-radius: 12px; background: var(--h-surface); box-shadow: 0 6px 18px rgba(20, 40, 100, .06); font-size: 13px; }
.mini code { font: 12px var(--h-mono); color: var(--h-ink); }
.mini-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mini-head b { font-size: 14px; font-weight: 600; }
.mini-head + .mini-list, .mini-head + .matrix-t { margin-top: 8px; }
.mini-list { margin: 0; padding: 0; list-style: none; }
.mini-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--h-card-line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li > :last-child { margin-left: auto; }
.mini-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--h-tray); color: var(--h-text-2); font-size: 12.5px; }
/* Benchmark bars: the baseline in grey, Dev Scenario in blue, widths to scale per app */
.bench .mini-head:not(:first-child) { margin-top: 14px; }
.bench-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 52px; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--h-text-3); }
.bench-row i { display: block; height: 10px; border-radius: 999px; background: var(--h-bar); }
.bench-row.ds { color: var(--h-blue); font-weight: 600; }
.bench-row.ds i { background: var(--h-blue); }
.bench-row em { font: 12px var(--h-mono); text-align: right; }
.bench-row .w100 { width: 100%; } .bench-row .w48 { width: 48.5%; } .bench-row .w42 { width: 42.5%; }
/* Variant matrix: languages by theme */
.matrix-t { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 10px; align-items: center; }
.matrix-t .th { font-size: 12px; font-weight: 600; color: var(--h-text-3); text-align: center; }
.matrix-t .rh { font-size: 13px; }
.matrix-t .pill { justify-content: center; }

:root[data-theme="dark"] .android .phone { box-shadow: 0 0 0 1px #2E3440, 0 30px 50px -24px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .iphone { box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .8); }
@media (max-width: 1080px) {
    .hero-in { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 900px) {
    .prod-tabs { grid-template-columns: repeat(5, minmax(190px, 1fr)); overflow-x: auto; border-radius: 18px 18px 0 0; scroll-snap-type: x mandatory; }
    .prod-tab { scroll-snap-align: start; }
    .proof .col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .proof-cell { padding-left: 24px; }
    .proof-cell:nth-child(odd) { border-left: 0; padding-left: 0; }
    .proof-cell:nth-child(n+3) { border-top: 1px solid var(--h-rule); }
    .sec-head { grid-template-columns: minmax(0, 1fr); }
    .sec-head > p:last-child:not(.eyebrow) { justify-self: start; }
}
@media (max-width: 720px) {
    .feats { grid-template-columns: minmax(0, 1fr); }
    .feat, .feat:nth-child(even) { padding: 28px 0 32px; border-left: 0; }
}
@media (max-width: 640px) {
    .hero .col { padding: 56px 16px 48px; }
    .hero-lede { font-size: 18px; }
    .hero .hero-actions .btn-o { display: none; }
    .duo-phones { gap: 12px; }
    .phone { width: 160px; height: 340px; padding: 10px 10px 14px; border-width: 6px; border-radius: 28px; font-size: 10.5px; gap: 6px; }
    .ios .phone { width: 160px; height: 340px; border-width: 5px; border-radius: 36px; padding: 9px 11px 18px; }
    .iphone { border-radius: 39px; padding: 2px; }
    .iphone::before { top: 72px; height: 66px; }
    .iphone::after { top: 96px; height: 48px; }
    .ios .ph-bar { height: 18px; font-size: 10px; padding-left: 6px; }
    .ios .ph-bar .island { width: 50px; height: 15px; margin-left: -25px; }
    .ph-status { width: 34px; }
    .ios .ph-logo { display: none; }
    .ios .ph-hello { margin-top: 14px; font-size: 18px; }
    .ios .ph-field { padding: 6px 9px; }
    .ios .ph-sub { font-size: 11px; }
    .ios .ph-btn, .ios .ph-toast { padding: 8px; font-size: 11px; }
    .ph-home { width: 56px; bottom: 5px; margin-left: -28px; }
    .ph-img { height: 104px; }
    .ph-img svg { width: 46px; height: 46px; }
    .ph-title { font-size: 12.5px; }
    .ph-logo { margin-top: 12px; width: 36px; height: 36px; }
    .ph-hello { font-size: 15px; }
    .ph-field { padding: 6px 8px; }
    .ph-sizes i { width: 22px; height: 22px; }
    .ph-toast, .ph-btn { padding: 8px; }
    .duo-dev.ios { margin-top: 24px; }
    .duo-label { flex-wrap: wrap; justify-content: center; gap: 2px 6px; font-size: 13px; }
    .proof .col { padding: 0 16px; }
    .proof-cell { padding: 20px 0 20px 16px; }
    .proof-cell b { font-size: 26px; }
    .sec-head { margin-bottom: 32px; }
    .prod-stage { padding: 12px; }
    .mini { padding: 12px; }
    .bench-row { grid-template-columns: 78px minmax(0, 1fr) 46px; gap: 8px; }
    /* Phones: the demo comes first; its tabs follow it. */
    .prod { display: flex; flex-direction: column; }
    .prod-stage { order: -1; border-bottom: 1px solid var(--h-card-line); border-radius: 18px 18px 0 0; }
    .prod-tabs { border-bottom: 0; border-radius: 0 0 18px 18px; }
    .prod-tab:first-child, .prod-tab:last-child { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ph-toast, .ph-btn, .tapdot, .typed, .duo-label .ok, .duo-track i, .duo-state > span { animation: none; }
    .typed { clip-path: none; }
    .ph-toast, .duo-label .ok, .duo-state .done { opacity: 1; transform: none; }
    .duo-state .busy, .tapdot { display: none; }
    .prod-tab::after { transition: none; }
    .prod-stage > [role="tabpanel"].enter { animation: none; }
}
