/* UniTalk website. Colours mirror unitalk-app/lib/theme/tokens.dart; never type a hex value below :root. */

@font-face { font-family: "Be Vietnam Pro"; src: url("/assets/fonts/BeVietnamPro-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/assets/fonts/BeVietnamPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("/assets/fonts/BeVietnamPro-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  /* colours (tokens.dart) */
  --paper: #FFFAF3;
  --surface: #FFFFFF;
  --ink: #241C15;
  --muted: #6B5F53;
  --line: #E8DDCF;
  --line-soft: #F1E7DA;
  --chip: #F6EEE3;
  --on-ink: #FFFFFF;
  --sun: #FFC83D;
  --sun-light: #FFE7A3;
  --sun-wash: #FFF3CF;
  --sun-ink: #7A4A00;
  --sun-deep-ink: #4D3A1F;
  --coral-soft: #FFD9CC;
  --coral-ink: #8A3A1E;
  --lilac-soft: #EDE7FF;
  --lilac-ink: #4B3A8F;
  --mint-soft: #DFF4EA;
  --mint-ink: #1F6B4A;
  --danger-ink: #9C2F33;
  --night: #1C1712;
  --night-text: #FFFAF3;
  --night-muted: #B8AA99;
  --night-accent: #FFD970;

  /* type scale: app steps (caption..hero) plus two web-only display steps */
  --caption: 0.75rem;   /* 12 */
  --small: 0.8125rem;   /* 13 */
  --body: 1rem;         /* 16: web body is one step up from the app's 15 */
  --lead: 1.125rem;     /* 18 */
  --title: 1.375rem;    /* 22 */
  --display: clamp(1.75rem, 4.5vw, 2.5rem);
  --hero: clamp(2.4rem, 9vw, 5.5rem);

  --line-tight: 1.15;   /* Vietnamese diacritics: never lower */
  --line-normal: 1.35;
  --line-loose: 1.6;

  --radius: 24px;
  --radius-pill: 999px;
  --gutter: 16px;
  --max: 1120px;
  --text-max: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--body);
  line-height: var(--line-loose);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--sun-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: var(--line-tight); margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* header */
.site-header { position: relative; z-index: 1; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: var(--title); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.lang-switch { display: inline-flex; gap: 4px; background: var(--chip); border-radius: var(--radius-pill); padding: 4px; font-size: var(--small); font-weight: 700; }
.lang-switch a, .lang-switch span { padding: 6px 12px; border-radius: var(--radius-pill); text-decoration: none; color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.lang-switch [aria-current] { background: var(--surface); box-shadow: 0 1px 2px rgba(36, 28, 21, 0.12); }

/* hero */
/* The hero slides up under the transparent header so its clipped circles reach the top of the page. */
.hero { text-align: center; margin-top: -76px; padding: 100px 0 56px; position: relative; isolation: isolate; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.hero::before { width: 520px; height: 520px; background: var(--sun-light); right: -220px; top: -260px; }
.hero::after { width: 300px; height: 300px; background: var(--coral-soft); left: -170px; top: 220px; opacity: 0.8; }
.hero h1 { font-size: var(--hero); font-weight: 800; max-width: 11.5em; margin: 8px auto 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--sun) 62%); padding: 0 0.08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .sub { font-size: var(--lead); color: var(--muted); max-width: 34rem; margin: 0 auto 28px; }
.hero-art { width: min(560px, 100%); margin: 0 auto 8px; }

.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px; border-radius: var(--radius-pill); background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: var(--lead); text-decoration: none; }
.cta:hover { color: var(--on-ink); background: var(--sun-deep-ink); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; padding: 0; list-style: none; }
.store { display: inline-flex; align-items: center; gap: 8px; border: 2px dashed var(--line); border-radius: var(--radius-pill); padding: 8px 16px; font-size: var(--small); font-weight: 700; color: var(--muted); background: var(--surface); }
.store svg { width: 18px; height: 18px; flex: none; }

/* sections */
.section { padding: 64px 0; }
.section h2 { font-size: var(--display); font-weight: 800; text-align: center; margin-bottom: 12px; }
.section .lede { text-align: center; color: var(--muted); max-width: 36rem; margin: 0 auto 36px; font-size: var(--lead); }
.band { background: var(--surface); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.steps { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.band .step { background: var(--paper); }
.step-art { width: 88px; height: 88px; margin-bottom: 14px; }
.step h3 { font-size: var(--title); font-weight: 800; }
.step h3::before { counter-increment: step; content: counter(step) ". "; color: var(--sun-ink); }
.step p { color: var(--muted); margin: 0; }

.safety { display: grid; gap: 16px; }
@media (min-width: 768px) { .safety { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; } .safety h2, .safety .lede { text-align: left; margin-left: 0; } }
.safe-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.safe-list li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.safe-list strong { display: block; }
.safe-list span { color: var(--muted); font-size: var(--body); }
.dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.dot.mint { background: var(--mint-soft); color: var(--mint-ink); }
.dot.lilac { background: var(--lilac-soft); color: var(--lilac-ink); }
.dot.coral { background: var(--coral-soft); color: var(--coral-ink); }
.dot.sun { background: var(--sun-wash); color: var(--sun-deep-ink); }
.people { width: min(440px, 100%); margin: 0 auto; }

.faq { max-width: var(--text-max); margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: var(--lead); padding: 14px 32px 14px 0; position: relative; list-style: none; line-height: var(--line-normal); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: var(--title); color: var(--sun-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

.closing { text-align: center; background: var(--sun); padding: 64px 0; }
.closing h2 { font-size: var(--display); font-weight: 800; color: var(--ink); max-width: 18ch; margin: 0 auto 20px; }
.closing p { color: var(--sun-deep-ink); }

/* footer */
.site-footer { background: var(--night); color: var(--night-text); padding: 48px 0 32px; font-size: var(--body); }
.site-footer a { color: var(--night-text); }
.site-footer a:hover { color: var(--night-accent); }
.site-footer .brand { color: var(--night-text); }
.foot-brand p:first-of-type { margin-top: 12px; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot-grid h2 { font-size: var(--small); text-transform: uppercase; letter-spacing: 0.08em; color: var(--night-accent); margin-bottom: 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.foot-grid li a { display: inline-block; padding: 6px 0; }
.foot-note { color: var(--night-muted); font-size: var(--small); margin-top: 32px; border-top: 1px solid rgba(255, 250, 243, 0.14); padding-top: 20px; }
.foot-note a { color: var(--night-muted); }

/* legal / support pages */
.doc { padding: 24px 0 72px; }
.doc .wrap { max-width: calc(var(--text-max) + 2 * var(--gutter)); }
.doc h1 { font-size: var(--display); font-weight: 800; margin-top: 12px; }
.doc h2 { font-size: var(--title); font-weight: 800; margin-top: 2em; }
.doc h3 { font-size: var(--lead); font-weight: 700; margin-top: 1.5em; }
.doc ul, .doc ol { padding-left: 1.25em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.4em; }
.draft { background: var(--sun-wash); color: var(--sun-deep-ink); border: 1px solid var(--sun-light); border-radius: 14px; padding: 12px 16px; font-size: var(--small); margin-bottom: 24px; }
.draft strong { color: var(--ink); }
.placeholder { background: var(--coral-soft); color: var(--coral-ink); border-radius: 6px; padding: 0 6px; font-weight: 700; }
.table-scroll { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.doc table { border-collapse: collapse; width: 100%; font-size: var(--small); line-height: var(--line-normal); min-width: 560px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.doc th { background: var(--chip); font-weight: 700; }
.doc tr:last-child td { border-bottom: 0; }
.callout { background: var(--mint-soft); color: var(--mint-ink); border-radius: 14px; padding: 14px 16px; margin: 0 0 1.25em; }
.callout strong { color: var(--ink); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 8px; font-size: var(--small); }
.toc ol { margin: 0; }
.steps-inline { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-inline li { counter-increment: s; display: flex; gap: 12px; align-items: baseline; }
.steps-inline li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 800; display: inline-grid; place-items: center; font-size: var(--small); }
.contact-cards { display: grid; gap: 12px; margin-bottom: 1.5em; }
@media (min-width: 768px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.contact-card strong { display: block; margin-bottom: 4px; }

.notfound { text-align: center; padding: 48px 0 96px; }
.notfound h1 { font-size: var(--hero); font-weight: 800; }

@media print {
  .site-header nav, .site-footer, .skip { display: none; }
  body { background: var(--surface); }
}
@media (prefers-reduced-motion: no-preference) {
  .cta { transition: background-color 0.15s ease; }
}
