/* XO game card — purple / gold, rounded layout. */
:root {
  --theme-primary: #b78af0;
  --theme-accent: #e7b84b;
  --theme-gold-light: #fae5a8;
  --theme-gold-deep: #b48020;
  --theme-ink: #29123e;
  --theme-paper: #fffaf0;
  --theme-deep: #542189;
  --line: #5421891c;
  --radius: 28px;
  --shadow: 0 16px 48px #39135412;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 132px; }
body { margin: 0; background: #f9f5ff; color: var(--theme-ink); font: 16px/1.8 'IBM Plex Sans Thai', sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: 'Kanit', sans-serif; line-height: 1.2; margin: 0 0 24px; }
h2 { font-size: clamp(32px, 3.7vw, 52px); letter-spacing: -.8px; }
h3 { font-size: 25px; }
p { margin: 0 0 22px; }
em { font-style: normal; color: var(--theme-accent); }
[hidden] { display: none !important; }
::selection { background: var(--theme-deep); color: white; }
.wrap { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1.7px; margin-bottom: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; background: var(--theme-accent); color: var(--theme-ink); font-weight: 600; border: 1px solid #b4802033; border-radius: 999px; box-shadow: 0 6px 18px #b480201b; cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, background .22s ease; }
.btn:hover { transform: translateY(-2px); background: var(--theme-gold-light); box-shadow: 0 10px 24px #b4802028; }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 20px; }
.btn-block { width: 100%; }
.text-link { display: inline-block; border-bottom: 1px solid currentColor; font-weight: 600; padding: 4px 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--theme-deep); outline-offset: 5px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 20px; background: white; border-radius: 12px; }
.skip-link:focus { top: 12px; }

/* A floating navigation surface replaces the full-width framed header. */
.site-header { position: sticky; top: 0; z-index: 50; padding-block: 12px; background: #f9f5ffdb; backdrop-filter: blur(16px); }
.header-inner { position: relative; min-height: 90px; padding: 4px 24px 4px 14px; display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #ffffffdc; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 6px 28px #39135408; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 20px/1.2 'Kanit', sans-serif; flex-shrink: 0; }
.brand img { width: 82px; height: 82px; object-fit: contain; }
.brand small { display: block; font: 600 8px/2 'IBM Plex Sans Thai', sans-serif; letter-spacing: 1.5px; }
.nav { display: flex; align-items: center; gap: 20px; font-size: 13px; font-weight: 600; }
.nav > a:not(.btn):hover { color: var(--theme-deep); text-decoration: underline; text-underline-offset: 6px; }
.burger { display: none; border: 1px solid #b4802033; border-radius: 14px; background: var(--theme-gold-light); padding: 9px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; margin: 5px; border-radius: 2px; background: var(--theme-ink); }

/* Copy and artwork sit side by side; collection labels form a quiet strip. */
.hero { padding: 44px 0 34px; background: radial-gradient(ellipse at 90% 40%, #d9bbfa 0, transparent 60%), #f9f5ff; overflow: hidden; }
.hero-layout { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 56px; }
.hero-heading { display: block; padding-block: 20px; }
.hero-heading > .eyebrow { color: #775396; }
h1 { font-size: 20px; margin: 0 0 28px; }
h1 > span { display: block; color: var(--theme-deep); font-size: clamp(38px, 4.2vw, 60px); letter-spacing: -1.5px; line-height: 1.18; margin-top: 18px; }
.hero-intro { max-width: 470px; }
.hero-intro p { font-size: 17px; color: #684d7b; }
.hero-intro .text-link { margin: 16px 0 0 18px; font-size: 14px; }
.hero-art { position: relative; margin: 0; border: 5px solid #ffffffbc; border-radius: 40px; background: #d3afea; box-shadow: 0 24px 64px #54218926; overflow: hidden; }
.hero-art img { width: 100%; aspect-ratio: 1 / 1.06; object-fit: cover; object-position: 50% 50%; }
.hero-art figcaption { position: absolute; bottom: 20px; left: 20px; right: 20px; border: 1px solid #fff8; border-radius: 20px; padding: 16px 20px; background: #fff6dcf0; backdrop-filter: blur(12px); }
.hero-art b { display: block; font: 700 21px 'Kanit', sans-serif; }
.hero-art figcaption span { font-size: 12px; }
.mission-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; padding: 30px 12px 0; margin-top: 22px; border-top: 1px solid var(--line); font-size: 10px; font-weight: 600; letter-spacing: 1px; color: #775396; }
.section { padding: 88px 0; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 56px; margin-bottom: 32px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > div:last-child, .section-heading > p { max-width: 460px; justify-self: end; }
.catalog { background: var(--theme-paper); border-radius: 48px 48px 0 0; }
.catalog-note { padding: 10px 16px; background: #e7b84b16; border: 1px solid #e7b84b33; border-radius: 12px; font-size: 12px; color: #775e40; margin-bottom: 30px; }

/* Three vertical product cards replace the original horizontal two-column grid. */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: white; overflow: hidden; box-shadow: 0 4px 20px #39135406; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-art { position: relative; background: #e3cff7; }
.product-art img { width: 100%; aspect-ratio: 1.12; object-fit: cover; }
.product-art > span { position: absolute; top: 16px; left: 16px; z-index: 1; padding: 5px 12px; background: #fff6dfeF; border: 1px solid #e7b84b66; border-radius: 999px; font-size: 10px; font-weight: 600; }
.card-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: 14px; color: var(--theme-deep); }
.card h3 small { display: inline-block; font: 500 15px/1.7 'IBM Plex Sans Thai', sans-serif; color: #775396; }
.card p { font-size: 14px; flex: 1; color: #745f81; }
.link { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; font-weight: 600; }
.link span { width: 32px; height: 32px; border-radius: 50%; background: var(--theme-gold-light); text-align: center; line-height: 32px; color: var(--theme-deep); }

/* The brand story becomes an inset, rounded purple panel. */
.universe { background: var(--theme-paper); padding-top: 0; padding-bottom: 32px; }
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; padding: 56px; border-radius: 36px; background: #42205f; color: #fffaf0; }
.story { padding: 0; }
.intro { font: 600 25px/1.5 'Kanit', sans-serif; }
.story > p:not(.intro) { color: #e5d7ef; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; padding-top: 24px; border-top: 1px solid #e7b84b44; }
.stats b { display: block; font: 600 22px 'Kanit', sans-serif; color: var(--theme-gold-light); }
.stats span { font-size: 10px; }
.crew-section { background: var(--theme-paper); padding-top: 56px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; }
.gallery figure { margin: 0; background: white; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 8px 24px #39135409; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery figcaption { padding: 15px 16px; font-size: 10px; letter-spacing: .7px; }
.cta-band { padding: 0 0 64px; background: var(--theme-paper); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 40px 48px; background: linear-gradient(110deg, #fae5a8, #efd080); border: 1px solid #e7b84b55; border-radius: 32px; }
.cta-inner h2 { font-size: 32px; margin-bottom: 14px; }
.cta-inner p { margin: 0; }
.cta-inner .btn { flex-shrink: 0; background: var(--theme-deep); color: white; box-shadow: 0 8px 24px #54218920; }
.cta-inner .btn:hover { background: #682b9e; }
.faq-section { background: #f4edfc; }
.faq-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 64px; }
details { padding: 22px 24px; background: #ffffffc9; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; }
summary { font-size: 17px; font-weight: 600; cursor: pointer; }
details p { margin: 15px 0 0; font-size: 15px; color: #745f81; }
details a { text-decoration: underline; overflow-wrap: anywhere; }
.contact-section { background: #f4edfc; padding-top: 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 80px; align-items: start; }
.contact-grid > div { padding-top: 30px; }
.contact-email { display: inline-block; padding: 16px 0; margin: 6px 0 20px; border-bottom: 1px solid #b4802080; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.small { font-size: 14px; color: #745f81; }
.form { background: white; padding: 36px; border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label, .message-preview label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field input, .field select, .field textarea, .message-preview textarea { width: 100%; padding: 12px 15px; border: 1px solid #54218928; border-radius: 12px; background: #fcfaff; color: var(--theme-ink); }
.field :is(input,select,textarea):focus, .message-preview textarea:focus { outline: 3px solid #b78af055; outline-offset: 2px; border-color: var(--theme-deep); }
.field textarea, .message-preview textarea { resize: vertical; }
.form-note { font-size: 13px; margin: 15px 0 0; overflow-wrap: anywhere; }
.form-note.error { color: #9b1c40; }
.message-preview { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 22px; }
.message-preview textarea { font-size: 14px; }
.draft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 12px; }
.site-footer { background: #29123e; color: #f5ecff; padding: 40px 0 24px; border-radius: 40px 40px 0 0; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-bottom: 28px; }
.footer-top > a:last-child { font-weight: 600; overflow-wrap: anywhere; }
.site-footer .brand small { color: var(--theme-accent); }
.site-footer a:focus-visible { outline-color: var(--theme-accent); }
.footer-bottom { border-top: 1px solid #e7b84b33; padding-top: 24px; font-size: 12px; }
.footer-bottom > div { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-bottom: 15px; }
.footer-bottom p { margin: 24px 0 0; color: #bba8cd; }
dialog { width: min(680px, calc(100% - 32px)); max-height: 85dvh; padding: 32px; border: 1px solid var(--line); border-radius: 28px; background: var(--theme-paper); color: var(--theme-ink); box-shadow: 0 24px 80px #29123e40; }
dialog::backdrop { background: #29123e9e; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.dialog-heading h2 { font-size: clamp(24px, 4vw, 32px); }
.dialog-close { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--theme-gold-light); color: var(--theme-ink); line-height: 1; font-size: 28px; cursor: pointer; }
#policy-content p { font-size: 15px; }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 48px); }
  .nav { gap: 12px; font-size: 12px; }
  .brand { font-size: 17px; }
  .brand img { width: 72px; height: 72px; }
  .header-inner { min-height: 80px; padding-right: 16px; gap: 16px; }
  .hero-layout { gap: 30px; }
  h1 > span { font-size: clamp(36px, 4.6vw, 50px); }
  .hero-intro .text-link { margin-left: 0; }
  .cards { gap: 20px; }
  .card-body { padding: 22px; }
  .about-grid { padding: 40px; gap: 36px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .contact-grid { gap: 40px; }
}
@media (max-width: 800px) {
  html { scroll-padding-top: 114px; }
  .site-header { padding-block: 10px; }
  .header-inner { min-height: 82px; border-radius: 20px; }
  .brand img { width: 70px; height: 70px; }
  .burger { display: block; }
  .nav { display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; padding: 22px; background: #fffafaf7; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; gap: 18px; font-size: 16px; }
  .nav.open { display: flex; }
  .hero { padding-top: 20px; }
  .hero-layout { grid-template-columns: 1fr; gap: 26px; }
  .hero-heading { padding-block: 10px 0; }
  .hero-intro { max-width: 600px; }
  h1 > span { font-size: clamp(40px, 7vw, 58px); }
  .hero-intro .text-link { margin-left: 18px; }
  .hero-art { border-radius: 30px; }
  .hero-art img { aspect-ratio: 1.4; }
  .mission-bar { gap: 12px 24px; }
  .section { padding-block: 60px; }
  .section-heading, .about-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-heading > div:last-child, .section-heading > p { justify-self: start; max-width: none; }
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .universe { padding-top: 0; padding-bottom: 10px; }
  .about-grid { padding: 34px; }
  .stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .gallery { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: start; padding: 32px; }
  .contact-section { padding-top: 0; }
  .contact-grid > div { padding-top: 0; }
  .footer-top { flex-direction: column; align-items: start; }
}
@media (max-width: 500px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { padding: 4px 12px 4px 8px; gap: 10px; }
  .brand { gap: 7px; font-size: 15px; }
  .brand small { font-size: 6px; letter-spacing: 1px; }
  .brand img { width: 64px; height: 64px; }
  .hero-heading > .eyebrow { font-size: 9px; letter-spacing: 1px; }
  h1 { margin-bottom: 22px; font-size: 18px; }
  h1 > span { font-size: clamp(33px, 9vw, 43px); letter-spacing: -1px; }
  .hero-intro p { font-size: 16px; }
  .hero-intro .btn { width: 100%; }
  .hero-intro .text-link { margin-left: 0; }
  .hero-art { border-width: 3px; border-radius: 26px; }
  .hero-art img { aspect-ratio: 1.08; }
  .hero-art figcaption { bottom: 12px; left: 12px; right: 12px; padding: 12px 14px; border-radius: 16px; }
  .hero-art b { font-size: 18px; }
  .hero-art figcaption span { font-size: 10px; }
  .mission-bar { display: grid; grid-template-columns: 1fr 1fr; font-size: 9px; padding-top: 22px; }
  .catalog { border-radius: 30px 30px 0 0; }
  .cards { grid-template-columns: 1fr; }
  .card { border-radius: 24px; }
  .card-body { padding: 24px; }
  .product-art img { aspect-ratio: 1.1; }
  .about-grid { padding: 28px 24px; border-radius: 28px; }
  .intro { font-size: 23px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .gallery { gap: 14px; }
  .gallery figure { border-radius: 18px; }
  .gallery figcaption { font-size: 9px; padding: 12px; }
  .cta-inner { padding: 28px 24px; border-radius: 26px; }
  .cta-inner h2 { font-size: 28px; }
  .cta-inner .btn { width: 100%; }
  details { padding: 20px; }
  .form { padding: 26px 20px; border-radius: 26px; }
  .eyebrow { font-size: 10px; }
  .contact-email { font-size: 17px; }
  .site-footer { border-radius: 28px 28px 0 0; }
  dialog { padding: 24px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
