/* EightSoul AI — site styles
   Palette: wine night background, the logo's red→orange "ember" gradient as the one bold element. */
:root {
  --wine: #1e0a12;
  --wine-2: #2a0f1b;
  --wine-3: #3a1626;
  --ember-a: #ff2d55;
  --ember-b: #ff8a1f;
  --ember: linear-gradient(100deg, var(--ember-a), var(--ember-b));
  --blush: #ffe6e9;
  --text: #f7e9ec;
  --muted: #bfa1ad;
  --paper: #fff6f3;
  --ink: #2a0f1b;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
  --r-lg: 28px;
  --r-sm: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wine);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blush); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--ember-b); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); color: var(--blush); letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 800; font-variation-settings: "wdth" 85; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 64ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text); max-width: 54ch; }
.muted { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(30,10,18,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--wine-3); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blush); font: 800 1.35rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 46px; height: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blush); }
.btn.header-cta { padding: 10px 18px; font-size: .95rem; }
@media (max-width: 900px) { .nav { display: none; } .btn.header-cta { margin-left: auto; } }
@media (max-width: 480px) { .btn.header-cta { padding: 9px 14px; font-size: .9rem; } .brand { font-size: 1.15rem; } .brand img { width: 38px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font: 700 1.05rem/1 var(--body); text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--ember); color: #fff; box-shadow: 0 10px 30px -10px rgba(255,45,85,.7); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { color: var(--blush); border: 1.5px solid var(--wine-3); }
.btn-ghost:hover { border-color: var(--muted); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.fine { font-size: .9rem; color: var(--muted); margin-top: 14px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero-loop { position: absolute; top: 50%; right: -22%; transform: translateY(-50%); width: min(1150px, 110vw); opacity: .2; z-index: 0; pointer-events: none; }
@media (max-width: 860px) { .hero-loop { top: auto; bottom: 4%; right: -40%; transform: none; width: 170vw; opacity: .14; } }
.hero-loop path { fill: none; stroke: url(#ember-stroke); stroke-width: 34; stroke-linecap: round; stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 2.4s .2s cubic-bezier(.6,.1,.2,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-loop path { animation: none; stroke-dashoffset: 0; } html { scroll-behavior: auto; } }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding: 40px 0 64px; } }

/* Phone mockup */
.phone { justify-self: center; width: min(340px, 100%); background: #12060b; border-radius: 44px; padding: 14px; box-shadow: 0 40px 80px -30px #000, inset 0 0 0 1.5px var(--wine-3); }
.phone-screen { border-radius: 32px; overflow: hidden; background: linear-gradient(180deg, #2a0f1b, #170710); }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--wine-3); }
.chat-top img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; }
.chat-top b { display: block; font-size: .95rem; color: var(--blush); }
.chat-top small { color: var(--muted); font-size: .78rem; }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; font-size: .9rem; line-height: 1.4; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; }
.bubble.her { background: var(--wine-3); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--ember); color: #fff; border-bottom-right-radius: 6px; }
.bubble.voice { display: flex; align-items: center; gap: 10px; }
.bubble.voice i { flex: 1; height: 18px; background: repeating-linear-gradient(90deg, var(--muted) 0 3px, transparent 3px 6px); mask: linear-gradient(90deg, #000 60%, transparent); -webkit-mask: linear-gradient(90deg, #000 60%, transparent); opacity: .8; }
.bubble.photo { padding: 4px; }
.bubble.photo img { border-radius: 14px; aspect-ratio: 4/5; object-fit: cover; object-position: top; width: 150px; }

/* Sections */
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.section.paper { background: var(--paper); color: var(--ink); }
.section.paper h2, .section.paper h3 { color: var(--ink); }
.section.paper a { color: #b3123a; }
.section.paper .muted { color: #7a5562; }
.section-head { margin-bottom: 40px; }

/* Character strip */
.cast { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.person { scroll-snap-align: start; margin: 0; }
.person img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top; border-radius: var(--r-lg); background: var(--wine-2); }
.person figcaption { padding: 12px 4px 0; }
.person b { font: 700 1.1rem/1.2 var(--display); color: var(--blush); display: block; }
.person span { color: var(--muted); font-size: .92rem; }

/* Feature rows: alternating text/visual, not identical cards */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 40px 0; border-top: 1px solid var(--wine-3); }
.feature:first-child { border-top: 0; }
.feature.flip > :first-child { order: 2; }
.feature .visual { background: var(--wine-2); border-radius: var(--r-lg); padding: 32px; min-height: 240px; display: grid; place-items: center; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 24px; } .feature.flip > :first-child { order: 0; } }

.stat-line { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.stat-line li { background: var(--wine-3); border-radius: 999px; padding: 7px 14px; font-size: .9rem; color: var(--blush); }
.section.paper .stat-line li { background: #ffe1e6; color: var(--ink); }

/* Steps (a real sequence) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; background: var(--wine-2); border-radius: var(--r-sm); padding: 18px 20px; }
.steps li::before { content: counter(step); font: 800 1.6rem/1 var(--display); background: var(--ember); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps b { color: var(--blush); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--wine-3); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .97rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--wine-3); vertical-align: top; }
th { color: var(--blush); font-family: var(--display); font-weight: 700; background: var(--wine-2); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid #f0d2d8; padding: 18px 0; }
.faq summary { cursor: pointer; font: 700 1.15rem/1.3 var(--display); color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: #b3123a; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; }

/* Closing CTA */
.closer { text-align: center; padding: 96px 0; background: radial-gradient(60% 80% at 50% 100%, rgba(255,45,85,.28), transparent 70%); }
.closer p { margin-inline: auto; }
.closer .cta-row { justify-content: center; }
.closer img { width: 120px; margin: 0 auto 20px; }

/* Breadcrumb + related */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.related { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.related a { display: inline-block; padding: 10px 16px; border: 1.5px solid var(--wine-3); border-radius: 999px; text-decoration: none; font-weight: 600; }
.related a:hover { border-color: var(--ember-a); }

/* Prose pages */
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* Footer */
.site-footer { border-top: 1px solid var(--wine-3); padding: 56px 0 40px; color: var(--muted); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h3 { font-size: 1rem; color: var(--blush); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--blush); }
.age-note { max-width: none; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--wine-3); font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
