/* ————— 2TG Entertainment · twilight landing —————
   Tokens sampled from approved concept art. */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("fonts/alegreya.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --night:        #06060b;   /* page ground */
  --panel:        #120d1a;   /* game section */
  --footer-bg:    #17121f;
  --line:         #3b2f4a;   /* subtle borders */
  --parchment:    #e9dfc8;   /* headline / body text */
  --parchment-dim:#c9bda4;
  --gold:         #d9b65b;   /* ornament only — never body text */
  --red:          #c2202c;   /* brand red */
  --red-bright:   #e23140;
  --red-deep:     #8f1621;

  --display: "Cinzel", "Times New Roman", serif;
  --body: "Alegreya", Georgia, serif;

  --ease: cubic-bezier(.22,.8,.32,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--parchment);
  font-family: var(--body);
  font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  line-height: 1.6;
  overflow-x: hidden;
}

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

::selection { background: var(--red-deep); color: var(--parchment); }

/* ————— buttons ————— */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--parchment);
  background: linear-gradient(180deg, var(--red-bright), var(--red));
  border: 1px solid var(--red-deep);
  border-radius: 6px;
  box-shadow: 0 3px 0 var(--red-deep), 0 8px 22px rgba(0,0,0,.5);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease);
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 5px 0 var(--red-deep), 0 12px 26px rgba(0,0,0,.55); filter: brightness(1.06); }
.btn:active { transform: translateY(1px);  box-shadow: 0 2px 0 var(--red-deep), 0 6px 14px rgba(0,0,0,.5); }
.btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn-primary { font-size: .95rem; padding: .9em 1.6em; }
.btn-nav     { font-size: .78rem; padding: .55em 1.05em; }
.btn-wide    { justify-content: center; width: 100%; }

.chev { font-family: var(--body); font-size: 1.25em; line-height: 1; translate: 0 -.05em; }
.steam-glyph { width: 1.25em; height: 1.25em; flex: none; }

/* ————— nav ————— */

.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.2rem, 5vw, 3.5rem);
}
.nav { justify-content: space-between; }
.nav-brand img { width: 44px; }

/* ————— hero ————— */

.hero {
  position: relative;
  min-height: clamp(560px, 92vh, 880px);
  display: flex;
  align-items: center;
  padding: 0 clamp(1.2rem, 5vw, 3.5rem) clamp(6rem, 16vw, 10rem);
  isolation: isolate;
}

.hero-key {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero-key::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/campfire.gif") center 62% / cover no-repeat;
  animation: drift 44s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-video.playing { opacity: 1; }

.hero-key::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(6,6,11,.78) 0%, rgba(6,6,11,.45) 34%, rgba(6,6,11,0) 60%),
    linear-gradient(180deg, rgba(6,6,11,.85) 0%, rgba(6,6,11,0) 28%),
    linear-gradient(0deg, rgba(6,6,11,.7) 0%, rgba(6,6,11,0) 22%);
}

@keyframes drift {
  from { transform: scale(1); }
  to   { transform: scale(1.035); }
}

.hero-copy { max-width: 720px; position: relative; z-index: 1; padding-bottom: 8vh; }

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 1.1rem + 3.3vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: .015em;
  text-shadow: 0 2px 18px rgba(0,0,0,.85);
}

.rule {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: var(--red);
  margin: 1.3rem 0 1.4rem;
  max-width: 430px;
}
.rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.rule-cat { width: 22px; height: 18px; flex: none; }

.hero-copy p {
  max-width: 26em;
  color: var(--parchment-dim);
  text-shadow: 0 1px 10px rgba(0,0,0,.9);
  margin-bottom: 2rem;
}

/* twinkling stars */
.hero-stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tw {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--parchment);
  border-radius: 50%;
  box-shadow: 0 0 6px 1px rgba(233,223,200,.8);
  opacity: .25;
  animation: twinkle 5.5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .18; transform: scale(.8); }
  50%      { opacity: .95; transform: scale(1.15); }
}

