/*
 * SaphanBridge marketing site. Same palettes as the app (src/app/globals.css):
 * couples get forest green and copper, the Advisor section gets navy and gold.
 */
:root {
  --background: #fbf8f3;
  --surface: #ffffff;
  --foreground: #2b2419;
  --muted: #5d5446;
  --line: rgba(43, 36, 25, 0.12);
  --brand: #144f42;
  --brand-soft: #e7eee9;
  --accent: #b96a3c;
  --accent-soft: #f6ece4;
  --adv-bg: #172233;
  --adv-fg: #e6eaf0;
  --adv-muted: #b4bfcd;
  --adv-accent: #e8b341;
  --adv-card: #1f2e44;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121412;
    --surface: #1a1d1a;
    --foreground: #ede8df;
    --muted: #b5ad9f;
    --line: rgba(237, 232, 223, 0.14);
    --brand: #2f8c74;
    --brand-soft: #1b2a25;
    --accent: #e09a6c;
    --accent-soft: #2a201a;
    --adv-bg: #0f1318;
    --adv-card: #18202b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "IBM Plex Sans", "IBM Plex Sans Thai", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
:lang(th) body, body:lang(th) { line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}
.lead { font-size: 19px; color: var(--muted); }
.section h2 { font-size: clamp(26px, 4vw, 34px); margin-top: 8px; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head .lead { margin-top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 17px;
  text-decoration: none; border: 2px solid transparent; transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--foreground); background: var(--surface); }
.btn-line { background: #06c755; color: #fff; }
.btn-gold { background: var(--adv-accent); color: #172233; }
.btn-outline-light { border-color: rgba(230, 234, 240, .35); color: var(--adv-fg); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--brand); text-decoration: none; margin-right: auto; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 22px; font-size: 15px; }
.nav-links a { color: var(--foreground); text-decoration: none; }
.nav-links a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 14px; font-size: 15px; white-space: nowrap; }
.header-actions .lang { color: var(--foreground); text-decoration: none; }
.header-actions .btn { padding: 8px 16px; font-size: 15px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px; }
.hero::before, .hero::after {
  content: ""; position: absolute; right: -120px; width: 520px; height: 260px;
  border: 70px solid; border-left: 0; border-radius: 0 260px 260px 0; opacity: .5; pointer-events: none;
}
.hero::before { top: -60px; border-color: var(--brand-soft); transform: skewY(-12deg); }
.hero::after { bottom: -80px; border-color: var(--accent-soft); transform: skewY(12deg); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 54px); margin: 14px 0 18px; color: var(--foreground); }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 40px; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* Phone mock of "My case" */
.phone {
  justify-self: center; width: 100%; max-width: 330px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 34px; padding: 22px 18px 24px;
  box-shadow: 0 30px 60px -30px rgba(20, 79, 66, .45), 0 2px 6px rgba(0,0,0,.05);
}
.phone-top { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand); font-size: 15px; margin-bottom: 16px; }
.phone-top img { width: 22px; height: 22px; }
.phone h3 { font-size: 20px; margin-bottom: 12px; }
.mock-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 10px; background: var(--background); }
.score { display: flex; align-items: center; gap: 14px; }
.ring {
  --p: 82; width: 66px; height: 66px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0);
  display: grid; place-items: center;
}
.ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--background); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.score strong { display: block; font-size: 15px; }
.score small { color: var(--muted); font-size: 13px; }
.next { border: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); background: var(--brand-soft); }
.next .tag { font-size: 11px; letter-spacing: .1em; font-weight: 700; color: var(--brand); text-transform: uppercase; }
.next strong { display: block; margin: 4px 0 10px; font-size: 16px; }
.next .fake-btn { background: var(--brand); color: #fff; text-align: center; border-radius: 8px; padding: 8px; font-size: 14px; font-weight: 600; }
.bar-row { font-size: 13px; color: var(--muted); }
.bar-row strong { color: var(--foreground); font-size: 14px; display: block; }
.bar { height: 7px; border-radius: 4px; background: var(--line); display: flex; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; }

/* Trust strip */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.trust ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.trust svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
@media (max-width: 820px) { .trust ul { grid-template-columns: 1fr 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--brand); color: var(--brand); font-weight: 700; margin-bottom: 16px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface); }
.feature .icon { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 16px; }
.soon { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Visas */
.visas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.visa { border-radius: 18px; padding: 28px; border: 1px solid var(--line); background: var(--surface); }
.visa:first-child { border-top: 5px solid var(--brand); }
.visa:last-child { border-top: 5px solid var(--accent); }
.visa h3 { font-size: 22px; margin-bottom: 8px; }
.visa p { color: var(--muted); }
.visa ul { margin: 14px 0 0; padding-left: 20px; }
.visa li { margin: 4px 0; }
@media (max-width: 720px) { .visas { grid-template-columns: 1fr; } }

/* Advisors */
.advisors { background: var(--adv-bg); color: var(--adv-fg); }
.advisors .eyebrow { color: var(--adv-accent); }
.advisors .lead { color: var(--adv-muted); }
.advisors .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.adv-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.adv-points li { background: var(--adv-card); border-radius: 12px; padding: 16px 18px; display: flex; gap: 12px; }
.adv-points li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 9px; border-radius: 50%; background: var(--adv-accent); }
.adv-points strong { display: block; }
.adv-points span { color: var(--adv-muted); font-size: 15px; }
@media (max-width: 860px) { .advisors .wrap { grid-template-columns: 1fr; } }

/* Privacy */
.privacy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.privacy div { padding: 20px; border-radius: 14px; background: var(--brand-soft); }
.privacy strong { display: block; font-size: 17px; margin-bottom: 4px; color: var(--brand); }
.privacy p { font-size: 15px; }
@media (max-width: 900px) { .privacy { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .privacy { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--muted); }

/* Closing CTA */
.closing { text-align: center; background: var(--brand); color: #fff; border-radius: 24px; padding: 56px 24px; }
.closing h2 { color: #fff; }
.closing p { color: rgba(255,255,255,.85); margin: 12px auto 26px; max-width: 520px; }
.closing .btn-primary { background: #fff; color: #144f42; }
.closing .cta-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 15px; color: var(--muted); margin-top: 72px; }
.site-footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer nav a { color: var(--foreground); }
.site-footer .disclaimer { margin-top: 20px; max-width: 760px; }

/* Thai has no capitals, and letter-spacing pulls its vowel marks apart. */
:lang(th) .eyebrow, :lang(th) .soon, :lang(th) .next .tag { letter-spacing: 0; text-transform: none; font-size: 14px; }
.nowrap { white-space: nowrap; }
@media (max-width: 400px) {
  .site-header .wrap { gap: 10px; }
  .brand { font-size: 18px; gap: 8px; }
  .header-actions { gap: 10px; }
}
