/* Sameen's Mahjong Garden — bright Mahjong palette (q5).
   Every colour is a token: swap these once Sameen's Instagram colours arrive. */
:root {
  --jade: #0E7C5B;
  --jade-deep: #07523C;
  --red: #D7263D;
  --red-deep: #A8182C;
  --gold: #F2B134;
  --ivory: #FFF8EC;
  --tile-blue: #2167C4;

  --bg: #FFF8EC;
  --bg-2: #FBEFD8;
  --card: #FFFFFF;
  --ink: #1D2B24;
  --muted: #5E6B63;
  --line: #E9DCC2;
  --primary: var(--red);
  --primary-soft: #FDE3E6;
  --danger: #B3261E;
  --seat-empty: #F3E8D2;
  --on-dark: #FFF8EC;

  --font-ui: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Cambria, serif;
  --r: 18px;
  --shadow: 0 2px 0 var(--line), 0 10px 30px rgba(29, 43, 36, .08);
}
[data-theme="dark"] {
  --bg: #0F1A15;
  --bg-2: #14231C;
  --card: #18291F;
  --ink: #F5EEDD;
  --muted: #A9B7AE;
  --line: #2A4034;
  --primary-soft: #3A1A1F;
  --seat-empty: #23362B;
  --shadow: 0 2px 0 var(--line), 0 10px 30px rgba(0, 0, 0, .35);
}

[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  line-height: 1.5;
  /* non-flat ground: soft tile grid + jade/gold glow */
  background:
    radial-gradient(900px 500px at 100% -10%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, color-mix(in srgb, var(--jade) 14%, transparent), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 47px, color-mix(in srgb, var(--line) 55%, transparent) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 35px, color-mix(in srgb, var(--line) 55%, transparent) 35px 36px),
    var(--bg);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .4em; font-variant-numeric: lining-nums; }
h2 { font-size: clamp(30px, 5vw, 46px); font-weight: 900; color: var(--jade-deep); }
[data-theme="dark"] h2 { color: var(--gold); }
a { color: var(--red); }
img { max-width: 100%; display: block; }
main { max-width: 1120px; margin: 0 auto; padding: 0 16px 48px; }

