/* หน้าเปิดตัว + ลงทะเบียนล่วงหน้า (Ice 2026-10-28) — โทนเดียวกับเกม: น้ำเงินกรมท่าเข้ม + ทอง · ฟอนต์ Mali / Cinzel */
:root {
  --bg: #0b1220;
  --bg2: #111b2e;
  --card: #141f35e6;
  --gold: #e3c27a;
  --gold-d: #a8823e;
  --ink: #f4ead2;
  --muted: #b9c2cf;
  --ok: #8fe0b0;
  --err: #ff9b8a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Mali, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); }
img { max-width: 100%; display: block; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 .6em; color: var(--gold); text-align: center; }

/* ---------- หัวหน้า ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 32px 16px 48px; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.04); animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.1) translateY(-1.5%); } }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #0b122055 0%, #0b122000 30%, #0b1220cc 72%, var(--bg) 100%); }
.hero-inner { position: relative; width: min(640px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.logo { width: min(440px, 82vw); height: auto; filter: drop-shadow(0 8px 24px #000c); }
.tagline { font-size: clamp(1.1rem, 3.6vw, 1.45rem); font-weight: 700; margin: 4px 0 0; text-shadow: 0 2px 10px #000; }
.sub { margin: 0 0 6px; color: var(--muted); text-shadow: 0 2px 8px #000; }

.card { background: var(--card); border: 1px solid var(--gold-d); border-radius: 14px; box-shadow: 0 10px 40px #0009, inset 0 0 0 1px #ffffff0d; }
.form { width: 100%; padding: 20px 18px 16px; text-align: left; backdrop-filter: blur(6px); }
.form h2 { font-size: 1.35rem; margin: 0; text-align: left; }
.hint { margin: 2px 0 12px; color: var(--muted); font-size: .95rem; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 10px; border: 1px solid #4a5a78; background: #0b1424; color: var(--ink); }
.row input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
button, .btn {
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; border: 0; border-radius: 10px; padding: 12px 18px; white-space: nowrap;
  color: #2a1a06; background: linear-gradient(180deg, #f6dc98, #d4a54c); box-shadow: 0 3px 0 #8a6326, 0 6px 16px #0007; text-decoration: none; display: inline-block;
}
button:disabled { opacity: .6; cursor: default; }
button:active, .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a6326; }
.consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: .9rem; color: var(--muted); }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }
.count { margin: 2px 0 0; color: var(--gold); font-size: .95rem; }
.discord { margin-top: 6px; color: var(--ink); background: #5865f2cc; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 700; box-shadow: 0 4px 14px #0008; }

/* ---------- เนื้อหา ---------- */
main section { padding: 56px 16px; max-width: 1100px; margin: 0 auto; }
.intro p { max-width: 720px; margin: 0 auto; text-align: center; font-size: 1.05rem; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feat { background: var(--bg2); border: 1px solid #2a3a58; border-radius: 14px; overflow: hidden; }
.feat img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.feat h3 { margin: 14px 16px 4px; color: var(--gold); font-size: 1.15rem; }
.feat p { margin: 0 16px 16px; color: var(--muted); font-size: .95rem; }
.heroes .strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; justify-content: safe center; }
.heroes figure { margin: 0; flex: 0 0 auto; width: 150px; scroll-snap-align: center; text-align: center; }
.heroes figure img { height: 240px; width: auto; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 6px 12px #000a); }
.heroes figcaption { font-family: Cinzel, serif; color: var(--gold); font-size: .9rem; letter-spacing: .05em; }
.more { text-align: center; color: var(--muted); margin: 8px 0 0; }
.gallery .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.gallery img { border-radius: 10px; border: 1px solid #2a3a58; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.cta { text-align: center; }
.faq { max-width: 760px !important; }
.faq details { background: var(--bg2); border: 1px solid #2a3a58; border-radius: 10px; padding: 12px 16px; margin: 0 0 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq p { color: var(--muted); margin: 8px 0 0; }
footer { text-align: center; color: var(--muted); padding: 32px 16px 48px; border-top: 1px solid #1f2b43; font-size: .9rem; }
footer p { margin: 4px 0; }

@media (max-width: 480px) {
  .row { flex-direction: column; }
  .row button { width: 100%; }
  .heroes figure { width: 120px; }
  .heroes figure img { height: 200px; }
}
