/* ============================================================
   Evryday Games — studio site
   Aesthetic: the gaslit library. Warm ink, candle gold,
   engraved hairlines, one accent colour per book.
   ============================================================ */

:root {
  --ink: #0e0b08;
  --ink-2: #16110a;
  --ink-3: #1f1810;
  --parchment: #e9dcc0;
  --parchment-dim: #b0a184;
  --parchment-faint: #7d7159;
  --gold: #c99a4b;
  --gold-bright: #e5b567;
  --hairline: rgba(201, 154, 75, 0.28);
  --font-display: "IM Fell English SC", serif;
  --font-fell: "IM Fell English", serif;
  --font-body: "EB Garamond", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  scrollbar-color: #3a2e1c var(--ink);
}

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Grain + vignette over everything, click-through */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 49;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(5, 3, 1, 0.55) 100%);
}

::selection { background: var(--gold); color: var(--ink); }

a { color: var(--gold-bright); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------
   Nav
   ------------------------------------------------------------ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}
.site-nav.scrolled {
  background: rgba(14, 11, 8, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--hairline);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--parchment);
  text-decoration: none;
}
.wordmark span { color: var(--gold); }

.site-nav nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.site-nav nav a {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--parchment-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}
.site-nav nav a:hover { color: var(--gold-bright); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 7rem 1.5rem 4rem;
  text-align: center;
  /* fine engraved hairlines */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(201, 154, 75, 0.045) 0px,
    rgba(201, 154, 75, 0.045) 1px,
    transparent 1px,
    transparent 7px
  );
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.92;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 55% at 50% 48%, rgba(14, 11, 8, 0.35), rgba(14, 11, 8, 0.72) 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 30%, rgba(201, 154, 75, 0.16), transparent 70%),
    radial-gradient(ellipse 35% 25% at 22% 75%, rgba(163, 18, 38, 0.08), transparent 70%);
  animation: flicker 7s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  42%      { opacity: 0.82; }
  47%      { opacity: 0.95; }
  53%      { opacity: 0.78; }
  70%      { opacity: 0.94; }
}

.hero-inner { max-width: 46rem; position: relative; z-index: 2; }

.kicker {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  color: var(--gold);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.9rem, 8.5vw, 5.6rem);
  line-height: 1.05;
  margin: 1.4rem 0 0;
  text-shadow: 0 0 60px rgba(201, 154, 75, 0.25);
}
.hero h1 em {
  font-family: var(--font-fell);
  font-style: italic;
  color: var(--gold-bright);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--gold);
  font-size: 1.2rem;
  margin: 1.8rem auto;
}
.ornament .rule {
  height: 1px;
  width: clamp(3rem, 10vw, 7rem);
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}

.lede {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--parchment-dim);
  max-width: 40rem;
  margin: 0 auto;
}
.lede, .pitch { text-wrap: pretty; }

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.4rem;
}

.btn {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  padding: 0.8rem 1.9rem;
  border: 1px solid var(--gold);
  transition: all 0.3s ease;
}
.btn-solid {
  background: var(--gold);
  color: var(--ink);
}
.btn-solid:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 30px rgba(201, 154, 75, 0.35);
}
.btn-ghost { color: var(--gold-bright); }
.btn-ghost:hover {
  background: rgba(201, 154, 75, 0.12);
  box-shadow: 0 0 24px rgba(201, 154, 75, 0.18);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  color: var(--gold);
  text-decoration: none;
  font-size: 1.3rem;
  animation: bob 2.4s ease-in-out infinite;
}

/* trailer button + play triangle */
.btn-trailer {
  font-family: var(--font-display);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.play-tri { font-size: 0.7em; color: var(--gold); }

/* trailer lightbox */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 1, 0.86);
  backdrop-filter: blur(6px);
  animation: fade 0.3s ease;
}
.modal-frame {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8), 0 0 60px rgba(201, 154, 75, 0.12);
  animation: rise-modal 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.modal-frame video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }
/* portrait trailer on mobile: tall frame that fits the screen */
@media (max-width: 760px) {
  .modal-frame {
    aspect-ratio: 9 / 16;
    width: auto;
    height: min(84vh, 940px);
    max-width: 100%;
  }
  .modal-close { top: -2.6rem; }
}
.modal-close {
  position: absolute;
  top: -3rem;
  right: -0.2rem;
  background: none;
  border: none;
  color: var(--parchment);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}
.modal-close:hover { color: var(--gold-bright); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise-modal { from { opacity: 0; transform: translateY(20px) scale(0.98); } }
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ------------------------------------------------------------
   Section heads
   ------------------------------------------------------------ */
.section-head {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-top: 0.9rem;
}
.section-sub { color: var(--parchment-dim); margin-top: 0.7rem; }

/* ------------------------------------------------------------
   The Shelf — game rows
   ------------------------------------------------------------ */
.shelf {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 3rem);
  max-width: 72rem;
  margin: 0 auto;
}

