/* Evenfall Games — evening navy, cream, and blush */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --scale: 1.25;
  --bg: #08111c;
  --bg-mid: #121c30;
  --navy: #0c1830;
  --cream: #f3e7d0;
  --cream-deep: #e4d0a8;
  --cream-bright: #fbf6ea;
  --pink: #f0b7c6;
  --pink-deep: #d9899e;
  --text: #f7f3ea;
  --muted: #b7b1c2;
  --header-h: calc(64px * var(--scale));
  --max: calc(1120px * var(--scale));
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  font-size: calc(100% * var(--scale));
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  background-color: var(--bg);
  overflow-x: hidden;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 48% at 82% 16%, rgba(240, 183, 198, 0.16), transparent 60%),
    radial-gradient(ellipse 55% 40% at 10% 86%, rgba(243, 231, 208, 0.07), transparent 62%),
    linear-gradient(180deg, #070e1a 0%, #121c30 48%, #080e18 100%);
}

.page-bg__image {
  position: absolute;
  inset: 0;
  background: url("../assets/images/bg-evening.webp") center top / cover no-repeat;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.page-bg__stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 8% 18%, rgba(255, 250, 240, 0.7), transparent),
    radial-gradient(1px 1px at 22% 62%, rgba(240, 183, 198, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 48% 28%, rgba(243, 231, 208, 0.45), transparent),
    radial-gradient(1px 1px at 67% 12%, rgba(255, 250, 240, 0.5), transparent),
    radial-gradient(1px 1px at 81% 44%, rgba(240, 183, 198, 0.35), transparent),
    radial-gradient(1px 1px at 91% 76%, rgba(255, 250, 240, 0.32), transparent),
    radial-gradient(1px 1px at 35% 88%, rgba(243, 231, 208, 0.28), transparent);
  animation: twinkle 7s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes twinkle {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

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

a {
  color: inherit;
  text-decoration: none;
}

.prose a,
.stat a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.2s ease;
}

.prose a:hover,
.stat a:hover {
  color: var(--cream-bright);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.75rem;
}

/* ========== HEADER — locked to the top of the viewport ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(5, 7, 12, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(243, 231, 208, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  width: auto;
  height: calc(48px * var(--scale));
  max-width: calc(96px * var(--scale));
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
}

.brand-name__top {
  font-size: 1rem;
  letter-spacing: 0.14em;
}

.brand-name__bottom {
  font-size: 0.58rem;
  letter-spacing: 0.32em;
}

.tm {
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--cream-bright);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

/* ========== HERO / CAROUSEL — ToA hero-stage as carousel ========== */
.hero.stack--hero,
.stack--hero {
  position: relative;
  padding: 30px 0 5px;
  border-top: none;
  overflow: visible;
  min-height: 0;
  display: block;
}

.carousel {
  position: relative;
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border-radius: 10px;
  background: #0c1424;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(243, 231, 208, 0.08);
}

.hero-stage::before {
  content: "";
  grid-area: 1 / 1;
  aspect-ratio: 2200 / 1024;
  width: 100%;
  pointer-events: none;
}

.carousel__slide {
  grid-area: 1 / 1;
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
  pointer-events: none;
  z-index: 0;
}

.carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.hero-bg {
  grid-area: 1 / 1;
  position: relative;
  z-index: 0;
  align-self: stretch;
  min-height: 100%;
  overflow: hidden;
  line-height: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 62% center;
}

.hero-bg__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(7, 12, 24, 0.72) 0%,
      rgba(8, 14, 28, 0.42) 30%,
      rgba(8, 14, 28, 0.12) 50%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(7, 12, 24, 0.2) 0%,
      transparent 28%,
      transparent 74%,
      rgba(7, 12, 24, 0.4) 100%
    );
  pointer-events: none;
}

.hero-overlay {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  align-self: start;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1.1rem, 3.2vw, 2.4rem) clamp(1rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  pointer-events: none;
}

.carousel__slide--home .hero-overlay,
.carousel__slide--worlds .hero-overlay {
  align-self: stretch;
  align-items: center;
}

.hero-overlay .hero-copy,
.hero-overlay a,
.hero-overlay button,
.hero-overlay .btn {
  pointer-events: auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: min(30rem, 46%);
  margin: 0;
  width: 100%;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--cream);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.game-logo {
  width: min(100%, calc(360px * var(--scale)));
  margin: 0 0 0.5rem;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.65));
  animation: float-soft 6.5s ease-in-out infinite;
}

