/*
 * acasualplace.com
 *
 * The site is drawn the way the logo is: brick linen ground, cream upholstery
 * with stitched seams, walnut, and one lamp at the TOP-LEFT - so every shadow
 * here falls down and to the right. A shadow pointing anywhere else reads as
 * pasted in. Colours come from a-casual-place/scripts/lib/logo.mjs.
 */

:root {
  --brick: #B5432F;
  --brick-hi: #C4503A;
  --brick-lo: #8E3122;
  --cream: #FFF3E2;
  --walnut: #4E301A;
  --walnut-hi: #7A4E2C;
  --walnut-lo: #2E1C10;
  --mustard: #F7C75E;
  --mustard-lo: #D9952A;

  --paper: #FBF1E1;
  --paper-tint: #F4E4CA;
  --fabric-hi: #FFF8EA;
  --fabric-lo: #F0DDBD;
  --seam: #C9A676;
  --ink: #2B1A17;
  --ink-soft: #5E4438;
  --accent: #B5432F;
  --link: #9A3524;
  --shade: 42, 14, 8;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 28px;
  --cast: 6px 10px 26px -10px rgba(var(--shade), 0.45), 2px 3px 0 rgba(var(--shade), 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1D1310;
    --paper-tint: #251915;
    --fabric-hi: #36251D;
    --fabric-lo: #2A1B15;
    --seam: #7A5C3A;
    --ink: #F7E9D6;
    --ink-soft: #CDB49B;
    --accent: #F09A80;
    --link: #F4AE97;
    --shade: 0, 0, 0;
    --cast: 6px 10px 26px -10px rgba(0, 0, 0, 0.7), 2px 3px 0 rgba(0, 0, 0, 0.2);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* A short page (the 404) still ends on the footer, not on bare paper. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body > main, .page-404 > .brick { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); color: var(--accent); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mustard-lo); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--cream); color: var(--ink); padding: 8px 14px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

/* ── Brick ground ────────────────────────────────────────────────────────────
 * The splash's own linen-and-lamp ground, drawn at its native 1920x1080 and
 * never scaled, so the weave is the same thread size in the header bar as in
 * the hero. Generated into img/brick.svg by the site build. */
.brick {
  position: relative;
  background: var(--brick) url("/img/brick.svg") top center / 1920px 1080px repeat-x;
  color: var(--cream);
}

.site-header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 72px; padding-block: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
}
.brand-mark { width: 44px; height: 44px; filter: drop-shadow(1px 2px 1px rgba(42, 10, 4, 0.35)); }
.brand-name {
  font-family: var(--serif); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 600; font-size: 1.25rem; letter-spacing: 0.005em;
}
.site-nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.site-nav a {
  color: var(--cream); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: rgba(255, 243, 226, 0.6); }

