/* =========================================================
   THE WISE — design tokens (bright theme)
   Palette: warm cream background, white surfaces, near-black text,
            gold (secondary accent — badges, borders, icons) and
            red (primary accent — CTAs, emphasis)
   Type: Bricolage Grotesque (display), Inter (body), IBM Plex Mono (prices)
   Signature: a numbered production strip (Design → Proof → Print →
              Deliver) instead of a diagram — a split hero with a
              catalog-style, image-forward services grid.
   ========================================================= */

:root {
  --bg: #FFF9EE;
  --surface: #FFFFFF;
  --surface-alt: #FFF2DC;
  --line: #EADCC0;
  --text: #201A12;
  --muted: #7C6F5A;
  --gold: #B8862A;
  --gold-soft: rgba(184, 134, 42, 0.14);
  --red: #B32A3B;
  --red-soft: rgba(179, 42, 59, 0.10);
  --danger: #B32A3B;

  /* kept for compatibility with older rules — same tokens, new meaning */
  --ink: var(--bg);
  --panel: var(--surface);
  --panel-2: var(--surface-alt);
  --paper: var(--text);
  --brass: var(--gold);
  --brass-soft: var(--gold-soft);
  --route: var(--red);

  --font-display: 'Bricolage Grotesque', 'Noto Sans Thai', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans Thai', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); margin: 0; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  position: sticky; top: 0;
  background: rgba(255, 249, 238, 0.92);
  backdrop-filter: blur(10px);
  z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--text); }
.logo-mark { flex-shrink: 0; }
.main-nav { display: flex; gap: 28px; font-size: 14px; color: var(--text); }
.main-nav a:hover { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin-right: 4px; }
.lang-switch a { padding: 5px 11px; font-size: 12px; font-family: var(--font-mono); border-radius: 999px; color: var(--muted); }
.lang-switch a.active { background: var(--text); color: var(--bg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  background: transparent; color: var(--text);
}
.btn-primary { background: var(--red); color: #FFFFFF; border-color: var(--red); box-shadow: 0 2px 6px rgba(179,42,59,0.25); }
.btn-primary:hover { background: #96222F; transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(179,42,59,0.5); }
.btn-outline { border-color: var(--gold); color: var(--text); }
.btn-outline:hover { background: var(--gold-soft); border-color: var(--gold); transform: translateY(-1px); }
.btn-ghost { border-color: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--red); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- Sections / type scale ---------- */
section { padding: 90px 0; }
.eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 11px; color: var(--red); margin: 0 0 12px;
}
h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
.lead, .section-lead { color: var(--muted); font-size: 17px; max-width: 620px; }

/* ---------- Hero — split layout, image right ---------- */
.hero { padding-top: 60px; padding-bottom: 50px; }
.hero .container.hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 50px; align-items: center; max-width: 1180px;
}
.hero-copy h1 { margin: 4px 0 18px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-visual svg { width: 100%; max-width: 440px; height: auto; }

/* Numbered production strip — replaces the old dashed diagram */
.process-strip { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process-strip .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding-top: 0; padding-bottom: 0; }
.process-step { padding: 34px 22px; border-right: 1px solid var(--line); }
.process-step:last-child { border-right: none; }
.process-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--text); color: var(--bg);
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.process-step strong { display: block; font-family: var(--font-display); font-size: 16px; margin-bottom: 4px; }
.process-step span { display: block; color: var(--muted); font-size: 13px; }

/* ---------- Service grid — catalog cards, image-forward ---------- */
.service-grid.catalog {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px;
}
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -18px rgba(32,26,18,0.22); border-color: var(--gold); }
.service-illustration {
  width: 100%; height: 168px; background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
}
/* Swap in a real photo later: replace the inner <svg> with an <img
   style="width:100%;height:100%;object-fit:cover"> — no other markup
   or CSS needs to change. */
.service-illustration svg { width: 66%; height: 66%; }
.service-illustration img { width: 100%; height: 100%; object-fit: cover; }
.service-card-body { padding: 22px 22px 24px; }
.service-card h3 { font-size: 17px; margin-bottom: 8px; }
.service-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Pricing ---------- */
.content-services.alt { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.pricing-grid.four-up { grid-template-columns: repeat(4, 1fr); }
.pricing-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px;
  position: relative; display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pricing-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px rgba(32,26,18,0.18); }