.lede {
  margin: 0 auto 0.9rem;
  max-width: 34ch;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(118px * var(--scale));
  min-height: calc(40px * var(--scale));
  padding: 0.55rem 1.2rem;
  border-radius: 5px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(180deg, #fbf6ea 0%, #e7d3ae 100%);
  color: #1c140e;
  box-shadow: 0 8px 22px rgba(240, 183, 198, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(240, 183, 198, 0.4);
}

.btn-ghost {
  background: rgba(8, 14, 26, 0.5);
  border-color: rgba(243, 231, 208, 0.72);
  color: var(--cream-bright);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.btn.is-static {
  cursor: default;
  opacity: 0.8;
}

.btn.is-static:hover {
  transform: none;
  border-color: rgba(243, 231, 208, 0.72);
  color: var(--cream-bright);
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 22px;
}

.carousel__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.carousel__arrow:hover {
  border-color: var(--cream);
  color: var(--cream-bright);
}

.carousel__dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(243, 231, 208, 0.55);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.carousel__dot.is-active {
  background: var(--cream);
  box-shadow: 0 0 10px rgba(240, 183, 198, 0.45);
  transform: scale(1.15);
}

/* ========== STACKS / PILLARS (ToA values) ========== */
.stack {
  position: relative;
  padding: 50px 0 90px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stack--pillars {
  padding-top: 0.65rem;
  padding-bottom: clamp(1.5rem, 3.5vw, 2.4rem);
  border-top: none;
}

.stack--projects {
  background: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    rgba(30, 40, 70, 0.45),
    transparent 65%
  );
}

.section-head {
  text-align: center;
  margin-bottom: 1.35rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f2f2f4;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: #8e97a8;
  font-size: 1rem;
  font-weight: 400;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.05rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  text-align: center;
}

.feature-card figure {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 5 / 4;
  background: #0c1424;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(243, 231, 208, 0.08);
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-card:hover img {
  transform: scale(1.04);
}

.feature-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.feature-card:not(:first-child) h3 {
  color: var(--cream-bright);
}

.feature-card p {
  margin: 0.1rem 0 0;
  color: rgba(180, 188, 204, 0.95);
  font-size: 0.88rem;
}

.section-head .lede,
.panel .lede,
.game-spotlight .eyebrow {
  text-shadow: none;
}

.game-spotlight {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.game-spotlight .game-logo {
  width: min(100%, calc(360px * var(--scale)));
  margin: 0 0 1rem;
}

.stack--projects .game-spotlight .game-logo {
  display: block;
  margin-inline: auto;
}

.game-spotlight .cta-row {
  justify-content: flex-start;
  margin-top: 1.4rem;
}

.spotlight-art {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.spotlight-art img {
  width: 100%;
  aspect-ratio: 4 / 4;
  object-fit: cover;
}

.meta-list {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.meta-list strong {
  color: var(--cream);
  font-weight: 600;
}

/* ========== ABOUT / CONTACT ========== */
.panel {
  background: rgba(10, 16, 30, 0.72);
  border: 1px solid rgba(243, 231, 208, 0.1);
  border-radius: 16px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
}

.prose h2,
.panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  color: var(--cream);
  letter-spacing: 0.05em;
  font-size: 1.3rem;
}

.prose p,
.panel p {
  margin: 0 0 1rem;
  color: rgba(245, 245, 247, 0.9);
}

.prose p:last-child,
.panel p:last-child {
  margin-bottom: 0;
}

.org-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--pink);
}

.org-chain__sep {
  color: var(--cream);
  opacity: 0.8;
}

.stat-stack {
  display: grid;
  gap: 0.9rem;
}

.stat {
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--pink);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 10px 10px 0;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  color: var(--cream);
  margin-bottom: 0.2rem;
  letter-spacing: 0.04em;
}

.stat span {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 10, 20, 0.75);
  color: var(--text);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(240, 183, 198, 0.45);
  border-color: var(--cream);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.site-footer {
  padding: 2rem 0 2.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  color: rgba(160, 170, 190, 0.78);
  font-size: 0.84rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.65rem;
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
}

.footer-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--cream-bright);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Motion */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal:not(.is-visible) {
  opacity: 0.001;
  transform: translateY(12px);
}

html.js .reveal {
  transition: opacity 0.65s ease, transform 0.65s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal:not(.is-visible),
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .game-logo,
  .page-bg__stars {
    animation: none;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1225px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-spotlight,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .game-spotlight .cta-row {
    justify-content: flex-start;
  }

  .hero.stack--hero,
  .stack--hero {
    padding: 0.45rem 0 0.75rem;
  }

  .hero-bg img {
    object-position: 68% center;
  }

  .hero-copy {
    max-width: min(28rem, 52%);
  }
}

@media (max-width: 900px) {
  .container {
    padding-inline: 1rem;
  }

  .nav-bar {
    display: flex;
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-grid;
    place-content: center;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 0;
    background: rgba(5, 7, 12, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 1.2rem;
  }

  .hero.stack--hero,
  .stack--hero {
    padding: 0.35rem 0 1rem;
  }

  .hero-stage::before {
    aspect-ratio: 4 / 5;
  }

  .hero-bg img {
    object-position: 72% center;
  }

  .hero-bg__scrim {
    background: linear-gradient(
      180deg,
      rgba(7, 12, 24, 0.55) 0%,
      rgba(8, 14, 28, 0.28) 42%,
      rgba(7, 12, 24, 0.5) 100%
    );
  }

  .hero-overlay {
    justify-content: center;
    padding: 1.35rem 1rem 1.75rem;
  }

  .hero-copy {
    max-width: min(22rem, 100%);
  }

  .eyebrow {
    font-size: 0.82rem;
  }

  .game-logo {
    width: min(100%, 16.5rem);
    margin-bottom: 0.35rem;
  }

  .lede {
    font-size: 0.92rem;
    margin-bottom: 0.75rem;
  }

  .cta-row {
    gap: 0.55rem;
  }

  .btn {
    min-width: 7.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    max-width: calc(360px * var(--scale));
    margin-inline: auto;
  }
}
