/* ACEE GAME STUDIO — shared styles. Cream, rust, blue and gold from the tactile logo. */
:root {
  --cream: #fff9ef;
  --cream-2: #f3ebd9;
  --paper: #fffdf8;
  --ink: #3f2212;
  --ink-soft: #5a2f19;
  --muted: #7a5646;
  --line: #e6d5c3;
  --rust: #c14a33;
  --rust-deep: #9e3a28;
  --blue: #2456ab;
  --blue-deep: #1a4088;
  --gold: #d39332;
  --gold-deep: #b47820;
  --peach: #e8c4b0;
  --teal: #1c3a3a;
  --shadow: 0 12px 32px rgba(63, 34, 18, 0.08);
  --shadow-hover: 0 16px 40px rgba(63, 34, 18, 0.14);
  --radius: 1.15rem;
  --radius-sm: 0.7rem;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Outfit", "Segoe UI", system-ui, sans-serif;
  --max: 70rem;
  --pad: clamp(1.1rem, 4vw, 2rem);
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 0.5rem 0.85rem;
  border-radius: 0.4rem;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  min-height: var(--header-h);
  padding: 0.55rem var(--pad);
  padding-top: calc(0.55rem + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand img {
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.1rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--rust);
}

/* Layout */
.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

main { flex: 1 0 auto; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 2.4rem 0 3rem;
  text-align: center;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 22rem;
  height: 22rem;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}
.hero::before {
  right: -8rem;
  top: -4rem;
  background:
    conic-gradient(from 210deg at 50% 50%,
      color-mix(in srgb, var(--rust) 35%, transparent),
      color-mix(in srgb, var(--peach) 40%, transparent),
      color-mix(in srgb, var(--gold) 35%, transparent),
      transparent 70%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.hero::after {
  left: -7rem;
  bottom: 1rem;
  background:
    conic-gradient(from 20deg at 50% 60%,
      color-mix(in srgb, var(--blue) 32%, transparent),
      color-mix(in srgb, var(--gold) 28%, transparent),
      transparent 65%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.hero .wrap { position: relative; z-index: 1; }

.hero-mark {
  width: min(11.5rem, 46vw);
  height: auto;
  margin: 0 auto 1.15rem;
  background: transparent;
  filter: drop-shadow(0 10px 22px rgba(63, 34, 18, 0.10));
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.85rem, 7vw, 3.15rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.hero-rule {
  display: block;
  width: 4.5rem;
  height: 3px;
  margin: 0 auto 1.15rem;
  background: var(--rust);
  border: 0;
  border-radius: 2px;
}

.tagline {
  margin: 0 auto 0.55rem;
  max-width: 28rem;
  font-size: clamp(1.08rem, 3.4vw, 1.32rem);
  font-weight: 400;
  line-height: 1.45;
  text-wrap: balance;
  color: var(--ink-soft);
}

.locale {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: var(--ink-soft); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--muted); }

/* Sections */
.section { padding: 0.5rem 0 3.4rem; }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  letter-spacing: -0.01em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

/* Games grid */
.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.game-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--cream-2);
  overflow: hidden;
}
.game-card-media.placeholder {
  aspect-ratio: 16 / 10;
}
.game-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.game-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.95rem 1rem 1.15rem;
  flex: 1;
}
.game-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.game-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}
.game-card h3 a {
  color: inherit;
  text-decoration: none;
}
.game-card h3 a:hover { color: var(--rust-deep); }
.game-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.btn-sm {
  padding: 0.48rem 0.9rem;
  font-size: 0.85rem;
}
.demo-note {
  margin-top: 0.55rem !important;
  font-size: 0.78rem !important;
  color: var(--muted);
  line-height: 1.4;
}

.pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rust-deep);
  background: color-mix(in srgb, var(--peach) 55%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--rust) 28%, transparent);
  white-space: nowrap;
}

/* Tasteful placeholders for games without art */
.placeholder {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.9;
  background:
    linear-gradient(160deg, var(--ph-a) 0%, var(--ph-b) 55%, var(--ph-c) 100%);
}
.placeholder::after {
  content: "";
  position: absolute;
  width: 68%;
  height: 68%;
  top: 12%;
  left: 16%;
  z-index: 1;
  background: color-mix(in srgb, white 18%, transparent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.placeholder .mono {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 18vw, 4.2rem);
  line-height: 1;
  color: color-mix(in srgb, white 88%, var(--ph-a));
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.accent-0 { --ph-a: #c14a33; --ph-b: #d39332; --ph-c: #9e3a28; }
.accent-1 { --ph-a: #2456ab; --ph-b: #1a4088; --ph-c: #5a8bc8; }
.accent-2 { --ph-a: #d39332; --ph-b: #c18b43; --ph-c: #b47820; }
.accent-3 { --ph-a: #5a2f19; --ph-b: #c14a33; --ph-c: #3f2212; }

/* Page chrome (privacy, support, 404, template) */
.page {
  padding: 2rem 0 3.5rem;
}
.page-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
}
.page h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.lead {
  margin: 0 0 1.6rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 40rem;
}
.effective {
  margin: -0.8rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.prose {
  max-width: 42rem;
}
.prose h2 {
  margin: 2rem 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
}
.prose h3 {
  margin: 1.35rem 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose a { font-weight: 500; }

.callout {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 0 0.8rem 0.8rem 0;
}
.callout strong { color: var(--ink); display: block; margin-bottom: 0.25rem; }
.callout p { margin: 0; }

/* FAQ */
.faq { display: grid; gap: 0.7rem; margin: 1rem 0 2rem; }
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.2rem 1rem 0.2rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--rust);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.contact-block {
  display: grid;
  gap: 0.85rem;
  margin: 1.2rem 0 2rem;
}
.contact-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
}
.contact-card:hover { border-color: var(--blue); color: inherit; }
.contact-card .icon {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.65rem;
  background: var(--cream-2);
  color: var(--ink);
}
.contact-card .icon svg { width: 1.15rem; height: 1.15rem; }
.contact-card strong { display: block; }
.contact-card span { color: var(--muted); font-size: 0.92rem; }

/* Template / 404 extras */
.game-hero {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}
.game-hero img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--cream-2);
}
.store-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.1rem 0; }
.store-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border: 1.5px dashed var(--line);
  border-radius: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--paper);
}

.not-found { text-align: center; padding: 3.5rem 0 4rem; }
.not-found .hero-mark { width: 7.5rem; margin-bottom: 1.4rem; }
.not-found h1 { margin-bottom: 0.6rem; }
.not-found p { margin: 0 auto 1.5rem; max-width: 26rem; color: var(--muted); }

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2rem var(--pad) calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--cream-2) 55%, var(--cream));
}
.footer-inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: grid;
  gap: 1.1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 0.88rem;
}
.footer-brand img { width: 2rem; height: 2rem; background: transparent; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.footer-links a:hover { color: var(--ink); }
.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Games JS fallback */
.games-status[hidden] { display: none; }
.games-status {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 519px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }
  .site-nav {
    justify-content: space-between;
    width: 100%;
    padding: 0.1rem 0 0.35rem;
  }
}

@media (min-width: 620px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .game-hero {
    grid-template-columns: minmax(0, 18rem) 1fr;
    align-items: start;
  }
}

@media (min-width: 960px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 3.2rem 0 4rem; }
  .hero-mark { width: 13.5rem; }
  .site-header { padding-inline: var(--pad); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .game-card { transition: none; }
  .btn:hover, a.game-card:hover { transform: none; }
}