.game {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.game + .game { border-top: 1px solid rgba(201, 154, 75, 0.14); }
.game .cover-wrap { justify-self: end; }

/* alternate: art on the right for the middle entry */
.game:nth-of-type(2) { grid-template-columns: 1fr minmax(260px, 360px); }
.game:nth-of-type(2) .cover-wrap { order: 2; justify-self: start; }
.game:nth-of-type(2) .game-copy { order: 1; text-align: right; }
.game:nth-of-type(2) .chips { justify-content: flex-end; }
.game:nth-of-type(2) .steam-badge { justify-content: flex-end; }

.cover-wrap { perspective: 900px; }

.cover {
  position: relative;
  display: block;
  border: 1px solid var(--hairline);
  outline: 1px solid rgba(201, 154, 75, 0.1);
  outline-offset: 6px;
  transform: rotate(-1.6deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 4px 14px rgba(0, 0, 0, 0.5);
}
.game:nth-of-type(2) .cover { transform: rotate(1.6deg); }
.game:hover .cover {
  transform: rotate(0deg) translateY(-6px);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.75),
    0 0 44px color-mix(in srgb, var(--accent) 28%, transparent);
}

.cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* CSS title plate for the cover whose art has no baked-in title */
.cover-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.95),
    0 0 18px rgba(0, 0, 0, 0.9),
    0 0 2px #000;
}

.numeral {
  font-family: var(--font-fell);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent);
}

.source {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  color: var(--parchment-faint);
  margin-top: 0.4rem;
}
.source span { color: var(--parchment-dim); }

.game-copy h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0.5rem 0 1rem;
}

.pitch { color: var(--parchment-dim); max-width: 34rem; }
.game:nth-of-type(2) .pitch { margin-left: auto; }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.4rem;
}
.chips li {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  padding: 0.32rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, var(--parchment));
  border-radius: 999px;
}

.steam-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  color: var(--gold-bright);
}
.steam-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ------------------------------------------------------------
   How they play
   ------------------------------------------------------------ */
.how {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 3rem);
  background:
    linear-gradient(180deg, transparent, rgba(201, 154, 75, 0.04) 20%, rgba(201, 154, 75, 0.04) 80%, transparent),
    var(--ink-2);
  border-top: 1px solid rgba(201, 154, 75, 0.12);
  border-bottom: 1px solid rgba(201, 154, 75, 0.12);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  max-width: 72rem;
  margin: 0 auto;
}

.feature {
  border: 1px solid rgba(201, 154, 75, 0.18);
  padding: 2.2rem 1.8rem;
  background: rgba(14, 11, 8, 0.55);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.feature:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.glyph {
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
}
.glyph-text {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.06em;
}

.feature h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 1rem 0 0.6rem;
}
.feature p:last-child {
  color: var(--parchment-dim);
  font-size: 1.02rem;
}

/* ------------------------------------------------------------
   About
   ------------------------------------------------------------ */
.about { padding: clamp(4.5rem, 11vw, 8rem) 1.5rem; }

.about-inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.about-lede {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  text-align: left;
  margin-top: 2.2rem;
}

.dropcap {
  float: left;
  font-family: var(--font-display);
  font-size: 4.6rem;
  line-height: 0.8;
  padding: 0.35rem 0.7rem 0 0;
  color: var(--gold);
}

.about-note {
  clear: both;
  margin-top: 2rem;
  font-family: var(--font-fell);
  font-style: italic;
  color: var(--parchment-dim);
}
.about-note strong { color: var(--gold-bright); font-weight: 500; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-foot {
  border-top: 1px solid rgba(201, 154, 75, 0.14);
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
}
.site-foot .wordmark { font-size: 1.5rem; }
.foot-contact { margin-top: 1rem; color: var(--parchment-dim); }
.foot-family {
  margin-top: 0.8rem;
  font-family: var(--font-fell);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--parchment-faint);
  opacity: 0.8;
}
.foot-family a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 154, 75, 0.22);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.foot-family a:hover { color: var(--gold-bright); border-color: var(--gold); }
.foot-family .sep { color: rgba(201, 154, 75, 0.55); margin: 0 0.4em; }
.foot-family .verse { font-style: italic; }
.foot-fine {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  color: var(--parchment-faint);
  font-family: var(--font-fell);
  font-style: italic;
}

/* ------------------------------------------------------------
   Motion — load rise + scroll reveals
   ------------------------------------------------------------ */
.rise {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease var(--d, 0s), transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .hero-glow, .scroll-cue, .steam-badge .dot { animation: none; }
}

/* ------------------------------------------------------------
   Small screens
   ------------------------------------------------------------ */
@media (max-width: 760px) {
  .game,
  .game:nth-of-type(2) .cover-wrap,
  .game:nth-of-type(2) .game-copy {
    display: block;
    text-align: center;
  }
  .game { padding: 3rem 0; }
  .cover-wrap { max-width: 300px; margin: 0 auto 2.2rem; }
  .game:nth-of-type(2) .cover-wrap { margin: 0 auto 2.2rem; }
  .chips, .game:nth-of-type(2) .chips { justify-content: center; }
  .steam-badge, .game:nth-of-type(2) .steam-badge { justify-content: center; }
  .pitch, .game:nth-of-type(2) .pitch { margin: 0 auto; }
  .site-nav nav a:not(:first-child) { display: none; }
}