@media (max-width: 520px) {
  .brand-name { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────────────*/
.hero { position: relative; padding: clamp(16px, 4vw, 40px) 0 clamp(64px, 9vw, 104px); }
/* Piping along the hem, like the seam that runs round the chair. */
.brick:has(.hero)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 18px;
  border-top: 2px dashed rgba(255, 243, 226, 0.32);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-mark { width: min(64vw, 340px); height: auto; aspect-ratio: 1; }
.hero-mark-small { width: min(48vw, 220px); }
.hero-title { margin: 0; line-height: 0; }
.hero-wordmark {
  width: min(84vw, 440px); height: auto; margin-top: -4px;
  filter: drop-shadow(1px 2px 0 rgba(42, 10, 4, 0.35));
}
.hero-tagline {
  font-family: var(--serif); font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.7rem);
  margin: 18px 0 26px; opacity: 0.95;
}
.hero-heading { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin: 18px 0 0; color: var(--cream); }
.hero-actions { margin: 0; }
.hero-404 { padding-top: 24px; }

/* ── Buttons ────────────────────────────────────────────────────────────────*/
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px; border-radius: 999px;
  background: linear-gradient(180deg, var(--brick-hi), var(--brick-lo));
  color: var(--cream); text-decoration: none; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 2px 4px 0 rgba(var(--shade), 0.22), inset 0 1px 0 rgba(255, 243, 226, 0.25);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.button:hover { transform: translate(-1px, -1px); box-shadow: 3px 6px 0 rgba(var(--shade), 0.22), inset 0 1px 0 rgba(255, 243, 226, 0.25); }
.button:active { transform: translate(1px, 2px); box-shadow: 0 1px 0 rgba(var(--shade), 0.22); }
.button-cream {
  background: linear-gradient(180deg, #FFF8EC, #EFDDBF); color: var(--brick-lo);
  box-shadow: 2px 4px 0 rgba(42, 10, 4, 0.3), inset 0 1px 0 #fff;
}
.button-large { font-size: 1.1rem; min-height: 54px; padding-inline: 28px; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* ── Upholstery ─────────────────────────────────────────────────────────────
 * A card is a cushion: fabric lit from the top-left, a stitched seam just
 * inside its edge, and its shadow cast down and to the right. */
.card {
  position: relative;
  background: linear-gradient(160deg, var(--fabric-hi), var(--fabric-lo));
  border-radius: var(--radius);
  box-shadow: var(--cast), inset 1px 1px 0 rgba(255, 255, 255, 0.5);
  padding: 30px;
}
.card::before {
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  border: 1.5px dashed var(--seam); border-radius: calc(var(--radius) - 8px);
}
@media (prefers-color-scheme: dark) {
  .card { box-shadow: var(--cast), inset 1px 1px 0 rgba(255, 255, 255, 0.06); }
}

.tag {
  display: inline-block; padding: 3px 12px 4px; border-radius: 999px;
  background: linear-gradient(180deg, var(--mustard), var(--mustard-lo));
  color: #3A241B; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 1px 2px 0 rgba(var(--shade), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ── Sections ───────────────────────────────────────────────────────────────*/
.section { padding-block: clamp(56px, 8vw, 96px); scroll-margin-top: 8px; }
.section-games, .section-tinted { background: var(--paper-tint); }
.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 8px;
}
.lede { font-size: 1.2rem; line-height: 1.55; }
.section-intro { max-width: 60ch; color: var(--ink-soft); margin-bottom: 36px; }
.section-note { max-width: 62ch; margin: 32px 0 0; color: var(--ink-soft); }

.about { display: grid; gap: 40px; align-items: start; }
.about-copy { max-width: 62ch; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.value { padding: 26px 30px; }
.value h3 { color: var(--accent); margin-bottom: 0.3em; }
.value p { margin: 0; color: var(--ink-soft); }
@media (min-width: 900px) {
  .about { grid-template-columns: 1.15fr 1fr; gap: 64px; }
}

/* ── Games ──────────────────────────────────────────────────────────────────*/
.game-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .game-grid { grid-template-columns: 1fr 1fr; } }
.game-card { display: flex; flex-direction: column; align-items: flex-start; padding: 34px; }
.game-card > p { color: var(--ink-soft); }
.game-card .button { margin-top: auto; }
.game-card-head { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.game-card h3 { font-size: 2rem; margin: 8px 0 2px; }
.game-tagline { font-family: var(--serif); font-style: italic; font-variation-settings: "SOFT" 100; margin: 0; color: var(--ink-soft); }
.game-icon {
  width: 96px; height: 96px; flex: none; border-radius: 22px;
  box-shadow: 4px 7px 14px -4px rgba(var(--shade), 0.5);
}
.facts { list-style: none; padding: 0; margin: 4px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
  font-size: 0.88rem; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  border: 1.5px solid var(--seam); color: var(--ink-soft);
}
@media (max-width: 420px) {
  .game-card { padding: 28px 24px; }
  .game-card-head { flex-direction: column; align-items: flex-start; }
}

/* ── Contact ────────────────────────────────────────────────────────────────*/
.contact { display: grid; gap: 24px; align-items: center; padding: clamp(30px, 5vw, 52px); }
.contact h2 { margin-bottom: 0.35em; }
.contact-copy p:last-child { margin-bottom: 0; }
.contact-hint { color: var(--ink-soft); font-size: 0.95rem; }
@media (min-width: 860px) { .contact { grid-template-columns: 1.4fr auto; gap: 48px; } }

/* ── A game's own page ──────────────────────────────────────────────────────
 * The hero band is the game's own table, so the page tells you which game you
 * are on before you read a word. Each game supplies its colours below. */
.game-hero {
  background: var(--g-ground); color: var(--g-ink);
  padding-block: clamp(40px, 6vw, 72px); position: relative;
}
.game-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 14px;
  border-top: 2px dashed var(--g-seam);
}
.game-hero-inner { display: flex; align-items: center; gap: clamp(20px, 4vw, 40px); }
.game-hero-icon {
  width: clamp(104px, 22vw, 160px); height: auto; aspect-ratio: 1; flex: none; border-radius: 22%;
  box-shadow: 6px 10px 24px -6px rgba(0, 0, 0, 0.55);
}
.game-hero h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.2rem); margin: 10px 0 4px; color: var(--g-ink); }
.game-hero-tagline {
  font-family: var(--serif); font-style: italic; font-variation-settings: "SOFT" 100;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); margin: 0; opacity: 0.92;
}
@media (max-width: 520px) {
  .game-hero-inner { flex-direction: column; align-items: flex-start; }
}

