/* The public homepage (templates/onboarding.html). Was an inline <style>
   block; served hashed and immutable via static_url(). The brand mark stays
   inline in the template so it paints offline on a cold install. */
:root {
    --violet: #6d28d9;
    --violet-dark: #4c1d95;
    --violet-tint: #f1edfb;
    --ink: #111827;
    --body: #374151;
    --muted: #6b7280;
    --line: #ececf1;
    --bg: #ffffff;
    --bg-alt: #f7f7f8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}
img { max-width: 100%; }

a { color: var(--violet); }
:focus-visible {
    outline: 3px solid var(--violet);
    outline-offset: 2px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* One content rail: 24px gutters on phones, centered at every width. */
.wrap {
    width: 100%;
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------------- Nav ---------------- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: calc(env(safe-area-inset-top) + 1rem);
    padding-bottom: 1rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}
.brand-name {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
}
.brand-say {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.brand-mark {
    width: 22px;
    height: 28px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.35rem;
}
.nav-links a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.nav-links a.nav-login {
    color: var(--violet);
    font-weight: 700;
}
.nav-page { display: none; }
@media (min-width: 640px) {
    .nav-page { display: inline; }
}

/* ---------------- Buttons ---------------- */
.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.05rem 1.9rem;
    border: none;
    border-radius: 14px;
    background: var(--violet);
    color: #fff;
    font-family: inherit;
    font-size: 1.12rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
}
.cta:hover { background: var(--violet-dark); }
.cta:active { transform: translateY(1px); }
.cta-alt {
    display: block;
    margin-top: 0.8rem;
    color: var(--violet);
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
}

/* ---------------- Hero ---------------- */
/* Top/bottom only -- the shorthand would clobber .wrap's side gutter
   (both classes sit on the same element). */
.hero {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
}
.hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}
.kicker {
    color: var(--violet);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    margin-bottom: 0.9rem;
}
h1 {
    font-size: clamp(2rem, 8.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 1.2rem;
}
.hero-sub {
    color: var(--body);
    font-size: 1.15rem;
    line-height: 1.55;
    max-width: 33rem;
    margin-bottom: 1.7rem;
}
/* Phones get a tighter subhead; desktop keeps the full sentence. */
.sub-short { display: none; }
.hero-actions { margin-bottom: 0.85rem; }
.micro {
    color: var(--muted);
    font-size: 0.92rem;
}
.see-link {
    display: inline-block;
    margin-top: 1.25rem;
    color: var(--violet);
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
}
.count-line {
    margin-top: 0.9rem;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
}
/* Mobile hero: one centered axis -- promise, headline, CTA, proof. */
@media (max-width: 899px) {
    .hero { padding-bottom: 2.75rem; text-align: center; }
    .hero-grid { gap: 1.75rem; }
    .hero-sub { margin-inline: auto; }
    .sub-full { display: none; }
    .sub-short { display: inline; }
    .hero-actions .cta, .fin .cta { width: 100%; max-width: 21rem; }
}
@media (min-width: 900px) {
    .hero { padding-top: 3.5rem; padding-bottom: 4.5rem; }
    .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
}

/* ---------------- Hero demo (Snap -> Say -> Share loop) ---------------- */
.demo {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}
.demo-stage {
    position: relative;
    height: 23.5rem;
}
.scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}
.scene.on { opacity: 1; pointer-events: auto; }
/* No-JS / reduced-motion default: hold on the payoff (the shared list). */
.demo:not(.live) .scene-share { opacity: 1; pointer-events: auto; }
.demo-steps {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    margin-top: 1.1rem;
}
.demo-steps span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
    transition: color 0.3s ease;
}
.demo-steps span::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #d4d4dc;
    transition: background 0.3s ease;
}
.demo-steps span.on { color: var(--ink); }
.demo-steps span.on::before { background: var(--violet); }

