/* Vetraxs Core — shared across pricing/checkout/verify/register/login/account pages */

:root {
  --bg:             #e8e3d7;
  --bg-raised:      #f2ede1;
  --bg-soft:        #ddd7c8;
  --bg-muted:       #d3cdbd;
  --bg-accent:      #2b3a4a;
  --bg-dark:        #1e2836;
  --border:         #c7c1b2;
  --border-strong:  #a8a293;
  --border-accent:  #5e7187;
  --ink:            #1c1f23;
  --ink-dim:        #4a4f58;
  --ink-muted:      #787d85;
  --ink-muted-fix:  #696d75;
  --ink-light:      #f2ede1;
  --ink-light-dim:  rgba(242,237,225,0.82);
  --accent:         #1c3a5e;
  --accent-hover:   #12284a;
  --accent-soft:    #d6dce7;
  --accent-deep:    #0e2040;
  --accent-2:       #c46a3d;
  --accent-2-soft:  #ecd4c2;
  --success:        #3b6b4a;
  --warning:        #b37828;
  --danger:         #96372d;
  --chip-bg:        #e4ded0;
  --chip-border:    #bfb7a5;
  --chip-text:      #1c3a5e;

  --font-serif: 'Fraunces', 'Noto Serif TC', serif;
  --font-sans:  'Inter', 'Noto Sans TC', -apple-system, system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --type-hero:    clamp(44px, 4vw + 1rem, 84px);
  --type-section: clamp(32px, 2vw + 1.2rem, 50px);
  --type-sub:     clamp(22px, 0.6vw + 1.1rem, 28px);
  --type-lead:    clamp(16px, 0.2vw + 0.9rem, 18px);

  --lh-tight: 1.04; --lh-snug: 1.12; --lh-comfy: 1.24;
  --lh-relaxed: 1.65; --lh-loose: 1.78;
  --ls-tight: -0.025em; --ls-snug: -0.018em; --ls-label: 0.20em;

  --rw-prose: 62ch;

  --stack-eyebrow-to-title: 14px;
  --stack-title-to-sub:     12px;
  --stack-sub-to-content:   40px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.04), 0 0 0 1px rgba(10, 22, 40, 0.04);
  --shadow-md: 0 4px 16px rgba(10, 22, 40, 0.06), 0 0 0 1px rgba(10, 22, 40, 0.04);
  --shadow-lg: 0 20px 60px rgba(10, 22, 40, 0.10), 0 0 0 1px rgba(10, 22, 40, 0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }

html[dir="rtl"] body { font-family: 'Inter', 'Noto Naskh Arabic', system-ui, sans-serif; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; hyphens: auto; }

section { padding: 96px 32px; position: relative; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-narrow { max-width: 720px; margin: 0 auto; }
.center { text-align: center; }

.eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); display: inline-block;
}
.eyebrow::before { content: '— '; color: var(--accent-2); font-weight: 700; }
.h-display {
  font-family: var(--font-serif); font-weight: 600;
  line-height: 1.08; letter-spacing: var(--ls-snug);
  font-variation-settings: "opsz" 144;
}
h1.h-display { font-size: var(--type-hero); line-height: var(--lh-tight); letter-spacing: var(--ls-tight); }
h2.h-display { font-size: clamp(32px, 3.6vw, 48px); margin-top: var(--stack-eyebrow-to-title); }
.lead {
  margin-top: var(--stack-title-to-sub); max-width: var(--rw-prose);
  font-size: var(--type-lead); color: var(--ink-dim); line-height: var(--lh-relaxed);
}
.center .lead { margin-left: auto; margin-right: auto; }

html[lang^="zh"], html[lang^="ja"], html[lang^="ko"] { --rw-prose: 32em; }

/* ═══════════ Nav ═══════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 32px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(232, 227, 215, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand a { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: 28px; width: auto; }
.nav-brand-text {
  font-family: var(--font-sans); font-weight: 700; font-size: 16px;
  letter-spacing: 0.16em; color: var(--ink);
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-dim); letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s; padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-switcher { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: transparent;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--ink-dim); cursor: pointer;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.10em;
  transition: all 0.15s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn svg { width: 12px; height: 12px; opacity: 0.6; }
.lang-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 200px; max-height: 400px; overflow-y: auto;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); z-index: 100;
}
.lang-switcher.open .lang-menu { display: block; }
.lang-item {
  padding: 9px 12px; font-size: 13px; color: var(--ink);
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 10px;
}
.lang-item:hover { background: var(--bg-soft); }
.lang-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.lang-item-code { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 0.06em; }
.lang-item.active .lang-item-code { color: var(--accent); }
.nav-signin {
  padding: 7px 14px; color: var(--ink-dim);
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.10em;
  text-transform: uppercase; border: 1px solid transparent;
  border-radius: var(--radius-sm); transition: all 0.15s;
}
.nav-signin:hover { color: var(--accent); border-color: var(--border-strong); }
.nav-cta {
  padding: 8px 16px; background: var(--accent); color: var(--ink-light);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  font-family: var(--font-sans); transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-hover); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { padding: 12px 20px; }
}

/* ═══════════ Buttons ═══════════ */
.btn {
  padding: 13px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--ink-light); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ═══════════ Forms ═══════════ */
