/* Eat Chess — Dining Table design system, web edition.
   Tokens mirror DESIGN.md from the iOS app so the site reads as the
   same product, not a marketing skin. */

:root {
  /* canvas */
  --canvas-top: #3F2918;
  --canvas-glow: #2C1B10;
  --canvas-bottom: #15090A;

  /* surfaces */
  --surface-card: #FAF2DF;
  --surface-card-tint: #E4D6B4;

  /* board / frame accents */
  --board-light: #F1DFBB;
  --board-dark: #4A2F1E;
  --frame-base: #1F1208;
  --frame-gold: #D4A24C;

  /* brand + state */
  --brand-green: #A2C27A;
  --brand-green-dark: #6B8F4A;
  --state-selected: #5EC7D9;
  --state-capture: #F29E4E;
  --state-quiet: #F4DD98;
  --state-success: #D4A24C;
  --state-danger: #D35B3C;

  /* text */
  --text-primary: #FAF2DF;
  --text-secondary: #D8C7A0;
  --text-on-cream: #2C1A0D;
  --text-on-cream-soft: #6B4A2C;

  /* fonts */
  --font-display: "Playfair Display", Georgia, serif;
  --font-flavor:  "Fraunces", Georgia, serif;
  --font-script:  "Caveat", "Playfair Display", cursive;
  --font-ui:      -apple-system, BlinkMacSystemFont, "SF Pro Text",
                  "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    "SF Mono", ui-monospace, "Menlo", monospace;

  /* layout */
  --content-max: 960px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius-md: 14px;
  --radius-lg: 22px;
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse at 50% 0%,
      var(--canvas-top) 0%,
      var(--canvas-glow) 35%,
      var(--canvas-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-green); text-decoration: none; }
a:hover, a:focus { color: var(--frame-gold); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--state-selected); outline-offset: 3px; border-radius: 4px; }

/* shell */
.page {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  padding: 1.5rem 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.brand-mark img {
  width: 36px; height: 36px;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 14px rgba(0,0,0,0.35);
}
.brand-mark:hover { text-decoration: none; color: var(--text-primary); }

.nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.1rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a:focus { color: var(--text-primary); border-bottom-color: var(--brand-green); }
.nav a[aria-current="page"] { color: var(--text-primary); border-bottom-color: var(--frame-gold); }

/* hero */
.hero {
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(2.5rem, 7vw, 4.5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: center;
}
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.2fr 0.8fr; }
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-green);
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.05;
  margin: 0 0 1.1rem;
  color: var(--text-primary);
}
.hero h1 .accent { color: var(--frame-gold); }
.hero p.lede {
  font-family: var(--font-flavor);
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 36ch;
  margin: 0 0 1.5rem;
}
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-art img {
  width: min(100%, 360px);
  height: auto;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.55));
}
.hero-art::after {
  content: "";
  position: absolute;
  width: 70%; height: 14px;
  bottom: 6%; left: 15%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.55), transparent 70%);
  filter: blur(6px);
  z-index: -1;
}

/* CTA buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.2rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}
.btn:hover, .btn:focus { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--brand-green);
  color: var(--canvas-bottom);
  border-color: var(--brand-green-dark);
}
.btn-primary:hover, .btn-primary:focus { background: var(--frame-gold); color: var(--canvas-bottom); }
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(250, 242, 223, 0.25);
}
.btn-ghost:hover, .btn-ghost:focus { border-color: var(--brand-green); color: var(--brand-green); }
.btn-disabled {
  background: rgba(250, 242, 223, 0.08);
  color: var(--text-secondary);
  border-color: rgba(250, 242, 223, 0.15);
  cursor: not-allowed;
}
.btn-disabled:hover { transform: none; }

/* section */
section.block {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid rgba(250, 242, 223, 0.08);
}
section.block:first-of-type { border-top: 0; }

h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 1rem;
  color: var(--text-primary);
}
h3 {
  font-family: var(--font-flavor);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}
p { margin: 0 0 1rem; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-green);
  margin: 0 0 0.6rem;
}

/* tasting card grid */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (min-width: 640px) { .menu-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .menu-grid.three-up { grid-template-columns: 1fr 1fr 1fr; } }

.menu-card {
  background: var(--surface-card);
  color: var(--text-on-cream);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.35);
  border: 1px solid var(--surface-card-tint);
}
.menu-card h3 {
  font-family: var(--font-flavor);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-on-cream);
  margin: 0 0 0.5rem;
}
.menu-card p {
  font-family: var(--font-ui);
  font-size: 0.97rem;
  color: var(--text-on-cream-soft);
  margin: 0;
}
.menu-card .course-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-green-dark);
  display: block;
  margin-bottom: 0.55rem;
}

/* receipt-style content blocks (privacy / support copy) */
.receipt {
  background: var(--surface-card);
  color: var(--text-on-cream);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border: 1px solid var(--surface-card-tint);
}
.receipt h2 { color: var(--text-on-cream); }
.receipt h3 { color: var(--text-on-cream); font-family: var(--font-flavor); }
.receipt p, .receipt li { color: var(--text-on-cream-soft); }
.receipt strong { color: var(--text-on-cream); }
.receipt a { color: var(--brand-green-dark); }
.receipt a:hover, .receipt a:focus { color: var(--text-on-cream); }
.receipt ul { padding-left: 1.2rem; }
.receipt li { margin-bottom: 0.45rem; }
.receipt .meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-on-cream-soft);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  display: block;
}
.receipt hr {
  border: 0;
  border-top: 1px dashed var(--surface-card-tint);
  margin: 1.6rem 0;
}

