/* ============ AIEscaper English — Anthropic Design System ============ */
/* Based on Claude.ai / Anthropic brand */
:root {
  /* Surface */
  --canvas: #faf9f5;
  --surface-soft: #f5f0e8;
  --surface-card: #efe9de;
  --surface-cream-strong: #e8e0d2;
  --surface-dark: #181715;
  --surface-dark-elevated: #252320;
  --surface-dark-soft: #1f1e1b;

  /* Brand */
  --coral: #cc785c;
  --coral-active: #a9583e;
  --coral-disabled: #e6dfd8;
  --teal: #5db8a6;
  --amber: #e8a55a;
  --green: #5db872;
  --red: #c64545;

  /* Text */
  --ink: #141413;
  --body-strong: #252523;
  --body: #3d3d3a;
  --muted: #6c6a64;
  --muted-soft: #8e8b82;
  --on-dark: #faf9f5;
  --on-coral: #ffffff;

  /* Borders */
  --hairline: #e6dfd8;
  --border-soft: rgba(0,0,0,0.06);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-elevated: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);

  /* Spacing */
  --section: 96px;
  --card-pad: 32px;

  /* Typography */
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}
/* Subtle warm gradient — same as Chinese version, lower opacity */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 480px at 14% 4%,  rgba(255,180,140,0.18), transparent 60%),
    radial-gradient(680px 520px at 86% 0%,  rgba(255,160,120,0.14), transparent 58%),
    radial-gradient(720px 600px at 80% 74%, rgba(255,210,160,0.13), transparent 60%),
    radial-gradient(660px 560px at 6% 90%,  rgba(255,180,150,0.12), transparent 58%),
    linear-gradient(180deg, #faf9f5, #f6f2ed);
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
h1 { font-size: clamp(36px, 4.5vw, 56px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.5vw, 42px); letter-spacing: -0.02em; }
h3 { font-size: 22px; letter-spacing: -0.01em; font-weight: 500; }
h4 { font-size: 18px; letter-spacing: -0.005em; font-weight: 500; }
p { margin: 0; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }

/* ===== Layout ===== */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.block { padding: var(--section) 0; }
.block-head { margin-bottom: 48px; }
.block-head.center { text-align: center; }
.block-head p { font-size: 16px; color: var(--muted); max-width: 560px; margin: 12px auto 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 16px;
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 56px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 400; color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-logo .mark {
  display: inline-flex; width: 26px; height: 26px;
  align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 700; color: var(--on-coral);
  background: var(--coral); border-radius: 6px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

.lang-pill {
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 4px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  transition: all .15s;
}
.lang-pill:hover { background: var(--surface-card); color: var(--ink); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-family: var(--font-body);
  font-weight: 500; text-decoration: none;
  transition: background .15s, transform .15s;
}
.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-sm); }
.btn-primary {
  background: var(--coral); color: var(--on-coral);
}
.btn-primary:hover { background: var(--coral-active); }
.btn-secondary {
  background: var(--surface-card); color: var(--ink);
}
.btn-secondary:hover { background: var(--surface-cream-strong); }
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--hairline);
}
.btn-ghost:hover { background: var(--surface-card); }

