/* Board Game Library — wood & gold. Palette mirrors the app (walnut, gilt, brass, felt green). */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/cormorant-garamond-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url(fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }

:root {
  --walnut-1: #4a3121; --walnut-2: #2b1d14; --walnut-3: #140c07;
  --gilt: #f0d58c; --cream: #f6ead0; --brass: #c8a24a; --brass-dim: #8f7233;
  --felt: #1f3527; --ink: #1a100a;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --wrap: 72rem;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 500 1.3rem/1.5 var(--serif); color: var(--gilt);
  background-color: var(--walnut-2);
  background-image:
    radial-gradient(ellipse 70% 40% at 50% 0, rgba(255, 217, 160, .20), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.3 .004' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .78 0 0 0 0 .48 0 0 0 0 .26 0 0 0 .4 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    linear-gradient(var(--walnut-1), var(--walnut-2) 40%, var(--walnut-3));
  background-attachment: fixed, scroll, fixed;
}
img, video { display: block; max-width: 100%; }
a { color: var(--gilt); text-underline-offset: .2em; }
a:hover { color: #fff3cf; }
:focus-visible { outline: 3px solid var(--gilt); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.kicker { font-weight: 700; font-size: .95rem; letter-spacing: .38em; text-transform: uppercase; color: var(--brass); margin: 0 0 1rem; }
h1, h2, h3 { font-weight: 700; line-height: 1.05; margin: 0; color: var(--cream); letter-spacing: .01em; }
h1 { font-size: clamp(3rem, 7.2vw, 5.6rem); text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); text-wrap: balance; }
h3 { font-size: 1.7rem; }
.lede { font-style: italic; font-size: clamp(1.4rem, 2.3vw, 1.75rem); color: var(--gilt); margin: 1.25rem 0 0; max-width: 34rem; opacity: .92; }
p { margin: 1rem 0 0; max-width: 36rem; text-wrap: pretty; }
.rule { display: block; width: 7rem; height: 1px; margin: 1.6rem 0 0; background: linear-gradient(90deg, var(--brass), transparent); position: relative; }
.rule::before { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }

/* top bar */
.top { padding-block: 1.4rem; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-weight: 700; letter-spacing: .32em; text-transform: uppercase; font-size: 1.05rem; color: var(--brass); text-decoration: none; }

.badge { display: inline-block; margin-top: 2rem; line-height: 0; transition: transform .2s; }
.badge img { height: 4.2rem; width: auto; }
.badge:hover { transform: translateY(-2px); }

/* hero */
.hero { padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); overflow: clip; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; }
.hero .stage { display: flex; justify-content: center; align-items: center; padding: 2rem 0 3rem; }
.hero .stage .phone:first-child { transform: rotate(-5deg) translateX(1.5rem); z-index: 1; }
.hero .stage .phone:last-child { transform: rotate(4deg) translate(-1.5rem, 2.5rem); }
.hero .stage .phone { width: min(46%, 20rem); }
.langs { font-size: 1.1rem; opacity: .75; margin-top: 1.4rem; font-style: italic; }

/* phone frame */
.phone {
  position: relative; aspect-ratio: 540 / 1076; border-radius: 2.2rem; padding: .55rem;
  background: linear-gradient(145deg, #2a2420, #0b0908 60%);
  box-shadow: 0 0 0 1.5px var(--brass-dim), 0 0 0 4px #120c08, 0 30px 60px -12px rgba(0,0,0,.75), 0 12px 24px rgba(0,0,0,.5);
}
.phone > .screen { width: 100%; height: 100%; border-radius: 1.7rem; overflow: hidden; background: var(--ink); position: relative; }
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; }
.phone video { position: absolute; inset: 0; }

/* two-column feature rows */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.row.flip .copy { order: 2; }
.row .phones { display: flex; justify-content: center; gap: 1.5rem; }
.row .phones .phone { width: min(46%, 16rem); }
.row .phones.one .phone { width: min(70%, 18rem); }
.row .phones .phone:nth-child(2) { margin-top: 3rem; }

/* gilt panel (like the app's framed cards) */
.panel { border: 1px solid var(--brass); border-radius: 14px; padding: 1.4rem 1.6rem; background: linear-gradient(180deg, rgba(31,53,39,.78), rgba(20,32,25,.82)); box-shadow: inset 0 0 0 4px rgba(20,12,7,.5), inset 0 0 0 5px rgba(200,162,74,.35); }

/* game picker */
.picker .head { text-align: center; }
.picker .head p { margin-inline: auto; }
.picker .head .rule { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
.picker .head .rule::before { left: calc(50% - 3px); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 2.4rem 0 0; padding: 0; list-style: none; }
.tab, .mode {
  font: 700 1rem/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
  color: var(--gilt); padding: .85rem 1.2rem; border-radius: 9px; border: 1px solid var(--brass-dim);
  background: linear-gradient(#6b4a33, #3d291b); box-shadow: inset 0 1px 0 rgba(255,225,170,.25), 0 2px 0 #1a100a;
  transition: filter .15s, transform .15s;
}
.tab:hover, .mode:hover { filter: brightness(1.15); }
.tab[aria-selected="true"], .mode[aria-pressed="true"] { background: linear-gradient(#e9cf86, #b98d36); color: var(--ink); border-color: #f0d58c; }
.showcase { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; margin-top: 3rem; }
.showcase .phone { width: clamp(15rem, 28vw, 19rem); }
.showcase .info { max-width: 22rem; }
.showcase .info.r { justify-self: start; }
.showcase .info.l { justify-self: end; text-align: right; }
.showcase .info.l .rule { margin-left: auto; background: linear-gradient(270deg, var(--brass), transparent); }
.showcase .info.l .rule::before { left: auto; right: 0; }
.showcase h3 { font-size: clamp(2.4rem, 4vw, 3.2rem); }
.modes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.info.l .modes { justify-content: flex-end; }
.mode { padding: .7rem 1rem; font-size: .9rem; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.8rem 0 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--brass); border-radius: 999px; padding: .45rem 1.1rem; font-size: 1.1rem; background: rgba(20,12,7,.45); }
.chips b { color: var(--cream); }

/* rules cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 3rem; }
.card h3 { font-size: 1.9rem; }
.card .tag { font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; color: var(--brass); font-weight: 700; margin: 0 0 .5rem; display: block; }
.card p { font-size: 1.15rem; margin-top: .6rem; }
.center { text-align: center; }
.center p, .center .lede { margin-inline: auto; }
.center .rule { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
.center .rule::before { left: calc(50% - 3px); }

/* offline band */
.band { border-block: 1px solid var(--brass-dim); background: rgba(20,12,7,.5); }
.band h2 { font-size: clamp(2rem, 4.2vw, 3rem); }

.cta { text-align: center; }
.cta .badge { margin-top: 2.2rem; }

/* footer */
footer { border-top: 1px solid var(--brass-dim); padding-block: 2.2rem 3rem; font-size: 1.1rem; background: rgba(10,6,3,.55); }
footer .wrap { display: flex; flex-wrap: wrap; gap: .8rem 2rem; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 1.8rem; }
footer .copy { letter-spacing: .12em; text-transform: uppercase; font-size: .95rem; color: var(--brass); }

@media (max-width: 62rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; justify-items: center; }
  .showcase .phone { order: -1; }
  .showcase .info, .showcase .info.l { text-align: center; justify-self: center; }
  .showcase .info.l .rule { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--brass), transparent); }
  .showcase .info.l .rule::before { left: calc(50% - 3px); right: auto; }
  .modes, .info.l .modes { justify-content: center; }
  .showcase .info .rule { margin-inline: auto; }
}
@media (max-width: 48rem) {
  body { font-size: 1.2rem; }
  .hero .wrap, .row { grid-template-columns: 1fr; }
  .row.flip .copy { order: 0; }
  .hero .copy, .row .copy { text-align: center; }
  .hero p, .row p, .hero .lede { margin-inline: auto; }
  .hero .rule, .row .rule { margin-inline: auto; }
  .chips { justify-content: center; }
  .hero .stage .phone { width: 42%; }
  .cards { grid-template-columns: 1fr; }
  footer .wrap { justify-content: center; text-align: center; }
  .tab { padding: .75rem .9rem; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
