/* Trader Island — the game's website. One stylesheet for every page. */
:root {
  --navy: #0f1a2e;
  --navy-2: #16243f;
  --navy-3: #1f3355;
  --ink: #e9eef7;
  --muted: #9fb0c8;
  --gold: #f3c23a;
  --gold-2: #ffd96b;
  --green: #4fc27a;
  --red: #ff6b5e;
  --card: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --radius: 18px;
  --head: "Kanit", "Sukhumvit Set", sans-serif;
  --body: "Noto Sans Thai", "Sukhumvit Set", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--navy); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.25; margin: 0 0 0.5em; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }

/* ---- top bar ---- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background 0.3s, box-shadow 0.3s; }
.nav.solid { background: rgba(15, 26, 46, 0.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 21px; color: #fff; }
.brand img { height: 48px; width: auto; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); }
.hero-logo { margin: 0 0 6px; }
.hero-logo img { width: min(470px, 82vw); height: auto; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.18)) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35)); animation: bob 5s ease-in-out infinite; }
.hero-logo-sm { width: min(260px, 60vw); margin-bottom: 14px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 15.5px; }
.nav-links a:hover { color: var(--gold-2); text-decoration: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; border-radius: 999px; font-family: var(--head); font-weight: 600; font-size: 17px; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a1f00; box-shadow: 0 8px 28px rgba(243, 194, 58, 0.35); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-sm { padding: 8px 18px; font-size: 15px; }

/* ---- hero ---- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: center / cover no-repeat; transform: scale(1.04); animation: drift 24s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 18, 34, 0.92) 0%, rgba(10, 18, 34, 0.62) 45%, rgba(10, 18, 34, 0.15) 100%), linear-gradient(0deg, var(--navy) 0%, transparent 30%); }
.hero .wrap { position: relative; z-index: 2; padding: 120px 0 80px; }
.eyebrow { display: inline-block; font-family: var(--head); font-weight: 500; letter-spacing: 0.08em; color: var(--gold-2); background: rgba(243, 194, 58, 0.12); border: 1px solid rgba(243, 194, 58, 0.35); padding: 4px 14px; border-radius: 999px; font-size: 14px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(44px, 7vw, 86px); font-weight: 700; margin-bottom: 0.15em; letter-spacing: -0.01em; }
.hero h1 span { background: linear-gradient(90deg, var(--gold-2), #fff 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(18px, 2.1vw, 23px); max-width: 620px; color: #d7e0ee; margin-bottom: 30px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 42px; color: var(--muted); font-size: 15px; }
.hero .facts b { display: block; font-family: var(--head); font-size: 26px; color: #fff; font-weight: 600; }
@keyframes drift { from { transform: scale(1.04) translateX(0); } to { transform: scale(1.1) translateX(-2%); } }

/* ---- sections ---- */
section.block { padding: 96px 0; }
section.alt { background: linear-gradient(180deg, var(--navy-2), var(--navy)); }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 52px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 44px); }
.sec-head p { color: var(--muted); font-size: 18px; }
.kicker { color: var(--gold-2); font-family: var(--head); font-weight: 500; letter-spacing: 0.06em; font-size: 15px; display: block; margin-bottom: 8px; }

.grid { display: grid; gap: 22px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); border-color: rgba(243, 194, 58, 0.4); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; cursor: zoom-in; }
.card .body { padding: 18px 20px 22px; }
.card h3 { font-size: 21px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: rgba(79, 194, 122, 0.15); color: var(--green); margin-bottom: 8px; }
.tag.night { background: rgba(255, 107, 94, 0.15); color: var(--red); }
.tag.gold { background: rgba(243, 194, 58, 0.15); color: var(--gold-2); }