/* ===== Hero ===== */
.hero { padding: 100px 0 80px; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-sub {
  font-size: 18px; color: var(--body); line-height: 1.6;
  margin: 20px 0 32px; max-width: 580px; margin-left: auto; margin-right: auto;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-price {
  margin-top: 24px; font-size: 14px; color: var(--muted-soft);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hero-price .pp { font-size: 16px; font-weight: 600; color: var(--ink); }
.hero-price .strike { text-decoration: line-through; }
.trust-row {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  margin-top: 32px; font-size: 13px; color: var(--muted);
}
.trust-row .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-right: 6px; }

/* ===== Pricing Cards ===== */
.plan-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
}
.plan-scroll-wrap::-webkit-scrollbar { display: none; }
.plan-scroll-inner {
  display: flex; gap: 20px; justify-content: center;
}
.plan-card {
  flex: 0 0 340px;
  scroll-snap-align: center;
  border-radius: var(--radius-md);
  padding: var(--card-pad);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.plan-card:hover { box-shadow: var(--shadow-elevated); transform: translateY(-1px); }
.plan-card.featured {
  border: 1.5px solid var(--coral);
  box-shadow: var(--shadow-card);
}
.plan-card .tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-pill);
  margin-bottom: 16px; align-self: flex-start;
}
.plan-card .tag.starter { background: var(--surface-card); color: var(--muted); }
.plan-card .tag.best { background: var(--coral); color: var(--on-coral); }
.plan-card .tag.prem { background: var(--surface-dark); color: var(--on-dark); }
.plan-card h3 { font-size: 26px; margin: 0 0 6px; }
.plan-card .subtitle { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.plan-card .price-row { display: flex; align-items: baseline; gap: 2px; margin-bottom: 6px; }
.plan-card .price-row .c { font-size: 18px; font-weight: 500; color: var(--ink); }
.plan-card .price-row .amt { font-family: var(--font-display); font-size: 44px; font-weight: 400; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.plan-card .price-row .per { font-size: 14px; color: var(--muted); }
.plan-card .ref { font-size: 13px; color: var(--muted-soft); margin-bottom: 24px; }
.plan-card .feat-list { list-style: none; padding: 0; margin: 0 0 auto; flex: 1; }
.plan-card .feat-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; font-size: 14px; color: var(--body); line-height: 1.5;
}
.plan-card .feat-list li:first-child { padding-top: 0; }
.plan-card .feat-list .check { color: var(--green); font-weight: 600; flex: none; margin-top: 1px; }
.plan-card .btn-cta {
  display: flex; align-items: center; justify-content: center;
  margin-top: 24px; padding: 13px 0; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  color: var(--on-coral); background: var(--coral);
  text-decoration: none; transition: background .15s;
}
.plan-card .btn-cta:hover { background: var(--coral-active); }
.plan-card .hint { text-align: center; font-size: 12px; color: var(--muted-soft); margin-top: 10px; }

/* ===== Stats ===== */
.stats-row {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 24px;
}
.stat-item { text-align: center; padding: 20px 0; }
.stat-item .big {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 400; color: var(--ink);
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.stat-item .label { font-size: 13px; color: var(--muted); }

/* ===== Payment badges ===== */
.pay-row { text-align: center; margin-top: 44px; }
.pay-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; padding: 7px 14px; margin: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--body);
  border: 1px solid var(--hairline);
}
.pay-pill .sq { width: 8px; height: 8px; border-radius: 2px; }
.pay-note { font-size: 13px; color: var(--muted-soft); margin-top: 10px; }

/* ===== Guarantee ===== */
.guarantee-row {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 48px; text-align: center;
}
.guarantee-row .g b { display: block; font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.guarantee-row .g span { font-size: 13px; color: var(--muted); }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
.step .n {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 400; color: var(--coral);
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.step h4 { font-size: 18px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ===== FAQ ===== */
.faq { max-width: 680px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--hairline); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 20px 0; font-family: var(--font-body); font-size: 15px; font-weight: 500;
  color: var(--ink); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-q .pm { font-size: 18px; color: var(--muted-soft); font-weight: 400; }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a .inner { padding: 0 0 20px; font-size: 14px; color: var(--body); line-height: 1.7; }

/* ===== CTA band (dark) ===== */
.cta-dark {
  background: var(--surface-dark); color: var(--on-dark);
  padding: 80px 0; text-align: center;
}
.cta-dark h2 { color: var(--on-dark); }
.cta-dark p { color: var(--muted-soft); font-size: 16px; margin: 12px 0 28px; }

/* ===== Footer ===== */
.footer {
  background: var(--surface-dark); color: var(--muted-soft);
  padding: 48px 0;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; font-size: 13px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted-soft); transition: color .15s; }
.footer-links a:hover { color: var(--on-dark); }
.footer .nav-logo { color: var(--on-dark); }

/* ===== Auth pages ===== */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 28px;
}
.auth-card {
  width: 100%; max-width: 440px;
  padding: var(--card-pad);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}
.auth-card .logo-sm {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 20px; color: var(--ink);
  margin-bottom: 24px;
}
.auth-card .logo-sm .mark {
  display: inline-flex; width: 28px; height: 28px;
  align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 700; color: var(--on-coral);
  background: var(--coral); border-radius: 6px;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 400; color: var(--ink);
  margin-bottom: 4px; letter-spacing: -0.02em;
}
.auth-card .sub {
  font-size: 14px; color: var(--muted); margin-bottom: 24px;
}
.auth-card .form-group { margin-bottom: 18px; }
.auth-card .form-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--ink); margin-bottom: 6px;
}
.auth-card .form-group input[type=email],
.auth-card .form-group input[type=text],
.auth-card .form-group input[type=password],
.auth-card .form-group input[type=number],
.auth-card .form-group select {
  width: 100%; height: 44px; padding: 0 14px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s;
}
.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(204,120,92,0.1);
}
.auth-card .btn { width: 100%; height: 44px; }
.auth-card .auth-footer {
  text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted);
}
.auth-card .auth-footer a { color: var(--coral); font-weight: 500; }
.auth-card .msg {
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 16px; display: none;
}
.auth-card .msg.success {
  display: block; color: #15803d;
  background: rgba(93,184,114,0.08); border: 1px solid rgba(93,184,114,0.15);
}
.auth-card .msg.error {
  display: block; color: #b91c1c;
  background: rgba(198,69,69,0.06); border: 1px solid rgba(198,69,69,0.12);
}

