/* Mix Chat — site styles
   Palette is drawn from the app icon: ink teal + mint, with peach as the "other person". */

:root {
    --ink: #1E2C2E;
    --ink-2: #2A3B3D;
    --paper: #F1F6F2;
    --paper-2: #E4EEE7;
    --white: #FFFFFF;
    --mint: #C4EBD3;
    --peach: #FFCDB4;
    --online: #27A55A;
    --muted: #5A6B6C;
    --line: #CFDCD3;
    --on-ink: #EAF5EE;
    --on-ink-muted: #A9BDB4;

    --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
    --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: 1.25rem;
    --step-2: 1.625rem;
    --step-3: clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem);
    --step-4: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);

    --wrap: 1160px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--online); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--ink); color: var(--on-ink); padding: .6rem 1rem; border-radius: 10px;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
    color: var(--on-ink); background: var(--ink);
    padding: .55rem 1.05rem; border-radius: 999px; font-weight: 600;
}
.site-nav .nav-cta:hover { color: var(--white); background: var(--ink-2); }
@media (max-width: 720px) {
    .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- Store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: .75rem; }
.store-btn {
    display: inline-flex; align-items: center; gap: .7rem;
    min-width: 190px; padding: .7rem 1.2rem .7rem 1rem;
    border-radius: 14px; text-decoration: none;
    background: var(--ink); color: var(--white);
    border: 1px solid var(--ink);
    transition: transform .15s ease, background-color .15s ease;
}
.store-btn:hover { background: var(--ink-2); }
.store-btn:active { transform: scale(.98); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn small { display: block; font-size: .72rem; line-height: 1.1; opacity: .8; }
.store-btn strong { display: block; font-size: 1.12rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.on-ink .store-btn { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.on-ink .store-btn:hover { background: var(--white); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 8vw, 6.5rem); }
.hero .wrap {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: var(--step-4);
    line-height: .98;
    letter-spacing: -0.035em;
    font-weight: 700;
    max-width: 11ch;
    font-variation-settings: "wdth" 85;
}
.hero-lede {
    margin-top: 1.5rem; max-width: 34rem;
    font-size: var(--step-1); line-height: 1.5; color: var(--muted);
}
.hero .stores { margin-top: 2rem; }
.hero-meta { margin-top: 1.1rem; font-size: var(--step--1); color: var(--muted); }
.hero-meta b { color: var(--ink); font-weight: 600; }

/* Chat stage — the one animated moment on the page */
.chat-stage {
    position: relative;
    background: var(--ink);
    border-radius: 28px;
    padding: clamp(1.1rem, 3vw, 1.75rem);
    color: var(--on-ink);
    box-shadow: 0 30px 60px -30px rgba(30, 44, 46, .55);
}
.chat-head {
    display: flex; align-items: center; gap: .75rem;
    padding-bottom: 1rem; margin-bottom: 1.1rem;
    border-bottom: 1px solid rgba(234, 245, 238, .12);
}
.avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    display: grid; place-items: center;
    font-weight: 700; color: var(--ink); background: var(--peach);
    position: relative;
}
.avatar::after {
    content: ""; position: absolute; right: -1px; bottom: -1px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--online); border: 2px solid var(--ink);
}
.chat-head .who strong { display: block; font-weight: 600; line-height: 1.2; }
.chat-head .who span { font-size: var(--step--1); color: var(--on-ink-muted); }
.chat-head .lock {
    margin-left: auto; display: inline-flex; align-items: center; gap: .35rem;
    font-size: .78rem; color: var(--on-ink-muted);
}
.chat-head .lock svg { width: 14px; height: 14px; }

.thread { display: flex; flex-direction: column; gap: .55rem; min-height: 360px; }
.msg {
    max-width: 82%; padding: .65rem .95rem; border-radius: 20px;
    font-size: 1rem; line-height: 1.4; color: var(--ink);
}
.msg.them { align-self: flex-start; background: var(--peach); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--mint); border-bottom-right-radius: 6px; }
.msg-note {
    align-self: center; font-size: .78rem; color: var(--on-ink-muted);
    padding: .2rem .7rem; border: 1px solid rgba(234, 245, 238, .16); border-radius: 999px;
    margin-bottom: .4rem;
}
.msg.photo { padding: .35rem; }
.msg.photo .ph {
    width: 210px; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 15px;
    background:
        radial-gradient(circle at 72% 30%, #FFE9A8 0 12%, transparent 13%),
        linear-gradient(180deg, #F6B490 0%, #E98C6F 48%, #3E5C5A 49%, #2D4645 100%);
}
.msg .meta { display: block; text-align: right; font-size: .7rem; opacity: .6; margin-top: .15rem; }

.typing {
    align-self: flex-start; display: inline-flex; gap: 5px;
    background: var(--peach); padding: .8rem 1rem; border-radius: 20px; border-bottom-left-radius: 6px;
}
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: .35; animation: dot 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: .9; transform: translateY(-3px); } }