/* ---------- demo bar ---------- */
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: center;
  padding: 8px 16px; font-size: 14px; text-align: center;
  background: var(--ink); color: var(--bg);
}
.demo-chip {
  background: var(--gold); color: #1D2B24; font-weight: 800; letter-spacing: .12em;
  padding: 2px 10px; border-radius: 6px; font-size: 12px;
}
.link-btn {
  background: none; border: 0; color: var(--gold); text-decoration: underline; cursor: pointer;
  min-height: 32px; font-size: 14px; padding: 0 4px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-tile {
  display: grid; place-items: center; width: 34px; height: 44px; border-radius: 7px;
  background: var(--ivory); color: var(--red); font-weight: 800; font-size: 22px;
  border: 2px solid var(--jade); box-shadow: 0 3px 0 var(--jade-deep);
}
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 20px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 600;
  padding: 10px 14px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center;
}
.tabs a:hover { background: var(--bg-2); }
.tabs a.on { background: var(--jade); color: var(--on-dark); }
.tabs a.tab-sameen { border: 1.5px dashed var(--gold); }
.tabs a.tab-sameen.on { background: var(--gold); color: #1D2B24; border-style: solid; }
.theme-btn {
  width: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer;
}
@media (max-width: 760px) {
  .brand { margin-right: 0; }
  .nav { justify-content: space-between; }
  .tabs { order: 3; width: 100%; flex-wrap: wrap; gap: 6px; }
  .tabs a { padding: 8px 12px; font-size: 15px; }
}

/* ---------- shared bits ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; color: var(--red); margin: 0 0 8px; }
.eyebrow.light { color: var(--gold); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 800; text-decoration: none;
  border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(2px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-deep); }
.btn-red:hover { box-shadow: 0 6px 0 var(--red-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--on-dark); border: 2px solid var(--on-dark); }
.btn-wa { background: #1FA855; color: #fff; box-shadow: 0 4px 0 #13763A; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.section-head { padding: 36px 0 18px; max-width: 680px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
.card-pad { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.sub { font-size: 22px; margin: 28px 0 12px; }
.view { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- home ---------- */
.pitch {
  margin: 20px 0; padding: 18px 20px; border-radius: var(--r);
  background: var(--card); border: 2px dashed var(--gold);
}
.pitch-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.hero { position: relative; border-radius: 26px; overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card {
  position: relative; margin: 20px; padding: 26px; max-width: 560px; border-radius: 22px;
  background: color-mix(in srgb, var(--jade-deep) 93%, transparent); color: var(--on-dark);
}
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 900; }
.hero h1 em { color: var(--gold); font-style: italic; font-weight: 600; }
.lede { font-size: 18px; margin: 0 0 18px; opacity: .95; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.why-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.why-card img { aspect-ratio: 16/10; height: auto; object-fit: cover; width: 100%; }
.why-card h3 { font-size: 23px; margin: 16px 18px 6px; color: var(--jade-deep); }
[data-theme="dark"] .why-card h3 { color: var(--gold); }
.why-card p { margin: 0 18px 18px; color: var(--muted); }
.teaser {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: var(--r); background: var(--tile-blue); color: #fff;
}
.teaser p { margin: 0; }
.soon { background: var(--gold); color: #1D2B24; font-weight: 800; padding: 4px 12px; border-radius: 999px; font-size: 13px; }

/* ---------- filter ---------- */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter button {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0 16px; cursor: pointer; font-weight: 600;
}
.filter button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter input { flex: 1 1 220px; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0 16px; }

/* ---------- table cards ---------- */
.table-grid, .event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.tcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0;
  border-top: 6px solid var(--jade);
}
.tcard.full { border-top-color: var(--red); }
.tcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tcard h3 { font-size: 22px; margin: 0; }
.when { color: var(--muted); font-size: 15px; margin: 2px 0 0; }
.badge { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .04em; }
.badge.open { background: color-mix(in srgb, var(--jade) 16%, transparent); color: var(--jade); }
[data-theme="dark"] .badge.open { color: #6FD3AE; }
.badge.full { background: var(--red); color: #fff; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags .tag { background: var(--bg-2); color: var(--ink); font-size: 12px; }

/* seats = four Mahjong tiles; filled ones flip to ivory with the player's initial */
.seat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seat {
  aspect-ratio: 3/4; border-radius: 9px; display: grid; place-items: center; text-align: center;
  background: var(--seat-empty); border: 2px dashed var(--line); color: var(--muted);
  font-size: 12px; font-weight: 600; padding: 4px; min-width: 0;
}
.seat.taken {
  background: var(--ivory); color: #1D2B24; border: 2px solid var(--jade);
  box-shadow: 0 4px 0 var(--jade-deep); animation: flip .45s ease both;
}
.seat.taken b { display: block; font-family: var(--font-display); font-size: 24px; color: var(--red); line-height: 1; }
.seat.taken span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.seat.new { animation: flip .6s ease both; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: none; } }
.seat-row.big .seat b { font-size: 30px; }
.count { font-weight: 800; font-variant-numeric: tabular-nums lining-nums; }
.tcard .btn { margin-top: auto; }
.full-note { margin: 0; font-weight: 700; color: var(--red); }

/* ---------- events ---------- */
.ecard { padding: 0; overflow: hidden; border-top: 0; }
.ecard .ebody { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ecard .estripe { height: 10px; background: repeating-linear-gradient(90deg, var(--jade) 0 24px, var(--red) 24px 48px, var(--gold) 48px 72px); }
.ecard p { margin: 0; color: var(--muted); }
.meter { height: 10px; border-radius: 999px; background: var(--seat-empty); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--jade); border-radius: inherit; transition: width .4s ease; }

/* ---------- form ---------- */
.form { display: grid; gap: 16px; max-width: 620px; }
.form label, .modal-box label { display: grid; gap: 6px; font-weight: 700; }
.form small, .modal-box small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg); width: 100%;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex !important; align-items: center; gap: 10px; font-weight: 600 !important; }
.check input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--jade); }
.form-err { margin: 0; color: var(--danger); font-weight: 700; }
.fine { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- modal ---------- */
.modal-overlay { background: rgba(10, 20, 15, .72); padding: 16px; }
.modal-box {
  position: relative; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--card); color: var(--ink); border-radius: 22px; padding: 24px; display: grid; gap: 14px;
  border-top: 8px solid var(--red);
}
.modal-box h3 { font-size: 26px; margin: 0; }
.x { position: absolute; top: 10px; right: 10px; width: 44px; border-radius: 50%; border: 0; background: var(--bg-2); font-size: 24px; cursor: pointer; }

/* ---------- Sameen's view ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 34px; font-variant-numeric: lining-nums; color: var(--jade); }
.stat.hot b { color: var(--red); }
.stat span { color: var(--muted); font-size: 14px; }
.sameen-list { display: grid; gap: 10px; }
.srow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--jade);
  border-radius: 14px; padding: 12px 16px;
}
.srow.full { border-left-color: var(--red); background: color-mix(in srgb, var(--primary-soft) 60%, var(--card)); }
.srow .who { flex: 1 1 260px; min-width: 0; }
.srow .who b { display: block; }
.srow .who span { color: var(--muted); font-size: 14px; word-break: break-word; }
.srow .empty { color: var(--muted); }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

@media (max-width: 900px) {
  .why { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { min-height: 520px; border-radius: 20px; }
  .hero-card { margin: 10px; padding: 20px; }
  .row2 { grid-template-columns: 1fr; }
  .card-pad { padding: 16px; }
  .section-head p { font-size: 16px; }
  .brand-name { font-size: 18px; }
}

[data-theme="dark"] .stat b { color: #6FD3AE; }
[data-theme="dark"] .stat.hot b { color: #FF6B7D; }
