:root {
    --yellow: #F2E030;
    --yellow-deep: #E0C21C;
    --night: #0B1322;
    --night-soft: #121D31;
    --ink: #0B1322;
    --ink-soft: rgba(11,19,34,0.68);
    --paper: #F5F2E6;
    --paper-soft: #FBF9F1;
    --border: rgba(11,19,34,0.18);
    --danger: #a3271a;
    --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', 'Noto Sans Thai', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
h1, h2, h3, .btn, .chip, .eyebrow, .subhead, .region-grid li {
    font-family: 'Big Shoulders Display', 'Noto Sans Thai', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
}
/* Thai has no case and the display face has no Thai glyphs: switch to Noto. */
html[lang="th"] h2, html[lang="th"] h3, html[lang="th"] .btn, html[lang="th"] .chip,
html[lang="th"] .subhead, html[lang="th"] .region-grid li {
    font-family: 'Noto Sans Thai', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
html[lang="th"] body { font-family: 'Noto Sans Thai', 'Inter', sans-serif; }
a { color: var(--ink); }
img { max-width: 100%; display: block; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.hero-body, .regions p, .field-help, .check-field-text { overflow-wrap: anywhere; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--yellow); padding: 8px 14px; }
.skip-link:focus { left: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--night); color: #fff; overflow: hidden; }
.hero-art {
    position: absolute; inset: -4%;
    background: url('mtx-key-art.jpg') center 35% / cover no-repeat;
    filter: blur(6px) brightness(0.35) saturate(0.6);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,19,34,0.8) 0%, rgba(11,19,34,0.9) 55%, var(--night) 100%);
}
.hero::after {
    content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 6px;
    background: var(--yellow); transform: skewY(-1.4deg); transform-origin: left;
}
.lang-switch { position: relative; z-index: 2; display: flex; justify-content: flex-end; gap: 4px; padding: 14px 16px 0; }
.lang-switch button {
    background: transparent; color: rgba(255,255,255,0.75); border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px; padding: 6px 12px; font: 600 0.85rem 'Inter', 'Noto Sans Thai', sans-serif; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--night); }
.hero-inner { position: relative; text-align: center; padding: 28px 20px 64px; text-shadow: 0 2px 14px rgba(0,0,0,0.55); }
.eyebrow { display: inline-block; font-size: 0.85rem; letter-spacing: 0.16em; color: var(--yellow); margin-bottom: 8px; }
h1.wordmark {
    font-size: clamp(3rem, 14vw, 6rem); letter-spacing: 0.02em; line-height: 0.92;
    margin: 0 0 10px; font-style: italic;
}
h1.wordmark em { color: var(--yellow); }
.subhead { font-weight: 700; font-size: clamp(1.1rem, 4vw, 1.5rem); letter-spacing: 0.06em; margin: 0 0 22px; color: rgba(255,255,255,0.92); }
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.chip {
    background: rgba(242,224,48,0.12); border: 1px solid rgba(242,224,48,0.55); color: var(--yellow);
    border-radius: 4px; padding: 9px 16px; font-size: 0.8rem; letter-spacing: 0.06em; line-height: 1.3;
}
.hero-body { max-width: 540px; margin: 0 auto 26px; font-size: 1.02rem; color: rgba(255,255,255,0.9); }
.hero-count { margin: 18px 0 0; color: var(--yellow); font-weight: 600; }
.hero .btn-primary { background: var(--yellow); color: var(--night); box-shadow: 0 10px 24px -8px rgba(242,224,48,0.45); }
.hero .btn-primary:hover { background: var(--yellow-deep); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    border: none; border-radius: 4px; padding: 16px 34px;
    font-size: 1.05rem; letter-spacing: 0.06em; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--night); color: var(--yellow); box-shadow: 0 10px 24px -8px rgba(0,0,0,0.45); }
.btn-primary:hover { background: #000; }
.btn-primary:disabled { background: rgba(11,19,34,0.45); color: rgba(255,255,255,0.8); cursor: progress; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--night); border: 2px solid var(--night); }
.btn-small { padding: 10px 16px; font-size: 0.95rem; }