/* Messages arrive one by one (JS adds .play). Without JS or with reduced motion, all are visible. */
.chat-stage.play .thread > * { opacity: 0; transform: translateY(8px) scale(.98); }
.chat-stage.play .thread > .in { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .3, 1.2); }

.chat-tags {
    position: absolute; left: clamp(-1.5rem, -2vw, -.5rem); bottom: -1.4rem;
    display: flex; gap: .4rem; flex-wrap: wrap; max-width: 90%;
}
.tag {
    font-size: .85rem; font-weight: 600; padding: .35rem .75rem; border-radius: 999px;
    background: var(--white); color: var(--ink); border: 1px solid var(--line);
}
.tag.shared { background: var(--mint); border-color: var(--mint); }

@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero h1 { max-width: 13ch; }
    .chat-tags { left: .75rem; }
}

/* ---------- Sections ---------- */
[id] { scroll-margin-top: 84px; }
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head h2, .cta h2 {
    font-family: var(--font-display); font-size: var(--step-3);
    line-height: 1.05; letter-spacing: -0.03em; font-weight: 700;
}
.section-head p { margin-top: 1rem; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

/* App screens — coverflow carousel: the active screen sits front and large, neighbours recede behind it */
.screens { padding-top: clamp(1.5rem, 4vw, 3rem); overflow: hidden; }
.screens .section-head { margin-inline: auto; text-align: center; }

.carousel { --w: clamp(210px, 58vw, 300px); outline: none; }
.carousel:focus-visible:not([data-pointer]) .carousel-stage { outline: 3px solid var(--online); outline-offset: 8px; border-radius: 24px; }
.carousel-stage {
    position: relative;
    height: calc(var(--w) * 980 / 464);
    touch-action: pan-y;
    user-select: none; -webkit-user-select: none;
    cursor: grab;
}
.carousel-stage.dragging { cursor: grabbing; }
.slide {
    position: absolute; left: 50%; top: 0;
    width: var(--w); margin-left: calc(var(--w) / -2);
    transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .45s ease, filter .45s ease;
    will-change: transform;
}
.slide img {
    width: 100%; height: auto; pointer-events: none;
    filter: drop-shadow(0 30px 40px rgba(30, 44, 46, .28));
}
.slide[data-pos="0"]  { transform: translateX(0) scale(1); z-index: 3; opacity: 1; }
.slide[data-pos="1"]  { transform: translateX(72%) scale(.78); z-index: 2; opacity: .9; filter: saturate(.75) brightness(.92); cursor: pointer; }
.slide[data-pos="-1"] { transform: translateX(-72%) scale(.78); z-index: 2; opacity: .9; filter: saturate(.75) brightness(.92); cursor: pointer; }
.slide[data-pos="2"]  { transform: translateX(0) scale(.6); z-index: 1; opacity: 0; pointer-events: none; }

.carousel-bar {
    display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 2rem);
    margin-top: 2rem;
}
.carousel-caption { text-align: center; width: min(26rem, 100%); min-height: 4.6em; }
.carousel-caption strong { display: block; font-family: var(--font-display); font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.2; }
.carousel-caption span { display: block; margin-top: .3rem; color: var(--muted); }
.carousel-btn {
    flex: none; width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    background: var(--white); color: var(--ink); border: 1px solid var(--line);
    transition: background-color .15s ease, transform .15s ease;
}
.carousel-btn:hover { background: var(--mint); border-color: var(--mint); }
.carousel-btn:active { transform: scale(.94); }
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.25rem; }
.carousel-dots button {
    width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--line); transition: width .3s ease, background-color .3s ease;
}
.carousel-dots button[aria-current="true"] { width: 28px; background: var(--ink); }

