/* home.css: landing page. Tokens, header, footer, buttons and store badges come from base.css. */
/* Hero */
.hero-v2 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1rem 3rem;
    display: grid;
    gap: 4rem;
    align-items: center;
}
.hero-v2 h1 { font-size: clamp(2.5rem, 8vw, 4.75rem); font-weight: 700; }
.lede { margin-top: 1.25rem; font-size: 1.1875rem; color: var(--text-secondary); max-width: 30rem; }
.hero-btn { margin-top: 2rem; }
.reassure { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.25rem; color: var(--text-secondary); font-size: 0.9375rem; }
.reassure li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* Phone: iPhone Pro frame around the app's home screen.
   --pt is one iPhone point (screen = 402pt wide), so values below are copied from the Flutter widgets. */
.phone {
    position: relative;
    width: min(100%, 320px);
    margin: 0 auto;
    padding: 5px;
    border-radius: 58px;
    background: linear-gradient(145deg, #4a4a4e, #1c1c1e 40%, #2c2c2e 70%, #48484a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), inset 0 0 0 3px #000, 0 40px 100px rgba(10, 132, 255, 0.25);
}
/* Side buttons: action + volume on the left, power on the right */
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #3a3a3c; }
.phone::before { left: -2px; top: 19%; height: 5%; box-shadow: 0 50px 0 #3a3a3c, 0 90px 0 #3a3a3c; }
.phone::after { right: -2px; top: 28%; height: 11%; }
.screen { --pt: calc(100cqw / 402); position: relative; aspect-ratio: 402 / 874; border-radius: 53px; overflow: hidden; background: #020202; container-type: inline-size; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen svg:not(.map, .fill) { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.screen .fill { fill: currentColor; }

.status-bar { position: absolute; inset: 0 0 auto; height: calc(54 * var(--pt)); display: flex; align-items: center; justify-content: space-between; padding: calc(4 * var(--pt)) calc(34 * var(--pt)) 0 calc(48 * var(--pt)); font-size: calc(17 * var(--pt)); font-weight: 600; z-index: 2; }
.island { position: absolute; left: 50%; top: calc(11 * var(--pt)); width: calc(125 * var(--pt)); height: calc(37 * var(--pt)); translate: -50% 0; border-radius: 999px; background: #000; }
.status-icons { display: flex; align-items: center; gap: calc(6 * var(--pt)); }
.status-icons svg:first-child { width: calc(18 * var(--pt)); }
.status-icons svg:nth-child(2) { width: calc(16 * var(--pt)); }
.battery { position: relative; width: calc(25 * var(--pt)); height: calc(12 * var(--pt)); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: calc(4 * var(--pt)); padding: 1.5px; }
.battery span { display: block; width: 80%; height: 100%; border-radius: calc(2 * var(--pt)); background: #fff; }
.battery::after { content: ""; position: absolute; right: calc(-3 * var(--pt)); top: 30%; width: 1.5px; height: 40%; border-radius: 1px; background: rgba(255, 255, 255, 0.4); }

/* HomeAppBar: kToolbarHeight 56, logo 20% width, glass bell */
.app-bar { position: absolute; top: calc(54 * var(--pt)); left: calc(16 * var(--pt)); right: calc(12 * var(--pt)); height: calc(56 * var(--pt)); display: flex; justify-content: space-between; align-items: center; }
.app-logo { font-size: calc(26 * var(--pt)); font-weight: 700; letter-spacing: -0.02em; }
.bell { width: calc(44 * var(--pt)); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4); backdrop-filter: blur(6px); }
.bell svg { width: calc(22 * var(--pt)); }

/* CenterUser + RippleAnimation */
.pulse { position: absolute; left: 50%; top: 31%; width: calc(200 * var(--pt)); aspect-ratio: 1; translate: -50% -50%; display: grid; place-items: center; }
.ripple { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ripple 2.4s linear infinite; }
.ripple:nth-child(2) { animation-delay: -0.6s; }
.ripple:nth-child(3) { animation-delay: -1.2s; }
.ripple:nth-child(4) { animation-delay: -1.8s; }
.me, .peer, .tab-me { border-radius: 50%; background: url('assets/36.png') var(--p, 60% 0) / 600% 600%; }
/* 17% of width in the app, 15% smaller here */
.me { position: relative; width: calc(58 * var(--pt)); aspect-ratio: 1; box-shadow: inset 0 0 0 calc(3 * var(--pt)) #fff; }
.me::after { content: ""; position: absolute; right: 0; bottom: 0; width: calc(16 * var(--pt)); aspect-ratio: 1; border-radius: 50%; background: #4caf50; box-shadow: 0 0 0 calc(2.5 * var(--pt)) #020202, 0 0 6px 1px rgba(76, 175, 80, 0.4); }
.peer { position: absolute; left: var(--x); top: var(--y); width: calc(28 * var(--pt)); aspect-ratio: 1; translate: -50% -50%; box-shadow: inset 0 0 0 1.5px #fff, 0 2px 6px rgba(0, 0, 0, 0.45); animation: pop 6s var(--d) ease-in-out infinite both; }

/* LocationVibeLine + HomeBottomCard, 20pt above the tab bar, 5% side margins */
.home-bottom { position: absolute; left: calc(20 * var(--pt)); right: calc(20 * var(--pt)); bottom: calc(110 * var(--pt)); }
.vibe { font-family: 'Inter', var(--font-stack); font-size: calc(28 * var(--pt)); font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; margin-bottom: calc(12 * var(--pt)); }
.bottom-card { padding: calc(16 * var(--pt)); border-radius: calc(26 * var(--pt)); background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.03); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.find-row { display: flex; gap: calc(10 * var(--pt)); height: calc(50 * var(--pt)); }
.stop { width: calc(50 * var(--pt)); display: grid; place-items: center; border-radius: calc(18 * var(--pt)); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8); }
.stop svg { width: calc(20 * var(--pt)); }
.nearby { position: relative; flex: 1; display: grid; place-items: center; border-radius: calc(18 * var(--pt)); background: var(--accent); border: 0.7px solid rgba(255, 255, 255, 0.4); box-shadow: 0 5px 18px rgba(10, 132, 255, 0.25); font-size: calc(16 * var(--pt)); font-weight: 600; letter-spacing: -0.4px; }
.nearby svg { position: absolute; right: calc(16 * var(--pt)); width: calc(18 * var(--pt)); color: rgba(255, 255, 255, 0.6); }
.previous { display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--pt)); height: calc(50 * var(--pt)); margin-top: calc(14 * var(--pt)); font-size: calc(14 * var(--pt)); color: rgba(255, 255, 255, 0.9); }
.previous svg { width: calc(19 * var(--pt)); color: rgba(255, 255, 255, 0.8); }

/* BottomNavigationBar over the 34pt home-indicator inset */
.tabs { position: absolute; inset: auto 0 0; height: calc(90 * var(--pt)); padding: calc(8 * var(--pt)) calc(30 * var(--pt)) calc(34 * var(--pt)); display: flex; justify-content: space-between; align-items: center; background: rgba(2, 2, 2, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: rgba(255, 255, 255, 0.5); }
.tabs svg { width: calc(25 * var(--pt)); }
.tabs .on { fill: currentColor; color: #fff; }
.tab-me { width: calc(27 * var(--pt)); aspect-ratio: 1; }
.home-indicator { position: absolute; left: 50%; bottom: calc(8 * var(--pt)); width: calc(134 * var(--pt)); height: calc(5 * var(--pt)); translate: -50% 0; border-radius: 99px; background: #fff; }

/* simple_ripple_animation: each ring grows from minRadius to maxRadius while fading out */
@keyframes ripple {
    from { scale: 0.52; opacity: 0.55; }
    to { scale: 1; opacity: 0; }
}
@keyframes pop {
    0%, 100% { opacity: 0; scale: 0.6; }
    12%, 70% { opacity: 1; scale: 1; }
}

/* Everything after the hero is centered on one axis */
.block { max-width: 1200px; margin: 0 auto; padding: 6.5rem 1rem; width: 100%; text-align: center; }
.block-head { margin: 0 auto 2.5rem; max-width: 720px; }
.block-head h2 { text-wrap: balance; }
.block-head h2 { font-size: clamp(2rem, 5.5vw, 3.5rem); font-weight: 700; }
.block-head p { margin-top: 0.75rem; font-size: 1.1875rem; }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 28px; padding: 1.75rem; }
.card h3 { font-size: 1.3125rem; font-weight: 600; margin-bottom: 0.5rem; }
.card p { color: var(--text-secondary); font-size: 1.0625rem; }

.steps, .trust { list-style: none; display: grid; gap: 1rem; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--cta); color: #fff; font-weight: 700; margin-bottom: 1.25rem; }
.trust svg { width: 32px; height: 32px; fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1.25rem; }

/* Gallery: native horizontal scroll with snap */
.gallery-block { max-width: none; padding-left: 0; padding-right: 0; padding-bottom: 8rem; } /* gap above the final download section */
.gallery-block .block-head { max-width: 1200px; margin-left: auto; margin-right: auto; padding: 0 1rem; }
.gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 max(1rem, calc((100vw - 1200px) / 2 + 1rem)) 1rem;
    scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 auto; width: min(64vw, 280px); height: auto; border-radius: 28px; border: 1px solid var(--hairline); scroll-snap-align: center; }

.intents { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; max-width: 760px; margin: 0 auto; }
.intents li { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 999px; padding: 0.75rem 1.25rem; font-size: 1.0625rem; font-weight: 500; }

/* FAQ: native exclusive accordion via details[name] */
.faq { max-width: 760px; margin: 0 auto; text-align: left; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; font-size: 1.1875rem; font-weight: 600; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-secondary); font-size: 1.5rem; line-height: 1; transition: rotate 0.2s ease; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: var(--text-secondary); font-size: 1.0625rem; padding-bottom: 1.25rem; max-width: 640px; }

/* Final CTA */
/* Extends 40px (the footer's corner radius) under the footer so the blue shows behind its rounded corners */
.final { text-align: center; padding: 6.5rem 1rem calc(7rem + 40px); margin-bottom: -40px; background: radial-gradient(60% 60% at 50% 100%, rgba(10, 132, 255, 0.25), transparent); }
.final :is(h1, h2) { font-size: clamp(2rem, 6vw, 3.75rem); font-weight: 700; }
.final > p { margin-top: 1rem; font-size: 1.1875rem; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 2rem; }
.ph { display: inline-block; margin-top: 1.75rem; color: var(--text-secondary); font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 4px; }

/* Floating install bar: phones only, the one floating control layer */
.install-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.625rem 0.625rem 0.75rem;
    border-radius: 24px;
    background: rgba(28, 28, 30, 0.72);
    border: 1px solid var(--hairline);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    translate: 0 150%;
    transition: translate 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.install-bar.show { translate: 0 0; }
.install-bar img { border-radius: 10px; }
.install-bar span { flex: 1; line-height: 1.25; }
.install-bar small { display: block; color: var(--text-secondary); font-size: 0.8125rem; }

/* Phones: hero sits in the upper part of the screen with roomy gaps, the phone mockup follows well below */
@media (max-width: 959px) {
    .hero-v2 { padding-top: 12svh; gap: 6rem; }
    .hero-copy, .hero-rest { display: flex; flex-direction: column; align-items: center; text-align: center; }
    /* Hierarchy: 48px heading leads, the button is a calm 48px pill, supporting text steps down to 16 and 14 */
    .hero-v2 h1 { font-size: clamp(2.75rem, 12.8vw, 3.5rem); line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
    .hero-v2 h1 br { display: none; }
    .hero-btn { order: 2; margin-top: 2.5rem; min-height: 48px; padding: 0 1.5rem; font-size: 1rem; box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3); }
    .lede { order: 3; margin: 3rem auto 0; max-width: 32ch; font-size: 1rem; }
    .reassure { order: 4; justify-content: center; margin-top: 1.5rem; font-size: 0.875rem; }
}

/* Phones: the whole header slides away while the install bar is up, so one download control shows at a time */
@media (max-width: 767px) {
    header { transition: translate 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s, border-bottom-color 0.3s; }
    header.bar-on { translate: 0 -100%; }
}

@media (min-width: 768px) {
    .install-bar { display: none; }
    .steps, .trust { grid-template-columns: repeat(3, 1fr); }
    .block, .hero-v2 { padding-left: 2rem; padding-right: 2rem; }
    .gallery-block .block-head { padding: 0 2rem; }
}

@media (min-width: 960px) {
    /* Text takes what the 320px phone and 15rem gap leave; the headline shrinks to keep its two lines */
    .hero-v2 { grid-template-columns: 1fr 320px; gap: 15rem; min-height: calc(100vh - 80px); padding-top: 0; }
    .hero-v2 h1 { font-size: min(4.75rem, calc((100vw - 660px) / 7.2)); white-space: nowrap; }

    /* Screenshots fan out like a hand of cards; no scrolling needed at this width */
    .gallery { overflow: visible; justify-content: center; padding: 1rem 0 3rem; }
    .gallery img { width: 230px; margin: 0 -26px; transform-origin: 50% 130%; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); }
    .gallery img:nth-child(1) { rotate: -15deg; translate: 0 48px; }
    .gallery img:nth-child(2) { rotate: -9deg; translate: 0 16px; z-index: 1; }
    .gallery img:nth-child(3) { rotate: -3deg; z-index: 2; }
    .gallery img:nth-child(4) { rotate: 3deg; z-index: 2; }
    .gallery img:nth-child(5) { rotate: 9deg; translate: 0 16px; z-index: 1; }
    .gallery img:nth-child(6) { rotate: 15deg; translate: 0 48px; }
}

@media (prefers-reduced-motion: reduce) {
    .ripple { animation: none; }
    .ripple + .ripple { display: none; }
    .ripple:first-child { scale: 0.75; opacity: 0.3; }
    .peer { animation: none; opacity: 1; }
    .install-bar, header, .btn-primary, .btn-primary svg { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
    .install-bar { background: var(--surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
