/* ===== Theme ===== */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f6f6f7;
  --input-bg: #ffffff;
  --hover: #f8f8f9;
  --nav-bg: rgba(250, 250, 250, .85);
  --text: #111111;
  --muted: #6b6b73;
  --border: #e7e7ea;
  --primary: #e60000;
  --primary-hover: #c20000;
  --primary-dark: #990000;
  --primary-soft: #fff0f0;
  --success: #16a34a;
  --error: #dc2626;
  --ok-bg: #dcfce7;   --ok-fg: #166534;
  --warn-bg: #fef3c7; --warn-fg: #92400e;
  --off-bg: #f1f1f3;  --off-fg: #6b6b73;
  --glow: rgba(230, 0, 0, .13);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .06);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0b0d;
  --surface: #141417;
  --surface-2: #1b1b1f;
  --input-bg: #1a1a1e;
  --hover: #1b1b1f;
  --nav-bg: rgba(11, 11, 13, .8);
  --text: #f2f2f3;
  --muted: #9a9aa3;
  --border: #26262c;
  --primary: #ff1f1f;
  --primary-hover: #ff4040;
  --primary-soft: rgba(255, 31, 31, .12);
  --success: #22c55e;
  --error: #f87171;
  --ok-bg: rgba(34, 197, 94, .14);  --ok-fg: #4ade80;
  --warn-bg: rgba(245, 158, 11, .15); --warn-fg: #fbbf24;
  --off-bg: #222227; --off-fg: #8b8b93;
  --glow: rgba(255, 0, 0, .2);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}