@media (max-width: 600px) {
    .slide[data-pos="1"]  { transform: translateX(56%) scale(.74); }
    .slide[data-pos="-1"] { transform: translateX(-56%) scale(.74); }
    .carousel-btn { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .slide, .carousel-dots button { transition: none; }
}

/* Features: each item pairs a short explanation with a small piece of the real UI */
.features {
    display: grid; grid-template-columns: repeat(12, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
}
.feature {
    background: var(--white); border-radius: 24px; padding: clamp(1.4rem, 3vw, 2rem);
    display: flex; flex-direction: column; gap: 1.25rem;
    border: 1px solid var(--line);
}
.feature h3 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.02em; }
.feature p { color: var(--muted); margin-top: .5rem; max-width: 34ch; }
.feature.wide { grid-column: span 7; }
.feature.narrow { grid-column: span 5; }
.feature.tint { background: var(--paper-2); border-color: transparent; }
.vignette { margin-top: auto; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips .tag { font-size: .9rem; }

.presence { display: grid; gap: .6rem; }
.presence-row { display: flex; align-items: center; gap: .7rem; font-weight: 500; }
.presence-row .avatar { width: 34px; height: 34px; font-size: .85rem; }
.presence-row .avatar::after { border-color: var(--paper-2); width: 11px; height: 11px; }
.presence-row .avatar.away::after { background: #A7B3AE; }
.presence-row .avatar.mint { background: var(--mint); }
.presence-row small { margin-left: auto; color: var(--muted); font-size: .85rem; }

.speed { display: flex; flex-direction: column; gap: .45rem; }
.feature .speed .msg { font-size: .95rem; color: var(--ink); margin-top: 0; max-width: 82%; }
.speed .msg.me { align-self: flex-end; }

.photo-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 120px; gap: .5rem; max-width: 380px; }
.photo-grid span { border-radius: 14px; }
.photo-grid span:first-child { background: linear-gradient(160deg, #C4EBD3, #5DA683); }
.photo-grid span:nth-child(2) { background: linear-gradient(160deg, #FFCDB4, #E7896A); }
.photo-grid span:nth-child(3) { background: linear-gradient(160deg, #F7E3A1, #D3A94A); }

@media (max-width: 860px) {
    .feature.wide, .feature.narrow { grid-column: span 12; }
}

/* How it works — a real sequence, so it is numbered */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.steps li::before {
    content: counter(step);
    font-family: var(--font-display); font-weight: 700; font-size: 2.5rem; line-height: 1;
    display: block; margin-bottom: 1rem; color: var(--online);
}
.steps h3 { font-family: var(--font-display); font-size: var(--step-1); letter-spacing: -0.01em; }
.steps p { margin-top: .4rem; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Safety */
.safety { background: var(--ink); color: var(--on-ink); border-radius: clamp(24px, 4vw, 40px); margin-inline: clamp(.5rem, 2vw, 1.5rem); }
.safety .section-head p { color: var(--on-ink-muted); }
.safety-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(2rem, 5vw, 4rem); }
.safety-list li {
    display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start;
    padding-block: 1.5rem; border-top: 1px solid rgba(234, 245, 238, .14);
}
.safety-list .ico {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(196, 235, 211, .12); color: var(--mint);
}
.safety-list .ico svg { width: 22px; height: 22px; }
.safety-list h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.3; }
.safety-list p { color: var(--on-ink-muted); margin-top: .25rem; }
.safety-list a { color: var(--mint); }
@media (max-width: 760px) { .safety-list { grid-template-columns: 1fr; } }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq-layout .section-head { position: sticky; top: 100px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
    font-weight: 600; font-size: var(--step-1); line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; position: absolute; right: .25rem; top: 50%; width: 12px; height: 12px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding-bottom: 1.4rem; color: var(--muted); max-width: 60ch; }
@media (max-width: 860px) {
    .faq-layout { grid-template-columns: 1fr; }
    .faq-layout .section-head { position: static; }
}

/* Final CTA */
.cta { text-align: center; padding-top: clamp(2rem, 5vw, 4rem); }
.cta .icon { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 1.5rem; box-shadow: 0 20px 40px -20px rgba(30,44,46,.6); }
.cta h2 { font-size: var(--step-4); max-width: 14ch; margin-inline: auto; font-variation-settings: "wdth" 85; }
.cta p { margin: 1rem auto 0; color: var(--muted); font-size: var(--step-1); max-width: 34rem; }
.cta .stores { justify-content: center; margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; font-size: var(--step--1); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-size: var(--step--1); font-weight: 600; color: var(--ink); margin-bottom: .75rem; }
.footer-grid ul { list-style: none; display: grid; gap: .45rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-company { max-width: 30rem; }
.footer-company .brand { margin-bottom: 1rem; color: var(--ink); }
.footer-company address { font-style: normal; margin-top: .5rem; }
.copyright { margin-top: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-company { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem); }
.legal-content { max-width: 46rem; margin-inline: auto; }
.legal-content h1 {
    font-family: var(--font-display); font-size: var(--step-3); line-height: 1.08;
    letter-spacing: -0.03em; font-weight: 700;
}
.legal-date { margin-top: .75rem; color: var(--muted); font-size: var(--step--1); }
.legal-section { margin-top: 2.25rem; }
.legal-section:first-of-type { margin-top: 2rem; }
.legal-section h2 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: .75rem; }
.legal-section h3 { font-size: var(--step-1); margin: 1.25rem 0 .5rem; }
.legal-section p { margin-bottom: .85rem; }
.legal-section ul, .legal-section ol { padding-left: 1.4rem; margin-bottom: .85rem; display: grid; gap: .4rem; }
.legal-section a { color: #1B7A43; text-underline-offset: 2px; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--ink); }