.form-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
.form-field { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: 500;
}
.form-label .required { color: var(--accent-2); margin-left: 2px; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 14px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 14.5px; line-height: 1.5;
  transition: border-color 0.15s, background 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--accent); background: var(--bg-raised);
}
.form-input.mono { font-family: var(--font-mono); letter-spacing: 0.05em; }
.form-textarea { min-height: 100px; resize: vertical; }
.form-help { margin-top: 6px; font-size: 12.5px; color: var(--ink-muted-fix); line-height: 1.5; }
.form-error { margin-top: 6px; font-size: 12.5px; color: var(--danger); line-height: 1.5; }
.form-success {
  padding: 14px 16px; background: rgba(59, 107, 74, 0.1);
  border: 1px solid rgba(59, 107, 74, 0.3); border-radius: var(--radius-sm);
  color: var(--success); font-size: 14px; line-height: 1.55;
}
.form-notice {
  padding: 14px 16px; background: rgba(196, 106, 61, 0.08);
  border: 1px solid rgba(196, 106, 61, 0.25); border-radius: var(--radius-sm);
  color: var(--ink); font-size: 13.5px; line-height: 1.55;
  margin-bottom: 20px;
}
.form-notice strong { color: var(--accent-2); font-weight: 600; }
.form-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.form-checkbox input { margin-top: 4px; }

/* ═══════════ Auth split — editorial two-column ═══════════ */
.auth-split {
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(320px, 1fr);
  gap: 48px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; gap: 32px; }
}
.auth-pane {
  padding: 40px 34px;
  background: var(--bg-accent);
  color: var(--ink-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.auth-pane::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-2) 0%, transparent 100%);
}
.auth-pane-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e89870;
  font-weight: 600;
}
.auth-pane-title {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.28;
  color: var(--ink-light);
  text-wrap: balance;
}
.auth-pane-body {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(242,237,225,0.88);
  max-width: 38ch;
}
html[lang^="zh"] .auth-pane-body,
html[lang^="ja"] .auth-pane-body,
html[lang^="ko"] .auth-pane-body { max-width: 22em; line-height: 1.8; }

.auth-pane-list {
  list-style: none;
  margin-top: 28px;
  padding: 0;
}
.auth-pane-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(242,237,225,0.82);
}
.auth-pane-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.auth-pane-list strong {
  display: block;
  color: var(--ink-light);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.auth-pane-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(232,151,112,0.15);
  color: #e89870;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 700;
}
.auth-pane-footnote {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255,255,255,0.12);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232,151,112,0.7);
}

/* Auth page form card tweak — stronger hierarchy */
.auth-form-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.auth-form-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
}
.auth-form-inner { padding: 36px 34px; }
.auth-form-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.auth-form-header .eyebrow { font-size: 10.5px; letter-spacing: 0.24em; }
.auth-form-header h2 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.18;
  text-wrap: balance;
}
.auth-form-header p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-dim);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ═══════════ Page hero ═══════════ */
.page-hero {
  padding: 96px 32px 40px; position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(28, 58, 94, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(196, 106, 61, 0.04) 0%, transparent 55%),
    var(--bg);
}
.page-hero .section-inner { text-align: center; }
/* lead is a block with max-width, needs explicit auto margins to center */
.page-hero .lead, .page-hero h1.h-display {
  margin-left: auto; margin-right: auto;
  text-wrap: balance;
}
/* Hero lead width — balance works better with a narrower box */
.page-hero .lead { max-width: 58ch; }
html[lang^="zh"] .page-hero .lead,
html[lang^="ja"] .page-hero .lead,
html[lang^="ko"] .page-hero .lead {
  max-width: 28em;           /* CJK: ~28 glyphs/line × up to 3 lines */
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
}

/* ═══════════ Footer ═══════════ */
footer {
  padding: 60px 32px 36px;
  background: var(--bg-dark); color: var(--ink-light-dim);
  border-top: 1px solid var(--border);
}
footer a { color: inherit; }
footer a:hover { color: var(--ink-light); }
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-brand-text { font-size: 18px; font-weight: 700; color: var(--ink-light); letter-spacing: 0.16em; }
.footer-tagline { margin-top: 12px; font-size: 13.5px; max-width: 38ch; line-height: 1.6; }
.footer-col-title {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 18px; font-weight: 600;
}
.footer-col-links { display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a { font-size: 13.5px; line-height: 1.5; transition: color 0.15s; }
.footer-bottom {
  max-width: 1180px; margin: 40px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; color: rgba(242,237,225,0.5);
  letter-spacing: 0.1em;
}