.content-services.alt .pricing-card { background: var(--surface); }
.pricing-card.featured { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.pricing-card .badge {
  position: absolute; top: -12px; left: 24px; background: var(--red); color: #FFFFFF;
  font-family: var(--font-mono); font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 600;
}
.pricing-card h3 { font-size: 18px; margin-bottom: 8px; }
.pricing-card > p:not(.price):not(.bonus) { color: var(--muted); font-size: 14px; }
.pricing-card .price { font-family: var(--font-mono); font-size: 24px; color: var(--text); margin: 16px 0 4px; }
.pricing-card .price span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pricing-card .bonus { color: var(--gold); font-size: 12px; font-family: var(--font-mono); }
.pricing-card ul { list-style: none; padding: 0; margin: 16px 0; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.pricing-card ul li::before { content: '—'; color: var(--gold); margin-right: 8px; }
.pricing-card ul li.no { color: #B3A88F; }
.pricing-card ul li.no::before { content: '—'; color: #B3A88F; }
.pricing-card .btn { margin-top: auto; }
.conversion { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ---------- Trust features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.feature-card { text-align: left; border-top: 2px solid var(--gold); padding-top: 16px; }
.feature-card .icon { font-size: 20px; color: var(--red); display: block; margin-bottom: 10px; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 40px; background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 320px; margin: 14px 0 10px; }
.footer-copy { color: var(--muted); font-size: 12px; }
.footer-legal { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 10px; max-width: 320px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 4px; }
.footer-col a { color: var(--text); font-size: 14px; }
.footer-col a:hover { color: var(--red); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-bottom: 20px; }
.page-hero.center { text-align: center; padding: 120px 0; }
.page-hero.center .lead { margin: 12px auto 28px; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 30px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 24px 0; }
.faq-item h3 { color: var(--text); font-size: 16px; margin-bottom: 8px; }
.faq-item p, .faq-item ol { color: var(--muted); font-size: 14px; margin: 0; }
.faq-item a { color: var(--red); }
.faq-cta { text-align: center; margin-top: 50px; }
.faq-cta h2 { margin-bottom: 20px; }

/* ---------- Auth ---------- */
.auth-page { display: flex; justify-content: center; padding: 80px 0; }
.auth-box { max-width: 420px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 36px; box-shadow: 0 20px 40px -28px rgba(32,26,18,0.2); }
.auth-box h1 { font-size: 26px; }
.auth-box .lead { font-size: 14px; margin: 6px 0 0; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-form input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px;
  color: var(--text); font-family: var(--font-body); font-size: 14px;
}
.auth-form input:focus { border-color: var(--red); }
#card-element { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px; }
.auth-switch { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--red); }
.form-error { background: var(--red-soft); border: 1px solid var(--danger); color: #7A1F29; font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-top: 18px; }

/* ---------- Bank transfer ---------- */
.bank-details { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-top: 22px; }
.bank-details h3 { font-size: 14px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 12px; }
.bank-details dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.bank-details dt { color: var(--muted); font-size: 13px; }
.bank-details dd { margin: 0; font-size: 14px; color: var(--text); }
.bank-details dd.mono { font-family: var(--font-mono); }
.bank-amount { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; }
.bank-amount strong { color: var(--red); font-family: var(--font-mono); font-size: 16px; }
.auth-form input[type="file"] {
  background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 14px;
  color: var(--muted); font-family: var(--font-body); font-size: 13px;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; margin-top: 30px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  color: var(--text); font-family: var(--font-body); font-size: 14px; resize: vertical;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.contact-info h3 { font-size: 14px; color: var(--gold); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; margin: 22px 0 4px; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Legal ---------- */
.legal-content { max-width: 780px; color: var(--muted); font-size: 15px; margin-top: 20px; }
.legal-content h2 { font-size: 19px; color: var(--text); margin-top: 34px; margin-bottom: 10px; }
.legal-content a { color: var(--red); }

/* ---------- Dashboard ---------- */
.dashboard-body { padding-top: 20px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; margin-bottom: 60px; }
.wallet-card, .topup-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.wallet-card .balance { font-family: var(--font-mono); font-size: 40px; color: var(--text); margin: 12px 0 4px; }
.wallet-card .balance span { font-size: 16px; color: var(--muted); }
.wallet-card .balance-usd { color: var(--muted); font-size: 13px; margin: 0; }
.topup-card h3 { font-size: 16px; margin-bottom: 16px; }
.topup-list { display: flex; flex-direction: column; gap: 10px; }
.topup-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.topup-row strong { display: block; font-size: 14px; color: var(--text); }
.topup-row span { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.topup-row-multi { flex-wrap: wrap; gap: 10px; }
.topup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topup-actions .btn { padding: 8px 14px; font-size: 13px; }
.order-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 14px; }
.order-table th { text-align: left; color: var(--muted); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.order-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.status { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-family: var(--font-mono); text-transform: capitalize; }
.status-paid { background: rgba(184,138,55,0.14); color: #7A5A17; }
.status-pending { background: var(--gold-soft); color: var(--gold); }
.status-failed { background: var(--red-soft); color: var(--red); }
.empty-state { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .container.hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .service-grid.catalog { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid, .pricing-grid.four-up { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner, .contact-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .process-strip .container { grid-template-columns: repeat(2, 1fr); }
  .process-step:nth-child(2) { border-right: none; }
}
@media (max-width: 640px) {
  .main-nav { display: none; }
  .service-grid.catalog, .pricing-grid, .pricing-grid.four-up, .feature-grid { grid-template-columns: 1fr; }
  .process-strip .container { grid-template-columns: 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid var(--line); }
  section { padding: 60px 0; }
  .auth-box { padding: 26px; }
}