/* Signup plan select */
.plan-radio-label {
  display: block; padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--canvas);
  cursor: pointer; text-align: center;
  transition: all .15s;
}
.plan-radio-label:hover { border-color: var(--coral); }
.plan-radio-label.active {
  border-color: var(--coral);
  background: rgba(204,120,92,0.04);
}

/* Dashboard sidebar overrides */
.dash-body { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex: none;
  background: var(--surface-soft);
  border-right: 1px solid var(--hairline);
  padding: 24px 16px;
  display: flex; flex-direction: column;
}
.sidebar .side-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 18px; color: var(--ink);
  margin-bottom: 32px; text-decoration: none;
}
.sidebar .side-logo .mark {
  display: inline-flex; width: 26px; height: 26px;
  align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700; color: var(--on-coral);
  background: var(--coral); border-radius: 6px;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--muted);
  text-decoration: none; transition: all .15s;
}
.side-nav a:hover { background: var(--surface-card); color: var(--ink); }
.side-nav a.active { background: var(--surface-card); color: var(--ink); font-weight: 600; }
.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--hairline);
  font-size: 13px;
}
.side-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-cream-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--ink); flex: none;
}
.side-logout {
  margin-left: auto; background: none; border: none;
  font-size: 12px; color: var(--muted-soft); cursor: pointer;
}
.main { flex: 1; padding: 40px; overflow-y: auto; }
.topbar { margin-bottom: 32px; }
.topbar h2 { font-family: var(--font-display); font-size: 28px; }
.greet { font-size: 14px; color: var(--muted); margin-top: 4px; }

.stats-row-dash { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
  padding: 20px; border-radius: var(--radius-sm);
  background: var(--canvas); border: 1px solid var(--hairline);
}
.stat-card .stat-label { font-size: 12px; font-weight: 500; color: var(--muted-soft); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 32px; font-weight: 400; color: var(--ink); letter-spacing: -0.02em; }
.stat-card .stat-sub { font-size: 12px; color: var(--muted-soft); margin-top: 2px; }

.section { margin-bottom: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h3 { font-family: var(--font-display); font-size: 22px; }
.badge-count { font-size: 13px; color: var(--muted); }

.sub-list { display: flex; flex-direction: column; gap: 12px; }
.sub-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--canvas); border: 1px solid var(--hairline);
}
.sub-icon {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
}
.sub-icon.claude { background: var(--coral); }
.sub-icon.gpt { background: #0a84ff; }
.sub-info { flex: 1; min-width: 0; }
.sub-info .sub-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.sub-info .sub-meta { font-size: 12px; color: var(--muted-soft); margin-top: 2px; }
.sub-status { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); }
.sub-status.active { color: #15803d; background: rgba(93,184,114,0.08); }
.sub-status.expired { color: #b91c1c; background: rgba(198,69,69,0.06); }
.sub-status.pending { color: #92400e; background: rgba(232,165,90,0.08); }
.sub-expiry { text-align: right; flex: none; }
.sub-expiry .days { font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.sub-expiry .label { font-size: 11px; color: var(--muted-soft); }

.empty { text-align: center; padding: 48px 0; }
.empty-icon { font-size: 36px; margin-bottom: 12px; }
.empty h4 { font-family: var(--font-display); font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.empty p { font-size: 14px; color: var(--muted); }

.buy-panel { border-radius: var(--radius-md); background: var(--canvas); border: 1px solid var(--hairline); overflow: hidden; }
.panel-inner { padding: var(--card-pad); }

.plan-select { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 20px; }
.plan-select input[type=radio] { display: none; }
.plan-select label {
  display: block; padding: 12px; text-align: center;
  border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--hairline); background: var(--canvas);
  transition: all .15s;
}
.plan-select label:hover { border-color: var(--coral); }
.plan-select input:checked + label { border-color: var(--coral); background: rgba(204,120,92,0.04); }
.plan-select .plan-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.plan-select .plan-price { font-size: 12px; color: var(--muted); margin-top: 2px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field input {
  width: 100%; height: 42px; padding: 0 12px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); outline: none;
}
.field input:focus { border-color: var(--coral); }

.total { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; margin: 16px 0; border-top: 1px solid var(--hairline); }
.total span:first-child { font-size: 14px; color: var(--muted); }
.total .price { font-family: var(--font-display); font-size: 24px; font-weight: 400; color: var(--ink); }

.note { font-size: 12px; color: var(--muted-soft); margin-top: 12px; text-align: center; }

.buy-form .btn-primary { width: 100%; height: 44px; margin-top: 8px; }

.page { display: block; }
.page[style*="display:none"] { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .plan-scroll-inner { justify-content: flex-start; padding: 0 20px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: 1fr; }
  .guarantee-row { grid-template-columns: 1fr; }
  :root { --section: 64px; }
  .hero { padding: 60px 0 48px; }
}
@media (max-width: 480px) {
  .plan-card { flex: 0 0 300px; --card-pad: 24px; }
  .wrap { padding: 0 16px; }
}