/* ————— torn-paper divider ————— */

.tear { margin-top: -27px; position: relative; z-index: 2; line-height: 0; }
.tear path { fill: var(--panel); }
.tear svg { width: 100%; height: 28px; display: block; filter: drop-shadow(0 -6px 14px rgba(0,0,0,.6)); }

/* ————— game section ————— */

.game {
  background:
    radial-gradient(120% 90% at 50% 0%, #1a1226 0%, var(--panel) 55%);
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.2rem, 5vw, 3.5rem) clamp(3.5rem, 8vw, 6rem);
}

.game-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.game-logo { width: min(100%, 440px); image-rendering: pixelated; }

.diamond-rule {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--red);
  font-size: .6rem;
  margin: 1.4rem 0;
  max-width: 300px;
}
.diamond-rule span { flex: 1; height: 1px; background: var(--line); }

.pitch { color: var(--parchment-dim); max-width: 30em; }

.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: 2.2rem;
}
.features li {
  display: grid;
  justify-items: center;
  gap: .55rem;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--parchment-dim);
}
.features svg { width: 26px; height: 26px; color: var(--gold); }

.screen-frame {
  border: 1px solid var(--line);
  outline: 1px solid rgba(217,182,91,.25);
  outline-offset: 4px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.6);
  background: #000;
}
.screen { width: 100%; }

.game-media .btn { margin-top: 1.9rem; }

/* ————— footer ————— */

.footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--line);
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.2rem, 5vw, 3.5rem) 2.6rem;
  display: grid;
  justify-items: center;
  gap: 1.4rem;
}

.foot-contact {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.1rem;
  margin-top: .4rem;
}
.foot-mooch { width: clamp(96px, 11vw, 128px); height: auto; }
.foot-contact .foot-links { padding-bottom: 1.9rem; }

.foot-brand { display: grid; justify-items: center; gap: .35rem; }
.foot-brand img { width: 56px; margin-bottom: .4rem; }
.foot-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.foot-loc {
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--parchment-dim);
}

.foot-links { display: flex; gap: 2.2rem; }
.foot-links a {
  font-family: var(--display);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  text-decoration: none;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat left bottom / 0 1px;
  transition: color .18s var(--ease), background-size .18s var(--ease);
}
.foot-links a:hover { color: var(--parchment); background-size: 100% 1px; }

.foot-legal { font-size: .82rem; color: #8d8299; }

/* ————— scroll reveal ————— */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .12s; }
.d2 { transition-delay: .24s; }
.d3 { transition-delay: .36s; }

/* ————— responsive ————— */

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-copy { text-align: center; }
  .game-logo, .pitch { margin-inline: auto; }
  .diamond-rule { margin-inline: auto; }
  .features { justify-content: center; }
}

@media (max-width: 640px) {
  .nav { gap: .9rem; }

  .hero { align-items: flex-start; padding-top: 4vh; min-height: 88vh; padding-bottom: 1.5rem; }
  .hero-key::before {
    background:
      linear-gradient(180deg, #06060b 0%, #06060b 44%, rgba(6,6,11,0) 60%),
      url("assets/campfire.gif") center 80% / cover no-repeat;
  }
  .hero-key::after {
    background:
      linear-gradient(180deg, rgba(6,6,11,.78) 0%, rgba(6,6,11,0) 22%),
      linear-gradient(0deg, rgba(6,6,11,.45) 0%, rgba(6,6,11,0) 16%);
  }
  .hero-video {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 80%;
    translate: none;
  }
  .hero-copy { padding-bottom: 0; }

  .features { grid-template-columns: repeat(2, auto); gap: 1.4rem 2.6rem; }

  .foot-mooch { width: 104px; }
  .foot-contact { gap: .8rem; }
}

/* ————— reduced motion ————— */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-key::before { animation: none; }
  .tw { animation: none; opacity: .5; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