/* Camera viewfinder vignette */
.finder {
    width: 100%;
    background: #141416;
    border-radius: 24px;
    padding: 0.8rem 0.8rem 0.9rem;
}
.shot {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #efe9dd;
    height: 15rem;
}
.shot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.reticle {
    position: absolute;
    inset: 16px;
    z-index: 1;
    background:
        linear-gradient(#fff, #fff) top left / 22px 3px,
        linear-gradient(#fff, #fff) top left / 3px 22px,
        linear-gradient(#fff, #fff) top right / 22px 3px,
        linear-gradient(#fff, #fff) top right / 3px 22px,
        linear-gradient(#fff, #fff) bottom left / 22px 3px,
        linear-gradient(#fff, #fff) bottom left / 3px 22px,
        linear-gradient(#fff, #fff) bottom right / 22px 3px,
        linear-gradient(#fff, #fff) bottom right / 3px 22px;
    background-repeat: no-repeat;
    opacity: 0.9;
}
.rec {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.8rem 0.3rem 0.3rem;
}
.rec-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: recblink 1.2s ease-in-out infinite;
}
@keyframes recblink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) {
    .rec-dot, .play.playing { animation: none; }
}
.rec .wave { margin-left: auto; width: 110px; color: #a78bfa; opacity: 1; }

/* List panel + item, mirroring the real product UI */
.panel {
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
    padding: 0.9rem 1rem;
    text-align: left;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.1rem 0.2rem 0.5rem;
}
.panel-head b { font-size: 1.02rem; }
.panel-head span { color: var(--muted); font-size: 0.85rem; }
.item {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0.2rem;
    border-top: 1px solid var(--line);
}
.panel > .item:first-child { border-top: none; }
.thumb {
    flex: 0 0 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--violet-tint);
}
.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.item-body { min-width: 0; flex: 1; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.play {
    flex: 0 0 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--violet);
    position: relative;
    cursor: pointer;
}
.play.playing { animation: recblink 1s ease-in-out infinite; }
.play::after {
    content: '';
    position: absolute;
    left: 8px; top: 6px;
    border-left: 7px solid #fff;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}
.wave { width: 96px; height: 20px; color: var(--violet); opacity: 0.85; }
.time { color: var(--muted); font-size: 0.82rem; }
.snippet {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
    margin-top: 0.3rem;
}
/* Larger single-item panel for the "Say" scene; min-height reserves
   the transcript's final lines so word-by-word typing never reflows. */
.panel-lg { border-radius: 22px; padding: 1rem; }
.panel-lg .item { gap: 0.9rem; padding: 0.2rem 0; }
.panel-lg .thumb { flex: 0 0 84px; height: 84px; border-radius: 16px; }
.panel-lg .play { flex: 0 0 28px; height: 28px; }
.panel-lg .play::after {
    left: 10px; top: 8px;
    border-left: 9px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}
.panel-lg .wave { width: 130px; height: 22px; }
.panel-lg .snippet { font-size: 1rem; margin-top: 0.4rem; min-height: 5.4em; }
.scene-say .rec-mini {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
}
.scene-say .rec-mini .wave { margin-left: auto; }

/* Recipient browser bar */
.viewer-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 80%;
    margin: 0 auto 0.6rem;
    padding: 0.38rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem;
}
.viewer-bar svg { flex: none; width: 12px; height: 12px; }
.viewer-bar b { color: var(--ink); font-weight: 600; }

/* ---------------- Sections ---------------- */
section.block {
    border-top: 1px solid var(--line);
    padding: 2.75rem 0;
}
@media (min-width: 900px) {
    section.block { padding: 5rem 0; }
}
h2 {
    font-size: clamp(1.7rem, 5vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 0.8rem;
}
.lede {
    color: var(--body);
    font-size: 1.12rem;
    line-height: 1.55;
    max-width: 36rem;
    margin-bottom: 1.6rem;
}
@media (min-width: 900px) {
    .lede { margin-bottom: 2.2rem; }
}

/* ---------------- The handoff contrast ---------------- */
.contrast {
    display: grid;
    gap: 1rem;
}
@media (min-width: 800px) {
    .contrast { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
}
.hand {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.1rem 1.1rem 1.2rem;
    background: var(--bg-alt);
}
@media (min-width: 800px) {
    .hand { padding: 1.4rem 1.4rem 1.5rem; }
}
.hand-facilist { background: #fff; border-color: #ddd3f5; }
.hand h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.9rem;
}
.hand-facilist h3 { color: var(--violet); }
.hand-note {
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 0.92rem;
}
.msgs {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.bubble {
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: left;
    max-width: 90%;
}
.bubble.sent {
    align-self: flex-end;
    padding: 0.6rem 0.9rem;
    border-radius: 20px 20px 6px 20px;
    background: var(--violet);
    color: #fff;
}
.bubble.recv {
    align-self: flex-start;
    padding: 0.6rem 0.9rem;
    border-radius: 20px 20px 20px 6px;
    background: #e4e4ea;
    color: var(--ink);
}
/* The "before" world is gray: same bubbles, no violet */
.hand-usual .bubble.sent { background: #9ca3af; }
.photo-burst {
    align-self: flex-end;
    display: flex;
    gap: 0.4rem;
}
.photo-burst img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    filter: grayscale(1);
    opacity: 0.85;
}
.bubble .link-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
    margin-top: 0.5rem;
}
.link-card > img {
    display: block;
    flex: none;
    width: 54px;
    height: 54px;
    object-fit: cover;
}
.link-meta { padding: 0.45rem 0.8rem 0.55rem; }
.link-meta b { display: block; color: var(--ink); font-size: 0.95rem; }
.link-meta span { color: var(--muted); font-size: 0.8rem; }

/* ---------------- Three steps ---------------- */
.steps {
    display: grid;
    gap: 1.4rem;
}
@media (min-width: 800px) {
    .steps { grid-template-columns: 1fr 1fr 1fr; gap: 2rem; }
}
.step { max-width: 24rem; }
.step-visual {
    height: 9rem;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--bg-alt);
    padding: 1rem;
    margin-bottom: 0.7rem;
    overflow: hidden;
}
@media (min-width: 800px) {
    .step-visual { height: 11rem; margin-bottom: 1rem; }
}
.step h3 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
}
.step h3 em {
    font-style: normal;
    color: var(--violet);
    margin-right: 0.45rem;
}
.step p { color: var(--body); font-size: 1rem; }
.step .finder { border-radius: 18px; padding: 0.55rem 0.55rem 0.6rem; }
.step .shot { height: 4.2rem; border-radius: 10px; }
@media (min-width: 800px) {
    .step .shot { height: 6.4rem; }
}
.step .reticle { inset: 10px; }
.step .rec { font-size: 0.85rem; padding: 0.55rem 0.2rem 0.1rem; }
.step .rec .wave { width: 80px; }
.step .panel { box-shadow: none; }
/* Step 3 shows the recipient's browser: the bar has to shrink so the
   bar + item still fit the fixed .step-visual height. */
.step .viewer { width: 100%; }
.step .viewer-bar {
    width: 100%;
    margin-bottom: 0.45rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
}

/* ---------------- Use-case gallery ---------------- */
/* Swipeable on phones: cards near viewport width with the next card
   peeking, snap to the 24px gutter, no visible scrollbar. */
.cases {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1.5rem;
    padding: 0.25rem 1.5rem 0.5rem;
    margin: 0 -1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cases::-webkit-scrollbar { display: none; }
.case {
    flex: 0 0 clamp(15rem, 84vw, 21rem);
    scroll-snap-align: start;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}
@media (min-width: 900px) {
    .cases {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow: visible;
        margin: 0;
        padding: 0;
    }
    .case { flex: none; }
}
.case-poster {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--violet-tint);
    display: flex;
    align-items: center;
    justify-content: center;
}
.case-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.case-scene {
    color: var(--violet-dark);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}
.case-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(17, 24, 39, 0.18);
    cursor: pointer;
}
.case-play::after {
    content: '';
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.25);
}
.case-play::before {
    content: '';
    position: absolute;
    z-index: 1;
    margin-left: 5px;
    border-left: 16px solid var(--violet);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}
.case-duration {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.75);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}
.case-poster video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.case-body { padding: 0.85rem 1rem 1rem; }
.case-body h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.25rem; }
.case-body p { color: var(--body); font-size: 0.9rem; line-height: 1.4; }

/* ---------------- Benefit strip ---------------- */
.block-strip { padding: 2rem 0; }
.benefits {
    display: grid;
    gap: 0.9rem;
}
@media (min-width: 800px) {
    .block-strip { padding: 3rem 0; }
    .benefits { grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; }
}
.benefits p { color: var(--body); font-size: 1rem; max-width: 24rem; }
.benefits b { color: var(--ink); }

/* ---------------- Recipient view ---------------- */
.recipient-demo {
    max-width: 28rem;
    margin: 0 auto;
}
.try-note {
    text-align: center;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.8rem;
}
.assure {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
    text-align: left;
}
.assure svg {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 0.15em;
    color: var(--violet);
}

/* ---------------- Founder / testers ---------------- */
.trust {
    display: grid;
    gap: 2rem;
}
@media (min-width: 800px) {
    .trust { grid-template-columns: 1fr 1fr; gap: 3rem; }
}
.trust h3 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.8rem;
}
.trust p { color: var(--body); font-size: 1rem; line-height: 1.55; }
.founder { display: flex; gap: 0.9rem; align-items: flex-start; }
.founder-photo {
    flex: none;
    width: 64px; height: 64px;
    border-radius: 50%;
    object-fit: cover;
}
/* Phones: headshot centered above the paragraph -- no narrow text
   column squeezed beside the photo. */
@media (max-width: 799px) {
    .founder { flex-direction: column; align-items: center; gap: 0.8rem; }
    .founder p { width: 100%; }
    .founder-photo { width: 72px; height: 72px; }
}
.quote {
    border-left: 3px solid var(--violet);
    padding: 0.15rem 0 0.15rem 0.9rem;
    margin-top: 1rem;
}
.quote:first-of-type { margin-top: 0; }
.quote p { color: var(--ink); }
.quote footer {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.quote footer strong { color: var(--ink); font-weight: 700; }

/* ---------------- Final CTA + footer ---------------- */
.fin { text-align: center; }
.fin .lede { margin: 0 auto 1.8rem; }
.fin .micro { display: block; margin-top: 0.8rem; }
.foot-legal {
    border-top: 1px solid var(--line);
    padding: 1.6rem 0 calc(env(safe-area-inset-bottom) + 2rem);
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.6;
}
.foot-legal a { color: var(--muted); text-decoration: underline; }