/* A wide feature: picture one side, words the other. */
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; margin-bottom: 84px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip .shot { order: 2; }
.feature .shot { position: relative; }
.feature .shot img { border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); cursor: zoom-in; }
.feature .shot img.inset { position: absolute; width: 46%; right: -6%; bottom: -12%; border: 3px solid var(--navy); }
.feature.flip .shot img.inset { right: auto; left: -6%; }
.feature h3 { font-size: clamp(26px, 3vw, 36px); }
.feature p { color: #cfd9e8; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 8px; color: #d6dfec; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }

/* Steps to start. */
.steps { counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; left: 22px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #2a1f00; font-family: var(--head); font-weight: 700; font-size: 19px; }
.step h3 { font-size: 20px; margin-top: 8px; }
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Gallery. */
.gallery { columns: 3 300px; column-gap: 16px; }
.gallery figure { margin: 0 0 16px; break-inside: avoid; position: relative; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.gallery img { width: 100%; transition: transform 0.4s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; inset: auto 0 0; padding: 26px 14px 10px; font-size: 14px; font-weight: 500; background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent); }

/* Night band. */
.night { position: relative; background: #070c18; overflow: hidden; }
.night::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, rgba(120, 90, 255, 0.18), transparent 50%), radial-gradient(circle at 10% 100%, rgba(255, 70, 70, 0.12), transparent 45%); }
.night .wrap { position: relative; }

/* Price / GC table. */
.packs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.pack { text-align: center; padding: 20px 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.pack b { display: block; font-family: var(--head); font-size: 28px; color: #fff; }
.pack span { color: var(--muted); font-size: 14px; }
.pack .thb { display: inline-block; margin-top: 10px; padding: 4px 14px; border-radius: 999px; background: var(--gold); color: #2a1f00; font-weight: 700; font-size: 15px; }
.pack .bonus { display: block; font-size: 12.5px; color: var(--green); font-weight: 600; min-height: 18px; }

/* FAQ. */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-family: var(--head); font-weight: 500; font-size: 18px; list-style: none; position: relative; padding-right: 30px; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 24px; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* Call to action band. */
.cta { text-align: center; padding: 90px 0; background: linear-gradient(135deg, #1f3355, #2b4f7e 55%, #7a6320); }
.cta h2 { font-size: clamp(30px, 4vw, 46px); }
.cta p { color: #dfe7f3; font-size: 19px; margin-bottom: 28px; }

footer { padding: 46px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---- the guide ---- */
.guide-hero { padding: 130px 0 50px; background: linear-gradient(180deg, rgba(10, 18, 34, 0.55), var(--navy)), center / cover no-repeat; }
.guide-hero h1 { font-size: clamp(36px, 5vw, 60px); }
.guide-hero p { color: #d7e0ee; max-width: 680px; font-size: 19px; }
.guide { display: grid; grid-template-columns: 250px 1fr; gap: 54px; padding: 40px 0 90px; }
.toc { position: sticky; top: 90px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 15px; }
.toc b { display: block; font-family: var(--head); color: #fff; margin-bottom: 10px; font-size: 16px; }
.toc a { display: block; padding: 6px 12px; border-left: 2px solid var(--line); color: var(--muted); }
.toc a:hover { color: #fff; text-decoration: none; }
.toc a.on { color: var(--gold-2); border-left-color: var(--gold); background: rgba(243, 194, 58, 0.06); }
.chapter { padding-bottom: 54px; margin-bottom: 54px; border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; }
.chapter h2 { font-size: 34px; display: flex; align-items: center; gap: 14px; }
.chapter h2 .num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--gold); color: #2a1f00; font-size: 22px; flex: none; }
.chapter h3 { font-size: 22px; margin-top: 30px; color: var(--gold-2); }
.chapter p, .chapter li { color: #d4ddea; }
.chapter ul, .chapter ol { padding-left: 22px; }
.chapter li { margin-bottom: 6px; }
.chapter figure { margin: 22px 0; }
.chapter figure img { border-radius: 14px; cursor: zoom-in; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); }
.chapter figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair figure { margin: 10px 0; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trio figure { margin: 8px 0; }
table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 15.5px; overflow: hidden; border-radius: 12px; }
th { background: var(--navy-3); color: #fff; text-align: left; padding: 10px 14px; font-family: var(--head); font-weight: 500; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: #d4ddea; vertical-align: top; }
tr:nth-child(even) td { background: rgba(255, 255, 255, 0.025); }
.kbd { display: inline-block; min-width: 28px; text-align: center; padding: 1px 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.25); border-bottom-width: 3px; background: rgba(255, 255, 255, 0.06); font-family: var(--head); font-size: 14px; color: #fff; }
.note { padding: 14px 18px; border-radius: 12px; margin: 18px 0; background: rgba(243, 194, 58, 0.08); border-left: 4px solid var(--gold); color: #e6dcc0; }
.note.warn { background: rgba(255, 107, 94, 0.08); border-left-color: var(--red); color: #f2d2cf; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.chips span { padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); font-size: 14.5px; color: #d4ddea; }

/* Lightbox. */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(4, 8, 16, 0.92); display: none; align-items: center; justify-content: center; padding: 4vw; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox p { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #cfd8e6; }

/* Reveal on scroll. */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .shot { order: 0; }
  .feature .shot img.inset { display: none; }
  .packs { grid-template-columns: repeat(3, 1fr); }
  .guide { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(15, 26, 46, 0.98); padding: 10px 0 18px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 6vw; width: 100%; }
  .menu-btn { display: block; }
  .g3, .g2, .g4 { grid-template-columns: 1fr; }
  .pair, .trio { grid-template-columns: 1fr; }
  .packs { grid-template-columns: repeat(2, 1fr); }
  section.block { padding: 70px 0; }
  .hero .facts { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero-logo img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
