:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --ink: #16161d;
  --muted: #62626f;
  --line: #e6e6ef;
  --brand: #4f46e5;
  --brand-ink: #ffffff;
  --brand-soft: #eef0ff;
  --ok: #15803d;
  --ok-soft: #e9f7ee;
  --warn: #b45309;
  --warn-soft: #fff6e6;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 16, 29, 0.04), 0 8px 24px rgba(16, 16, 29, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 17px; }
.brand-text { display: grid; line-height: 1.05; }
.wordmark { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.wordmark .face-dot { display: inline-block; width: 0.66em; height: 0.66em; margin: 0 0.06em 0 0.08em; vertical-align: -0.04em; transition: transform 0.3s ease; }
.wordmark .tld { font-weight: 500; color: var(--muted); }
.brand:hover .face-dot { transform: translateY(-2px) rotate(-8deg); }
.brand-text small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 14px; min-width: 0; }
.nav-links form { margin: 0; }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); font: 600 15px/1.2 inherit;
  text-decoration: none; cursor: pointer; transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; filter: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: #f1f1f7; filter: none; }
.btn.ghost { background: transparent; color: var(--muted); padding: 8px 10px; }
.btn.ghost:hover { color: var(--ink); background: #efeff5; filter: none; }
.btn.danger { background: transparent; color: var(--bad); padding: 6px 10px; font-weight: 500; }
.btn.danger:hover { background: var(--bad-soft); filter: none; }
.btn.lg { padding: 13px 24px; font-size: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); font: inherit; color: inherit;
}
textarea { resize: vertical; min-height: 84px; }
.field { margin-bottom: 18px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #efeff5; color: var(--muted); white-space: nowrap; }
.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.working { background: var(--brand-soft); color: var(--brand); }
.pill.action { background: var(--warn-soft); color: var(--warn); }
.pill.failed { background: var(--bad-soft); color: var(--bad); }

/* Auth */
.auth { min-height: calc(100vh - 80px); display: grid; place-items: center; padding-block: 24px 64px; }
.auth .card { width: 100%; max-width: 420px; }
.auth h1 { font-size: 26px; }

/* Landing */
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
.center { text-align: center; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-block: 40px 72px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); }
.hero p.lede { font-size: 18px; color: var(--muted); max-width: 33em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.meet { margin-top: 18px; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); color: #33337a; font-size: 14px; max-width: 34em; }

.mock { position: relative; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; aspect-ratio: 5 / 4; }
.mock-bar { height: 34px; border-bottom: 1px solid var(--line); background: #fafafd; display: flex; gap: 6px; align-items: center; padding: 0 12px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e2ea; }
.mock-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 10px; }
.mock-page { padding: 18px 20px; display: grid; gap: 9px; }
.mock-page b { display: block; height: 10px; border-radius: 5px; background: #ececf4; width: 70%; }
.mock-page b.mock-h { height: 18px; width: 50%; background: #dcdcea; }
.mock-page b.short { width: 40%; }
.mock-section { border-radius: 10px; padding: 10px 12px; border: 2px solid transparent; display: grid; gap: 2px; font-size: 13px; animation: mock-hl 6s ease-in-out infinite; }
.mock-section span { color: var(--muted); font-size: 12px; }
.mock-chat { position: absolute; right: 28%; bottom: 8%; width: 52%; display: grid; gap: 6px; font-size: 12.5px; }
.mock-q { justify-self: end; background: var(--brand); color: #fff; padding: 7px 10px; border-radius: 12px 12px 3px 12px; animation: mock-in 6s ease-out infinite; }
.mock-a { background: #f1f1f7; padding: 7px 10px; border-radius: 12px 12px 12px 3px; box-shadow: 0 4px 14px rgba(16,16,29,0.08); animation: mock-in2 6s ease-out infinite; }
.mock-guide { position: absolute; right: 4%; bottom: 0; width: 24%; aspect-ratio: 4 / 5; border-radius: 50% 50% 0 0; background: linear-gradient(#4f46e5, #6d28d9) bottom / 100% 40% no-repeat; }
.mock-face { position: absolute; left: 22%; top: 8%; width: 56%; aspect-ratio: 1; border-radius: 50%; background: #ffd9b8; box-shadow: inset 0 14px 0 #3b2a22; }
.mock-face i { position: absolute; top: 46%; width: 9%; height: 11%; border-radius: 50%; background: #2a1d1d; animation: mock-blink 4s infinite; }
.mock-face i:first-child { left: 30%; } .mock-face i:nth-child(2) { right: 30%; }
.mock-face u { position: absolute; left: 38%; top: 68%; width: 24%; height: 7%; border-radius: 0 0 10px 10px; background: #b4535a; animation: mock-talk 0.35s ease-in-out infinite alternate; }
@keyframes mock-hl { 0%, 35% { border-color: transparent; background: transparent; } 45%, 85% { border-color: var(--brand); background: var(--brand-soft); } 100% { border-color: transparent; } }
@keyframes mock-in { 0%, 5% { opacity: 0; transform: translateY(6px); } 12%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mock-in2 { 0%, 25% { opacity: 0; transform: translateY(6px); } 33%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mock-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes mock-talk { from { height: 4%; } to { height: 11%; } }

.band { background: var(--surface); border-block: 1px solid var(--line); padding: 40px 0; margin-bottom: 72px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.trio p { margin: 0; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin: 0 0 80px; list-style: none; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step-card .num { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 10px; }
.step-card p { margin: 0; }

.visitor { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-bottom: 80px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ticks.compact { gap: 8px; font-size: 14px; }
.convo { display: grid; gap: 8px; font-size: 14px; }
.msg-v { justify-self: end; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; max-width: 80%; }
.msg-g { justify-self: start; background: #f1f1f7; padding: 8px 12px; border-radius: 14px 14px 14px 4px; max-width: 85%; }

.price-card { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: center; max-width: 760px; margin: 0 auto 80px; }
.price-card .ticks, .price-card .btn { grid-column: 1 / -1; }
.price-card .btn { justify-self: start; }
.price-tag { font-size: 48px; font-weight: 800; letter-spacing: -0.02em; }

.faq { max-width: 760px; margin-bottom: 80px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.name-story { margin-bottom: 80px; }
.name-card { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; max-width: 820px; margin: 0 auto; }
.name-card .tamil { font-size: clamp(40px, 6vw, 64px); font-weight: 700; background: linear-gradient(135deg, #6366f1, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.2; }
@media (max-width: 600px) { .name-card { grid-template-columns: 1fr; gap: 8px; } }
.cta-final { text-align: center; padding-bottom: 40px; }
.cta-final h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 16px; }

/* Dashboard */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 0 20px; flex-wrap: wrap; }
.site-list { display: grid; gap: 12px; padding-bottom: 64px; }
.site-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; text-decoration: none; color: inherit; }
.site-row:hover { border-color: #cfd0e6; }
.site-row .url { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* Site onboarding */
.stepper { display: flex; gap: 6px; list-style: none; margin: 0 0 24px; padding: 0; flex-wrap: wrap; }
.stepper li { flex: 1 1 120px; padding: 10px 12px; border-radius: 10px; background: #ececf4; color: var(--muted); font-size: 13px; font-weight: 600; }
.stepper li.done { background: var(--brand-soft); color: var(--brand); }
.stepper li.current { background: var(--brand); color: #fff; }
.progress { height: 10px; background: #ececf4; border-radius: 999px; overflow: hidden; margin: 16px 0 10px; }
.progress > div { height: 100%; background: linear-gradient(90deg, #6366f1, #a855f7); border-radius: 999px; transition: width 0.6s ease; }
.working-anim { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pulse 1.1s ease-in-out infinite; margin-right: 8px; vertical-align: middle; }
@keyframes pulse { 50% { opacity: 0.3; transform: scale(0.8); } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section { margin-bottom: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 12px; flex-wrap: wrap; }

.qa { padding: 16px 18px; margin-bottom: 10px; }
.qa-top { display: flex; gap: 10px; align-items: flex-start; }
.qa-num { flex: none; width: 26px; height: 26px; border-radius: 8px; background: #efeff5; color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 6px; }
.qa-body { flex: 1; min-width: 0; }
.qa input.q { font-weight: 600; border-color: transparent; padding: 6px 8px; margin-left: -8px; width: calc(100% + 8px); }
.qa input.q:hover, .qa textarea:hover { border-color: var(--line); }
.qa input.q:focus, .qa textarea:focus { border-color: var(--brand); }
.qa textarea { min-height: 64px; border-color: transparent; padding: 6px 8px; margin-left: -8px; width: calc(100% + 8px); color: #33333d; }
.qa-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.qa-meta .over { color: var(--bad); font-weight: 600; }
.qa-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.qa .saving { color: var(--brand); }
.chips-input { font-size: 13px; color: var(--muted); }

.sticky-bar { position: sticky; bottom: 0; z-index: 5; margin: 24px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)); background: rgba(247, 247, 251, 0.92); backdrop-filter: blur(8px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.voice-row { display: flex; gap: 8px; }
.voice-row select { flex: 1; }
.style-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.style-options label { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; font-weight: 500; margin: 0; }
.style-options input { position: absolute; opacity: 0; pointer-events: none; }
.style-options label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.style-options label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }

.upload { border: 2px dashed #cfd0e6; border-radius: var(--radius); padding: 28px; text-align: center; background: #fbfbfe; cursor: pointer; display: block; font-weight: 400; }
.upload:hover, .upload.drag { border-color: var(--brand); background: var(--brand-soft); }
.upload img { max-height: 220px; border-radius: 10px; margin: 0 auto 10px; display: block; }
.avatar-stage { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; }
.checker { border-radius: var(--radius); background-color: #fff; background-image: linear-gradient(45deg, #ececf4 25%, transparent 25%), linear-gradient(-45deg, #ececf4 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ececf4 75%), linear-gradient(-45deg, transparent 75%, #ececf4 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 4 / 5; display: grid; place-items: center; }
.checker img { width: 100%; height: 100%; object-fit: contain; }

.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 16px; }
.clip-chip { padding: 8px 10px; border-radius: 8px; background: #f1f1f7; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-chip.done { background: var(--ok-soft); color: var(--ok); }
.clip-chip.rendering { background: var(--brand-soft); color: var(--brand); }
.clip-chip.failed { background: var(--bad-soft); color: var(--bad); }

.code-box { position: relative; background: #16161d; color: #e8e8f0; border-radius: 12px; padding: 16px 16px 16px 16px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre; }
.code-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.answers-table { width: 100%; border-collapse: collapse; }
.answers-table td { padding: 10px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.answers-table td:last-child { white-space: nowrap; text-align: right; }
video.clip { width: 100%; max-width: 280px; border-radius: 12px; background: #000; }

footer.site-foot { padding-block: 32px 48px; color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .hero, .visitor { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .trio { grid-template-columns: 1fr; gap: 20px; }
  .grid-2, .avatar-stage { grid-template-columns: 1fr; }
  .avatar-stage .checker { max-width: 260px; }
}
@media (max-width: 600px) {
  .nav-links { gap: 12px; font-size: 14px; }
  .nav-links .muted.small { display: none; }
  .nav-links a, .nav-links .link-btn, .brand-text small { white-space: nowrap; }
  .nav-links .btn { padding: 8px 12px; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .style-options { grid-template-columns: 1fr 1fr 1fr; }
  .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .working-anim, .mock *, .mock-section { animation: none !important; }
  .progress > div { transition: none; }
}
