/* WyBu Studio — shared stylesheet
   Brand colours sampled from the logo. Font: Noto Sans (self-hosted, OFL). */

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/noto-sans-vietnamese-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/noto-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/noto-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --cream: #FFF8EE;
  --cream-2: #FFF1D6;
  --pink: #F26B8F;
  --pink-soft: #FFD9E3;
  --lav: #B86CC8;
  --lav-soft: #EEDDF4;
  --yellow: #F9B934;
  --yellow-soft: #FFEBB8;
  --plum: #4E1A55;   /* sticker outline, headings */
  --ink: #3A2342;    /* body text */
  --muted: #6E5876;
  --radius: 24px;
  --shadow: 6px 6px 0 var(--plum);
  --shadow-sm: 4px 4px 0 var(--plum);
  --maxw: 1140px;
  --font: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 110px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--pink); }
a:hover { color: var(--pink); }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { color: var(--plum); line-height: 1.12; margin: 0 0 .5em; font-weight: 850; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--plum); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.5em;
  border: 3px solid var(--plum);
  border-radius: 999px;
  background: var(--pink);
  color: var(--plum);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
  white-space: nowrap;
}
.btn:hover { color: var(--plum); transform: translate(-2px, -3px); box-shadow: 6px 7px 0 var(--plum); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--plum); }
.btn--ghost { background: #fff; }
.btn--yellow { background: var(--yellow); }
.btn--sm { padding: .5em 1.1em; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--cream) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 2px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--lav-soft); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { width: 92px; }
.nav__links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__links a:not(.btn) { display: block; padding: .45em .8em; border-radius: 999px; color: var(--plum); font-weight: 700; text-decoration: none; }
.nav__links a:not(.btn):hover { background: var(--lav-soft); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 48px 0 96px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 32px; }
.eyebrow { display: inline-block; background: var(--yellow-soft); color: var(--plum); border: 2px solid var(--plum); border-radius: 999px; padding: .25em .9em; font-weight: 800; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 .pink { color: var(--pink); display: block; }
.hero__lead { font-size: 1.2rem; max-width: 34ch; color: var(--muted); margin-bottom: 28px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__art { position: relative; aspect-ratio: 1 / 0.95; }
.hero__art .logo-big { position: relative; z-index: 2; width: 92%; margin: 4% auto 0; filter: drop-shadow(8px 10px 0 rgba(78, 26, 85, .14)); animation: bob 5s ease-in-out infinite; }

/* decorative mahjong tiles + dots */
.tile {
  position: absolute; z-index: 1;
  width: 64px; height: 84px;
  background: #fff;
  border: 3px solid var(--plum);
  border-radius: 14px;
  box-shadow: 0 6px 0 var(--lav), 0 6px 0 3px var(--plum);
  display: grid; place-items: center;
  font-size: 30px; font-weight: 900; color: var(--pink);
  animation: float 6s ease-in-out infinite;
}
.tile--1 { top: 2%; left: 2%; transform: rotate(-14deg); --r: -14deg; }
.tile--2 { bottom: 6%; right: 0; transform: rotate(12deg); --r: 12deg; animation-delay: -2s; color: var(--lav); }
.tile--3 { bottom: 0; left: 10%; width: 52px; height: 68px; font-size: 24px; transform: rotate(8deg); --r: 8deg; animation-delay: -4s; color: var(--yellow); }
.dot { position: absolute; border-radius: 50%; border: 3px solid var(--plum); z-index: 0; }
.dot--y { width: 34px; height: 34px; background: var(--yellow); top: 10%; right: 6%; }
.dot--p { width: 20px; height: 20px; background: var(--pink); top: 46%; left: -2%; }
.dot--l { width: 26px; height: 26px; background: var(--lav); bottom: 30%; right: -3%; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-14px) rotate(var(--r)); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* wave dividers */
.wave { display: block; width: 100%; height: 60px; }
.wave--down { margin-bottom: -2px; }
.wave--up { margin-top: -2px; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section--lav { background: var(--lav-soft); }
.section--pink { background: var(--pink-soft); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section__head p { color: var(--muted); font-size: 1.1rem; }

.card {
  background: #fff;
  border: 3px solid var(--plum);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* games */
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.game { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform .2s ease; }
.game:hover { transform: translateY(-4px) rotate(-.5deg); }
.game__art { aspect-ratio: 1 / 1; display: grid; place-items: center; border-bottom: 3px solid var(--plum); position: relative; overflow: hidden; }
.game__art--1 { background: var(--pink-soft); }
.game__art--2 { background: var(--yellow-soft); }
.game__art--3 { background: var(--lav-soft); }
.game__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game__body p { color: var(--muted); margin: 0 0 12px; font-size: .98rem; }
.badge { align-self: flex-start; display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: .25em .8em; border-radius: 999px; border: 2px solid var(--plum); background: var(--yellow); color: var(--plum); }
.badge--lav { background: var(--lav-soft); }
.stores { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.store { font-size: .82rem; font-weight: 700; color: var(--muted); border: 2px dashed #CDB7D4; border-radius: 10px; padding: .3em .7em; }

/* mini mahjong stack inside game art */
.stack { position: relative; width: 62%; height: 62%; }
.stack .tile { animation: none; width: 30%; height: 40%; font-size: clamp(18px, 3vw, 30px); box-shadow: 0 5px 0 var(--lav), 0 5px 0 3px var(--plum); }
.stack .t1 { left: 4%; top: 28%; transform: rotate(-8deg); }
.stack .t2 { left: 35%; top: 12%; transform: rotate(3deg); z-index: 2; color: var(--lav); }
.stack .t3 { left: 66%; top: 30%; transform: rotate(10deg); color: var(--yellow); }
.stack .t4 { left: 20%; top: 58%; transform: rotate(4deg); z-index: 3; color: var(--plum); }
.stack .t5 { left: 52%; top: 56%; transform: rotate(-6deg); z-index: 3; }
.mystery { font-size: clamp(64px, 9vw, 110px); font-weight: 900; color: #fff; -webkit-text-stroke: 4px var(--plum); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--plum); transform: rotate(-8deg); }
.mystery--2 { transform: rotate(7deg); color: var(--pink); }

/* about pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pillar { text-align: left; }
.pillar__icon { width: 64px; height: 64px; border-radius: 20px; border: 3px solid var(--plum); display: grid; place-items: center; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.pillar__icon svg { width: 34px; height: 34px; }
.pillar p { color: var(--muted); margin: 0; }
.pi--pink { background: var(--pink); }
.pi--yellow { background: var(--yellow); }
.pi--lav { background: var(--lav); }

/* CTA */
.cta { text-align: center; padding: 56px 28px; background: var(--yellow-soft); position: relative; overflow: hidden; }
.cta h2 { max-width: 18ch; margin-inline: auto; }
.cta p { color: var(--muted); max-width: 46ch; margin: 0 auto 26px; font-size: 1.1rem; }
.cta .mail { display: inline-block; font-weight: 800; font-size: clamp(1.1rem, 3vw, 1.5rem); margin-bottom: 18px; word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum); color: #F4E6F7; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration-color: var(--pink); }
.site-footer a:hover { color: var(--yellow); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer__brand img { width: 130px; margin-bottom: 14px; }
.footer__brand p { max-width: 32ch; font-size: .95rem; opacity: .9; }
.site-footer h3 { color: var(--yellow); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.18); margin-top: 40px; padding-top: 20px; font-size: .88rem; opacity: .85; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- Document pages (privacy / terms / support) ---------- */
.doc-hero { padding: 48px 0 24px; text-align: center; }
.doc-hero p { color: var(--muted); }
.doc { max-width: 780px; margin: 0 auto 80px; padding: clamp(22px, 5vw, 48px); }
.doc h2 { font-size: 1.45rem; margin-top: 1.8em; padding-top: .2em; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.1rem; margin-top: 1.4em; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .35em; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: .6em .7em; border-bottom: 1px solid var(--lav-soft); vertical-align: top; }
.doc th { color: var(--plum); background: var(--cream); }
.doc .note { background: var(--yellow-soft); border: 2px solid var(--plum); border-radius: 16px; padding: 14px 18px; }
.toc { background: var(--cream); border-radius: 16px; padding: 16px 20px; margin-bottom: 1.5em; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; }
.table-scroll { overflow-x: auto; }

.faq details { border: 3px solid var(--plum); border-radius: 18px; padding: 0 18px; margin-bottom: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 800; color: var(--plum); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--pink); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 14px; }

.contact-card { text-align: center; max-width: 780px; margin: 0 auto 40px; }
.contact-card .mail { font-size: clamp(1.2rem, 4vw, 1.7rem); font-weight: 850; display: inline-block; margin: 6px 0 14px; word-break: break-all; }

/* 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.lost .big { font-size: clamp(5rem, 20vw, 10rem); font-weight: 900; line-height: 1; color: var(--pink); -webkit-text-stroke: 5px var(--plum); paint-order: stroke fill; text-shadow: 8px 8px 0 var(--plum); margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__ctas { justify-content: center; }
  .hero__art { max-width: 440px; margin-inline: auto; width: 100%; }
  .games, .pillars { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .game__art { aspect-ratio: 16 / 10; }
  .stack { width: 46%; height: 80%; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .toc ol { columns: 1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
  .brand img { width: 78px; }
  .nav__links { flex-wrap: wrap; justify-content: center; }
  .nav__links a:not(.btn) { padding: .35em .6em; font-size: .95rem; }
  .site-header { position: static; }
  .hero { padding: 24px 0 72px; }
  .section { padding: 56px 0; }
  .tile { width: 48px; height: 64px; font-size: 22px; }
  .tile--3 { width: 40px; height: 52px; font-size: 18px; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