/* page header (privacy / support hero) */
.page-header {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1rem, 3vw, 1.8rem);
  text-align: left;
}
.page-header h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.6rem;
  color: var(--text-primary);
}
.page-header p {
  font-family: var(--font-flavor);
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 60ch;
}

/* feature row (gameplay highlights) */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 640px) { .feature-row { grid-template-columns: 1fr 1fr; } }
.feature {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--brand-green);
  background: rgba(250, 242, 223, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.feature h3 {
  font-family: var(--font-flavor);
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}
.feature p {
  font-size: 0.94rem;
  margin: 0;
  color: var(--text-secondary);
}

/* contact strip */
.contact-strip {
  background: linear-gradient(180deg, rgba(250,242,223,0.04), rgba(250,242,223,0));
  border: 1px solid rgba(250,242,223,0.08);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.contact-strip .label {
  font-family: var(--font-ui);
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.contact-strip .email {
  font-family: var(--font-flavor);
  font-weight: 600;
  font-size: 1.1rem;
}

/* footer */
.site-footer {
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(250, 242, 223, 0.08);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover, .site-footer a:focus { color: var(--text-primary); }
.site-footer .footer-meta { font-family: var(--font-mono); font-size: 0.78rem; opacity: 0.75; }

/* small flourish ("chef's note") */
.note {
  font-family: var(--font-script);
  color: var(--frame-gold);
  font-size: 1.4rem;
  line-height: 1;
  display: inline-block;
  transform: rotate(-2deg);
}

/* utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.center { text-align: center; }

/* ==========================================================
   Chess-board signature element
   ========================================================== */

/* A 4-rank-tall board strip rendered with the same square palette,
   green frame, and gold accent line as the in-app board. Used as
   a decorative divider that immediately reads as "this is the game."
*/
.board-strip {
  position: relative;
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 1.5rem auto;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #2a3d1d 0%, #1c2913 100%);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.04) inset,
    0 12px 32px rgba(0,0,0,0.5);
}
.board-strip::before {
  /* gold accent rim — thin */
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--frame-gold);
  border-radius: 13px;
  pointer-events: none;
  opacity: 0.55;
}
.board-strip .squares {
  position: relative;
  height: 84px;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--board-light);
  background-image:
    linear-gradient(45deg, var(--board-dark) 25%, transparent 25%),
    linear-gradient(-45deg, var(--board-dark) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--board-dark) 75%),
    linear-gradient(-45deg, transparent 75%, var(--board-dark) 75%);
  background-size: 42px 42px;
  background-position: 0 0, 0 21px, 21px -21px, -21px 0px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}
.board-strip .pieces {
  position: absolute;
  inset: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  pointer-events: none;
}
.board-strip .pieces img {
  height: 76px;
  width: auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45));
}
.board-strip .pieces img.threatened {
  animation: pulse-amber 2.4s ease-in-out infinite;
}
@keyframes pulse-amber {
  0%, 100% { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45)); }
  50%      { filter: drop-shadow(0 0 14px rgba(242, 158, 78, 0.85)) drop-shadow(0 4px 6px rgba(0,0,0,0.45)); }
}

/* tiny inline piece icon (used inside menu cards / list items) */
.piece-icon {
  display: inline-block;
  width: 36px; height: 36px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}
.piece-icon.lg { width: 56px; height: 56px; }
.piece-icon.xl { width: 96px; height: 96px; }

/* menu card decoration: piece in the top-right corner */
.menu-card.with-piece {
  position: relative;
  overflow: hidden;
  padding-right: 5.5rem;
}
.menu-card.with-piece .piece-deco {
  position: absolute;
  right: -6px;
  bottom: -8px;
  width: 88px; height: 88px;
  opacity: 0.85;
  pointer-events: none;
}

/* ==========================================================
   Series — game catalog cards (umbrella / home)
   ========================================================== */
.game-card {
  background: var(--surface-card);
  color: var(--text-on-cream);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--surface-card-tint);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.game-card:hover, .game-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  text-decoration: none;
}
.game-card .game-icon {
  width: 80px; height: 80px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.game-card .game-meta { flex: 1; }
.game-card .status {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-green-dark);
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.game-card.coming .status { color: var(--text-on-cream-soft); opacity: 0.75; }
.game-card h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
  color: var(--text-on-cream);
}
.game-card p {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  margin: 0;
  color: var(--text-on-cream-soft);
}
.game-card .arrow {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--brand-green-dark);
  margin-left: 0.4rem;
}
.game-card.coming { cursor: default; }
.game-card.coming:hover, .game-card.coming:focus { transform: none; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.game-card.coming .game-icon { filter: grayscale(0.4); opacity: 0.65; }

/* hero piece-row: a small constellation of pieces beside the mascot */
.hero-pieces {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.hero-pieces img {
  height: 56px;
  width: auto;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}
.hero-pieces img:nth-child(2) { height: 76px; }
.hero-pieces img:nth-child(3) { height: 64px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0s !important; transition-duration: 0s !important; }
}