.theme-fiveout {
  --g-ground: radial-gradient(120% 140% at 20% 0%, #8CB7A5 0%, #6E9C89 45%, #4F7A68 100%);
  --g-ink: #FFF8EC;
  --g-seam: rgba(244, 236, 220, 0.55);
}
.theme-gridiot {
  --g-ground: radial-gradient(110% 150% at 20% 0%, #33271D 0%, #191411 55%, #0A0706 100%);
  --g-ink: #F6E3BC;
  --g-seam: rgba(194, 149, 47, 0.5);
}
.theme-gridiot .game-hero h1 { color: #F0C15A; }

.prose-grid { display: grid; gap: 40px; align-items: start; }
.prose { max-width: 64ch; }
@media (min-width: 900px) { .prose-grid { grid-template-columns: 1.3fr 1fr; gap: 64px; } }

.steps { list-style: none; margin: 0; display: grid; gap: 22px; padding: 34px 32px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps h3 { font-size: 1.15rem; margin: 2px 0 2px; }
.steps p { margin: 0; color: var(--ink-soft); }
.step-num {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--brick-hi), var(--brick-lo)); color: var(--cream);
  font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
  box-shadow: 2px 3px 0 rgba(var(--shade), 0.22);
}

.feature-grid {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.feature h3 { color: var(--accent); margin-bottom: 0.3em; }
.feature p { margin: 0; color: var(--ink-soft); }

.soon { max-width: 760px; margin-inline: auto; text-align: center; padding: clamp(32px, 5vw, 52px); }
.soon h2 { margin-top: 14px; }
.soon p:last-child { margin: 24px 0 0; }

/* ── Footer: the chair's walnut legs ────────────────────────────────────────*/
.site-footer {
  background: linear-gradient(90deg, var(--walnut-hi), var(--walnut) 45%, var(--walnut-lo));
  color: #F2E2CA; padding-block: 34px;
}
.site-footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.brand-footer .brand-mark { width: 36px; height: 36px; }
.brand-footer .brand-name { display: inline; font-size: 1.1rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { color: #F2E2CA; text-decoration: none; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; }
.footer-note { margin: 0 0 0 auto; font-size: 0.9rem; opacity: 0.8; }
@media (max-width: 640px) { .footer-note { margin-left: 0; width: 100%; } }