/* ---------- Regions ---------- */
.regions { background: var(--night); color: #fff; padding: 34px 0 40px; }
.regions h2 { font-size: 1.3rem; letter-spacing: 0.1em; color: var(--yellow); margin: 0 0 14px; }
.region-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 14px; list-style: none; }
.region-grid li { font-weight: 700; letter-spacing: 0.06em; font-size: 1.05rem; border: 1px solid rgba(255,255,255,0.3); padding: 10px 16px; border-radius: 4px; }
.regions p { margin: 0; color: rgba(255,255,255,0.78); font-size: 0.95rem; }

/* ---------- Form ---------- */
.form-section { padding: 44px 0 80px; }
.form-section h2 { font-size: 2rem; margin: 0 0 22px; }
.notice { background: rgba(242,224,48,0.35); border-left: 4px solid var(--yellow-deep); padding: 12px 14px; border-radius: 4px; margin: -8px 0 24px; }
.field { margin: 0 0 24px; border: none; padding: 0; }
.field-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; padding: 0; }
.field-help { font-size: 0.84rem; color: var(--ink-soft); margin: 6px 0 0; }
.field-err { font-size: 0.86rem; color: var(--danger); margin: 6px 0 0; font-weight: 600; }
.field-err:empty { display: none; }
input[type="text"], input[type="email"], select {
    width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 6px;
    background: #fff; font: inherit; color: var(--ink);
}
select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
[aria-invalid="true"] { border-color: var(--danger) !important; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--yellow-deep); outline-offset: 2px; }
.option-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.option-pill { position: relative; }
.option-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-pill span { display: block; padding: 10px 16px; border: 1px solid var(--border); border-radius: 4px; background: #fff; font-size: 0.92rem; cursor: pointer; }
.option-pill input:checked + span { background: var(--night); border-color: var(--night); color: var(--yellow); font-weight: 600; }
.option-pill input:focus-visible + span { outline: 3px solid var(--yellow-deep); outline-offset: 2px; }
.check-field {
    display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
    background: var(--paper-soft); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin: 0 0 12px;
}
.check-field-soft { background: transparent; }
.check-field input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--night); }
.check-field-text { font-size: 0.92rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { margin-top: 20px; }
.submit-row { margin-top: 28px; }
.submit-row .btn { width: 100%; }
.form-privacy { font-size: 0.82rem; color: var(--ink-soft); text-align: center; margin: 12px 0 0; }
.form-error { background: #fdeceb; border: 1px solid #e8a79a; color: #7a2a1f; border-radius: 6px; padding: 14px 16px; margin-top: 16px; font-size: 0.92rem; }

/* ---------- Confirmation ---------- */
.confirmation { text-align: center; padding: 20px 0; outline: none; }
.confirmation h2 { font-size: 2.2rem; margin-bottom: 6px; }
.confirmation > p { font-size: 1.05rem; max-width: 480px; margin: 10px auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 26px 0; }
.share-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: left; margin: 10px 0 18px; }
.share-card h3 { margin: 0 0 4px; font-size: 1.4rem; }
.share-card p { margin: 0 0 14px; font-size: 0.95rem; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; font-size: 0.9rem; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-buttons a, .share-buttons button {
    border: 1px solid var(--border); border-radius: 4px; padding: 8px 14px; background: var(--paper-soft);
    font: 600 0.88rem 'Inter', sans-serif; color: var(--ink); text-decoration: none; cursor: pointer;
}
.ref-count { margin: 14px 0 0 !important; font-weight: 600; }
.link-btn { background: none; border: none; color: var(--ink-soft); text-decoration: underline; font: inherit; font-size: 0.9rem; cursor: pointer; }

.site-footer { background: var(--night); color: rgba(255,255,255,0.7); text-align: center; padding: 26px 20px; font-size: 0.85rem; }
.site-footer a { color: var(--yellow); }

/* ---------- Privacy page ---------- */
.doc { padding: 40px 0 70px; }
.doc h1 { font-family: 'Big Shoulders Display', sans-serif; font-size: 2.4rem; margin: 0 0 6px; }
.doc h2 { font-size: 1.3rem; margin: 30px 0 6px; }
.doc .updated { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0; }
.th-text { font-family: 'Noto Sans Thai', sans-serif; text-transform: none; letter-spacing: 0; }
