/*
 * Katzu sales site — AMOLED pure black + M3 tokens, Cairo for Arabic.
 * Same visual language as the app so the two properties feel like one product,
 * while staying a separate site (no shared bundle, no shared deploy).
 */

@font-face {
  font-family: 'Cairo';
  src: url('/assets/fonts/cairo.ttf') format('truetype');
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface-card: #1a1826;
  --surface-subtle: #221f33;
  --primary: #8b6fe8;
  --primary-pressed: #7659d4;
  --success: #7fd9a8;
  --learning: #f0c674;
  --error: #e89b9b;
  --text: #f3f1fb;
  --text-secondary: #b8b3cf;
  --text-muted: #7f7a99;
  --border: #2c2940;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; line-height: 1.35; margin: 0 0 12px; }
h1 { font-size: clamp(1.75rem, 4.4vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 14px; color: var(--text-secondary); }

a { color: var(--primary); text-decoration: none; }
a:hover { color: #a48ef5; }

.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.center { text-align: center; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 12px; background: var(--surface-card); padding: 8px 14px; border-radius: 10px; z-index: 20; }

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar .row { min-height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(139, 111, 232, 0.5); }

.topnav { display: flex; align-items: center; gap: 18px; font-size: 0.9rem; }
.topnav a { color: var(--text-secondary); }
.topnav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  background: var(--primary);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--primary-pressed); }
@media (max-width: 640px) { .topnav { display: none; } }

/* ------------------------------------------------------------------- hero */

.hero {
  padding: 56px 0 24px;
  background:
    radial-gradient(1000px 420px at 80% -10%, rgba(139, 111, 232, 0.28), transparent 60%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.accent { color: var(--primary); }

.lede { font-size: 1.05rem; max-width: 46ch; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { width: min(320px, 80%); filter: drop-shadow(0 20px 50px rgba(139, 111, 232, 0.35)); }
.speech {
  margin-top: 6px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 280px;
  text-align: center;
}

/* --------------------------------------------------------------- sections */

.section { padding: 56px 0; }
.section.alt { background: linear-gradient(180deg, #05040a 0%, #000 100%); border-block: 1px solid var(--border); }
.section-sub { margin-bottom: 26px; }

.tick { list-style: none; padding: 0; margin: 0 0 8px; }
.tick li { position: relative; padding-inline-start: 26px; margin-bottom: 8px; color: var(--text-secondary); }
.tick li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: var(--success);
  font-weight: 700;
}
.tick.small li { font-size: 0.92rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { color: var(--text); }
.card p { margin: 0; font-size: 0.95rem; }

.step-card { position: relative; padding-top: 26px; }
.step-num {
  position: absolute;
  top: -14px;
  inset-inline-start: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* ------------------------------------------------------------ price + buy */

.price-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 24px; align-items: start; }
@media (max-width: 880px) { .price-grid { grid-template-columns: 1fr; } }

.price-card {
  background: var(--surface-card);
  border: 1px solid rgba(139, 111, 232, 0.5);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 84px;
}
@media (max-width: 880px) { .price-card { position: static; } }

.plan-name { color: var(--primary); font-weight: 700; margin-bottom: 6px; }
.amount { display: flex; align-items: baseline; gap: 4px; color: var(--text); margin-bottom: 6px; }
.amount .num { font-size: 3rem; font-weight: 700; }
.amount .cur { font-size: 1.4rem; color: var(--text-secondary); }
.amount .per { font-size: 0.95rem; color: var(--text-muted); margin-inline-start: 6px; }
.price-note { font-size: 0.92rem; }

.buy-panel {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.method {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.method-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.method-head h3 { margin: 0 0 6px; }

.badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge-ok { color: var(--success); border-color: rgba(127, 217, 168, 0.45); background: rgba(127, 217, 168, 0.1); }
.badge-warn { color: var(--learning); border-color: rgba(240, 198, 116, 0.45); background: rgba(240, 198, 116, 0.1); }

.steps { margin: 0 0 12px; padding-inline-start: 20px; color: var(--text-secondary); font-size: 0.95rem; }
.steps li { margin-bottom: 8px; }
.copyable { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); direction: ltr; display: inline-block; }
.copy-mini {
  margin-inline-start: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.copy-mini:hover { color: var(--text); border-color: var(--primary); }

.hint { font-size: 0.85rem; color: var(--text-muted); margin: 10px 0 0; }
.error {
  font-size: 0.85rem;
  color: var(--error);
  background: rgba(232, 155, 155, 0.1);
  border: 1px solid rgba(232, 155, 155, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 10px;
}

.fineprint { font-size: 0.8rem; color: var(--text-muted); margin-top: 18px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-pressed); color: #fff; }
.btn-primary:disabled { background: #3a3556; color: var(--text-muted); cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--text); }
.btn.full { width: 100%; margin-top: 16px; }
.is-disabled { opacity: 0.5; pointer-events: none; }

/* -------------------------------------------------------------------- FAQ */

.faq details {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
.faq summary::marker { color: var(--primary); }
.faq details p { margin: 10px 0 0; font-size: 0.92rem; }

/* ---------------------------------------------------- recover + footer/nav */

.recover ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.recover a { font-size: 0.9rem; }

.footer { border-top: 1px solid var(--border); padding: 26px 0 40px; margin-top: 40px; }
.footer p { margin: 0; font-size: 0.85rem; }
.footer-links { display: flex; gap: 16px; }

/* ---------------------------------------------------------- success page */

.success { padding: 48px 0 72px; text-align: center; }
.success-art { width: min(220px, 60%); filter: drop-shadow(0 16px 40px rgba(139, 111, 232, 0.35)); }
.panel { margin-top: 18px; }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--learning); font-weight: 600; }
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(240, 198, 116, 0.35);
  border-top-color: var(--learning);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--surface-card);
  border: 1px dashed rgba(139, 111, 232, 0.55);
  border-radius: var(--radius);
  padding: 20px;
  margin: 18px 0;
}
.code-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1rem, 3.4vw, 1.4rem);
  letter-spacing: 0.06em;
  word-break: break-all;
  color: var(--success);
}

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .btn { transition: none; }
}
