/* Fastmate product home — fastmate.ai
   Editorial, character-first. Dark stage, warm ink, one accent. */

:root {
    --bg: #0b0a0c;
    --bg-2: #121013;
    --surface: #17151a;
    --surface-2: #1f1c22;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.16);
    --ink: #f4efe8;
    --ink-2: #c8bfb6;
    --muted: #8f857d;
    --accent: #ff4d6d;
    --accent-ink: #ffd2db;
    --gold: #e8c07a;
    --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --wrap: 1120px;
    --pad: clamp(20px, 5vw, 48px);
    --r: 18px;
    --r-lg: 26px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    min-height: 100dvh;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: rgba(255, 77, 109, .35); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.display {
    font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.02;
    font-size: clamp(40px, 7.2vw, 84px);
}
.display em { font-style: italic; color: var(--accent-ink); }
.h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.06; font-size: clamp(32px, 4.6vw, 52px); }
.lead { color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; max-width: 34em; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head .lead { max-width: 30em; }

/* ---------- nav ---------- */
.fm-nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    background: rgba(11, 10, 12, .72);
    border-bottom: 1px solid var(--line);
}
.fm-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; font-size: 17px; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: none; gap: 28px; font-size: 14px; color: var(--ink-2); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 48px; padding: 0 20px; border-radius: 999px;
    font-size: 15px; font-weight: 600; letter-spacing: -.005em;
    transition: transform .25s var(--ease), background .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-solid { background: var(--ink); color: #111; }
.btn-solid:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .4); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #ff6382; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- hero ---------- */
.fm-hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.fm-hero::before {
    content: ""; position: absolute; inset: -20% -10% auto -10%; height: 70%;
    background:
        radial-gradient(60% 60% at 70% 30%, rgba(255, 77, 109, .16), transparent 70%),
        radial-gradient(40% 50% at 20% 60%, rgba(232, 192, 122, .08), transparent 70%);
    pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-copy .display { max-width: 9em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.proof span { display: inline-flex; align-items: center; gap: 8px; }
.proof span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

/* stacked portrait cards */
.hero-stage { position: relative; aspect-ratio: 4 / 5; max-width: 420px; width: 100%; margin: 0 auto; }
.stack-card {
    position: absolute; inset: 0; border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
    transition: transform .8s var(--ease), opacity .8s var(--ease), filter .8s var(--ease);
    will-change: transform;
}
.stack-card img { width: 100%; height: 100%; object-fit: cover; }
.stack-card .veil {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11, 10, 12, 0) 45%, rgba(11, 10, 12, .92) 100%);
}
.stack-card .meta { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.stack-card .name { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -.01em; }
.stack-card .role { font-size: 13px; color: var(--ink-2); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack-card:not(.pos-0) .meta, .stack-card:not(.pos-0) .voice-pill { opacity: 0; transition: none; }
.stack-card .meta, .stack-card .voice-pill { transition: opacity .5s var(--ease); }
.stack-card .hook { font-size: 14px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stack-card.pos-0 { z-index: 3; opacity: 1; }
.stack-card.pos-1 { z-index: 2; opacity: .85; transform: translate3d(6%, -4%, 0) rotate(4deg) scale(.94); filter: brightness(.7); }
.stack-card.pos-2 { z-index: 1; opacity: .7; transform: translate3d(-7%, -8%, 0) rotate(-5deg) scale(.88); filter: brightness(.5); }
.stack-card.pos-out { z-index: 0; opacity: 0; transform: translate3d(0, 6%, 0) scale(.9); }
.stack-card .voice-pill {
    position: absolute; top: 16px; left: 16px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .1em;
    background: rgba(11, 10, 12, .6); border: 1px solid var(--line-2); backdrop-filter: blur(8px);
}
.stack-card .voice-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 77, 109, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); } }
.stack-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.stack-dots button { width: 22px; height: 3px; border-radius: 2px; background: var(--line-2); transition: background .3s, width .3s; }
.stack-dots button.active { background: var(--ink); width: 34px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- cast ---------- */
.fm-cast { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cast-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.seg button.active { background: var(--ink); color: #111; }
.cast-hint { font-size: 13px; color: var(--muted); }
.cast-rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(68vw, 250px); gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px;
    margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad);
    scrollbar-width: none;
}
.cast-rail::-webkit-scrollbar { display: none; }
.cast-card {
    scroll-snap-align: start; position: relative; border-radius: var(--r); overflow: hidden;
    aspect-ratio: 3 / 4; background: var(--surface); border: 1px solid var(--line);
    transition: transform .4s var(--ease), border-color .3s;
}
.cast-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.cast-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cast-card:hover img { transform: scale(1.04); }
.cast-card .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 12, 0) 50%, rgba(11, 10, 12, .9) 100%); }
.cast-card .meta { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.cast-card .name { font-family: var(--serif); font-size: 24px; line-height: 1; }
.cast-card .role { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-card .genre { position: absolute; top: 12px; left: 12px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: rgba(11, 10, 12, .55); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.cast-card .hook { font-size: 13px; color: var(--ink-2); line-height: 1.4; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s var(--ease), opacity .3s; }
.cast-card:hover .hook, .cast-card:focus-visible .hook { max-height: 4.2em; opacity: 1; margin-top: 6px; }

/* ---------- how ---------- */
.how-grid { display: grid; gap: 18px; }
.how-step { padding: 26px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.how-step .n { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--gold); }
.how-step h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.how-step p { color: var(--ink-2); font-size: 15px; }

/* ---------- stories ---------- */
.genre-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 22px; scrollbar-width: none; }
.genre-filter::-webkit-scrollbar { display: none; }
.genre-chip { flex: none; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s, border-color .2s; }
.genre-chip:hover { border-color: rgba(255, 255, 255, .4); color: var(--ink); }
.genre-chip.active { background: var(--ink); color: #111; border-color: var(--ink); }
.episode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.episode-card { display: flex; flex-direction: column; gap: 10px; }
.episode-card .thumb { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.episode-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.episode-card:hover .thumb img { transform: scale(1.04); }
.episode-card .badge { position: absolute; top: 10px; left: 10px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .1em; background: rgba(11, 10, 12, .6); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.episode-card .badge.free { color: var(--gold); }
.episode-card .badge.voice { left: auto; right: 10px; color: var(--accent-ink); }
.episode-card .title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode-card .with { font-size: 12px; color: var(--muted); }
.episode-card .with b { color: var(--ink-2); font-weight: 500; }
.episode-more { display: flex; justify-content: center; margin-top: 28px; }
.skeleton-card { aspect-ratio: 3 / 4; }

/* ---------- memory ---------- */
.fm-memory { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.memory-grid { display: grid; gap: 36px; align-items: center; }
.chat-demo { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); max-width: 440px; }
.chat-demo .day { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 6px 0; }
.bubble { max-width: 86%; padding: 12px 15px; border-radius: 18px; font-size: 15px; line-height: 1.45; }
.bubble.them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.chat-demo .note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
.values { display: grid; gap: 22px; }
.value h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.value p { color: var(--ink-2); font-size: 15px; }
.value .k { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }

/* ---------- faq ---------- */
.faq-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; cursor: pointer; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--serif); font-size: 26px; color: var(--muted); transition: transform .3s var(--ease); flex: none; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-2); padding: 0 0 22px; max-width: 40em; }

/* ---------- final ---------- */
.fm-final { text-align: center; padding: clamp(72px, 11vw, 140px) 0; position: relative; overflow: hidden; }
.fm-final::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(50% 50% at 50% 100%, rgba(255, 77, 109, .22), transparent 70%); pointer-events: none; }
.fm-final .wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.fm-final .cta-row { justify-content: center; }

/* ---------- footer ---------- */
.fm-foot { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.fm-foot .wrap { display: flex; flex-direction: column; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }
.foot-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.socials { display: flex; gap: 14px; }
.socials a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink-2); transition: color .2s, border-color .2s; }
.socials a:hover { color: var(--ink); border-color: rgba(255, 255, 255, .4); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .rv { opacity: 1; transform: none; transition: none; }
    .stack-card { transition: none; }
}

/* ---------- desktop ---------- */
@media (min-width: 760px) {
    .nav-links { display: flex; }
    .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
    .hero-stage { margin: 0 0 0 auto; }
    .how-grid { grid-template-columns: repeat(3, 1fr); }
    .episode-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .memory-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
    .cast-rail { grid-auto-columns: 220px; }
}
@media (min-width: 1024px) {
    .episode-grid { grid-template-columns: repeat(5, 1fr); }
}