a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.logo img { width: 40px; height: 40px; object-fit: contain; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  display: grid; place-items: center; position: relative; overflow: hidden;
  transition: border-color .15s, transform .1s;
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg {
  width: 18px; height: 18px; position: absolute;
  transition: transform .4s cubic-bezier(.4, 1.6, .5, 1), opacity .25s;
}
.theme-toggle .moon { transform: translateY(30px) rotate(-90deg); opacity: 0; }
[data-theme="dark"] .theme-toggle .sun { transform: translateY(-30px) rotate(90deg); opacity: 0; }
[data-theme="dark"] .theme-toggle .moon { transform: none; opacity: 1; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: none;
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(230, 0, 0, .28); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ===== Hero ===== */
.hero { padding: 88px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px 0 auto; height: 520px; z-index: -1;
  background: radial-gradient(ellipse at center, var(--glow), transparent 60%);
  animation: glow 8s ease-in-out infinite;
}
@keyframes glow { 50% { transform: scale(1.12); opacity: .75; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.hero h1 span {
  background: linear-gradient(135deg, #ff1a1a, var(--primary-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="dark"] .hero h1 span { background-image: linear-gradient(135deg, #ff4d4d, #e60000); }
.hero p { max-width: 560px; margin: 20px auto 0; color: var(--muted); font-size: 18px; }

/* ===== Verify card ===== */
.verify-card {
  max-width: 440px; margin: 44px auto 0; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.verify-card h2 { font-size: 18px; margin-bottom: 4px; }
.verify-card .sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--input-bg); font: inherit; font-size: 15px; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted); opacity: .8; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(230, 0, 0, .12); }
.input.invalid { border-color: var(--error); }
.verify-card .btn { width: 100%; }
.msg { font-size: 14px; margin-top: 12px; min-height: 20px; }
.msg.error { color: var(--error); }
.msg.success { color: var(--success); }
.msg a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.hint { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; line-height: 1.9; }
.hint code { background: var(--primary-soft); color: var(--primary); padding: 1px 6px; border-radius: 4px; cursor: pointer; }

/* ===== How it works (animated) ===== */
.how { padding: 56px 0 104px; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; line-height: 1.2; }
.section-head p { color: var(--muted); margin-top: 10px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 110px; left: 16%; right: 16%; height: 2px; z-index: 0;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: flow 3s linear infinite; opacity: .5;
}
@keyframes flow { from { background-position: -100% 0; } to { background-position: 200% 0; } }

.step {
  position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.step-num { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .06em; }
.step h3 { font-size: 17px; margin: 4px 0 6px; }
.step p { font-size: 14px; color: var(--muted); }

.visual {
  height: 176px; border-radius: 12px; margin-bottom: 18px; padding: 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center; gap: 12px; overflow: hidden; position: relative;
}
.visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 80% 0%, var(--glow), transparent 55%);
}

/* Visual 1: typing email */
.fake-input {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 9px;
  background: var(--input-bg); border: 1px solid var(--border); font-size: 13px; min-height: 42px;
}
.fake-input .typed { white-space: nowrap; overflow: hidden; }
.caret { width: 2px; height: 16px; background: var(--primary); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.fake-btn {
  height: 36px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .3s;
}
.fake-btn.done { background: var(--success); }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Visual 2: key status */
.plan-tabs { display: flex; gap: 6px; }
.plan-tabs span {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; padding: 5px 0; border-radius: 7px;
  color: var(--muted); background: var(--input-bg); border: 1px solid var(--border); transition: all .3s;
}
.plan-tabs span.on { color: #fff; background: var(--primary); border-color: var(--primary); }
.key-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); }
.key-time { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bar { height: 8px; border-radius: 99px; background: var(--input-bg); border: 1px solid var(--border); overflow: hidden; }
.bar i {
  display: block; height: 100%; border-radius: 99px; width: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  transition: width 1s linear;
}
.bar i.lifetime { background: linear-gradient(90deg, var(--primary), #ff7a7a, var(--primary)); background-size: 200% 100%; animation: shimmer 2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Visual 3: chat */
.chat { gap: 8px; justify-content: flex-end; }
.bubble {
  max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4;
  opacity: 0; transform: translateY(8px) scale(.96);
  animation: pop 9s ease-in-out infinite;
}
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--input-bg); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat .slot { display: grid; }
.chat .slot > .bubble { grid-area: 1 / 1; justify-self: start; }
.bubble.b1 { animation-name: pop1; }
.bubble.b2 { animation-name: pop2; }
.bubble.b3 { animation-name: pop3; }
.bubble.typing { display: flex; gap: 4px; padding: 11px 12px; }
.bubble.typing b { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.bubble.typing b:nth-child(2) { animation-delay: .15s; }
.bubble.typing b:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
/* 9s loop: msg 1 → typing → reply → fade all */
@keyframes pop1 { 0%, 4% { opacity: 0; transform: translateY(8px) scale(.96); } 9%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes pop2 { 0%, 16% { opacity: 0; transform: translateY(8px) scale(.96); } 20%, 44% { opacity: 1; transform: none; } 47%, 100% { opacity: 0; transform: none; } }
@keyframes pop3 { 0%, 46% { opacity: 0; transform: translateY(8px) scale(.96); } 51%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.steps .reveal:nth-child(2) { transition-delay: .12s; }
.steps .reveal:nth-child(3) { transition-delay: .24s; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .steps::before { display: none; }
}

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; padding: 52px 0 36px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.footer-col a { position: relative; transition: color .15s; }
.footer-col a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 100%;
  background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.footer-col a:hover { color: var(--primary); }
.footer-col a:hover::after { transform: scaleX(1); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-fg);
}
.status-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; position: relative; }
.status-pill .pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor;
  animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.footer-col .small { font-size: 13px; color: var(--muted); margin-top: 12px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 0; font-size: 13px; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.to-top { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; }
.to-top:hover { color: var(--primary); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== Help Center ===== */
.hc-hero {
  background: linear-gradient(135deg, #ff1a1a 0%, #d00000 45%, #8a0000 100%);
  color: #fff; padding: 56px 0 80px;
}
[data-theme="dark"] .hc-hero { background: linear-gradient(135deg, #b30000 0%, #7a0000 50%, #2a0505 100%); }
.hc-hero h1 { font-size: 34px; letter-spacing: -.02em; }
.hc-hero p { opacity: .85; margin-top: 6px; }
.search { margin-top: 24px; position: relative; max-width: 620px; }
.search input {
  width: 100%; padding: 16px 18px 16px 48px; border-radius: 12px; border: none;
  font: inherit; font-size: 16px; color: var(--text); background: var(--input-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 3px solid rgba(255, 255, 255, .45); }
.search::before { content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 16px; z-index: 1; }

.orders {
  margin-top: -40px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.orders-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.orders-head h2 { font-size: 16px; }
.orders-head small { color: var(--muted); font-size: 13px; }
.order {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr auto; gap: 16px; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.order:last-child { border-bottom: none; }
.order.expired { opacity: .55; }
.order small { display: block; font-size: 12px; color: var(--muted); }
.order strong { font-weight: 600; }
.order .mono { display: block; margin-top: 2px; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; color: var(--muted); }
.status {
  display: inline-block; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 600; background: var(--ok-bg); color: var(--ok-fg);
}
.status.lifetime { background: var(--primary-soft); color: var(--primary); }
.status.soon { background: var(--warn-bg); color: var(--warn-fg); }
.status.expired { background: var(--off-bg); color: var(--off-fg); }
.plan {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 6px; margin-left: 6px;
}
@media (max-width: 760px) { .order { grid-template-columns: 1fr 1fr; } }

.section { padding: 48px 0 0; }
.section h2 { font-size: 22px; margin-bottom: 18px; letter-spacing: -.01em; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }

.category {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
  text-align: left; font: inherit; color: inherit; width: 100%;
}
.category:hover, .category.active { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.category .icon { font-size: 24px; margin-bottom: 10px; }
.category h3 { font-size: 16px; }
.category p { font-size: 13px; color: var(--muted); margin-top: 4px; }

.faq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--primary); }
.faq summary:hover { background: var(--hover); }
.faq .answer { padding: 0 22px 18px; color: var(--muted); font-size: 14px; }
.faq .tag { font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 999px; margin-right: 10px; }
.empty { padding: 28px; text-align: center; color: var(--muted); font-size: 14px; }
.empty a { color: var(--primary); font-weight: 600; }

.contact {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  margin-bottom: 72px;
}
.contact h2 { margin-bottom: 8px; }
.contact p { color: var(--muted); font-size: 14px; }
.contact ul { list-style: none; margin-top: 18px; font-size: 14px; display: grid; gap: 10px; }
textarea.input { min-height: 120px; resize: vertical; }
select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 120px);
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 10px;
  font-size: 14px; transition: transform .3s; z-index: 50;
}
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
  .contact { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
  .bubble { opacity: 1; transform: none; }
}
