@font-face {
  font-family: "CormorantGaramondLocal";
  src:
    url("../fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype-variations"),
    url("../fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IMFellEnglishLocal";
  src: url("../fonts/IMFellEnglish-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070b10;
  --bg-soft: #10161d;
  --text: #ece9df;
  --muted: #bebeb4;
  --teal: #84bcb4;
  --line: rgba(132, 188, 180, 0.3);
  --shadow: rgba(0, 0, 0, 0.48);
  --font-title: "CormorantGaramondLocal", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "IMFellEnglishLocal", Georgia, "Times New Roman", serif;
  --font-ui: "IMFellEnglishLocal", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
*::before,
*::after { box-sizing: border-box; }
html {
  font-size: 17px;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #05080c;
}
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, #05080c 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img,
video,
canvas,
svg { max-width: 100%; display: block; height: auto; }
a { color: var(--teal); }
a:hover { color: #a7ddd5; }

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-120%);
  background: #000;
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 999;
}
.skip-link:focus {
  transform: translateY(0);
  left: calc(0.5rem + env(safe-area-inset-left));
  top: 0.5rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(8, 11, 15, 0.56);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(132, 188, 180, 0.18);
  max-width: 100%;
  overflow-x: clip;
}

.nav-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-left: clamp(0.75rem, 2.2vw, 1.2rem);
  padding-right: clamp(0.75rem, 2.2vw, 1.2rem);
}

.logo {
  font-family: var(--font-title);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e9f8f5;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.34rem 0.68rem;
}

.nav-links a:hover {
  border-color: var(--line);
  color: #f3fffd;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: end;
  padding-top: 5.2rem;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background:
    radial-gradient(90vw 70vh at 74% 20%, rgba(119, 158, 176, 0.22), transparent 58%),
    radial-gradient(90vw 70vh at 18% 82%, rgba(70, 60, 45, 0.24), transparent 64%),
    linear-gradient(180deg, rgba(8, 12, 17, 0.1) 0%, rgba(7, 10, 14, 0.76) 72%, rgba(5, 8, 12, 0.96) 100%),
    url("../../Screenshots/optimized/hero-bg.jpg") center 26%/cover no-repeat;
}

.hero::after {
  background:
    radial-gradient(145% 120% at 50% 54%, transparent 52%, rgba(2, 4, 7, 0.7) 100%),
    linear-gradient(180deg, rgba(8, 11, 15, 0.14) 14%, rgba(6, 9, 12, 0.84) 92%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto 5.6rem;
  padding-left: clamp(0.8rem, 3.2vw, 1.4rem);
  padding-right: clamp(0.8rem, 3.2vw, 1.4rem);
}

h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(2.6rem, 6.7vw, 5.7rem);
  line-height: 1.03;
  color: #f1f9f7;
  text-shadow: 0 0 14px rgba(130, 184, 175, 0.2), 0 10px 32px rgba(0, 0, 0, 0.52);
}

.hero-copy {
  margin-top: 1.9rem;
  max-width: 640px;
  font-size: clamp(1.08rem, 1.7vw, 1.26rem);
  line-height: 1.95;
  color: #ebece4;
}

.signature-line {
  margin-top: 1.6rem;
  font-style: italic;
  color: #c8e9e3;
  font-size: 1.05rem;
}

.cta-row {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.58rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 1rem;
  transition: transform 180ms ease, box-shadow 220ms ease, border-color 180ms ease, background 180ms ease;
}

.btn-primary {
  background: linear-gradient(180deg, #95d6ce 0%, #6ea59f 100%);
  border-color: transparent;
  color: #061816;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #afe8e1 0%, #86c2bb 100%);
  box-shadow: 0 8px 22px rgba(102, 167, 160, 0.28);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(8, 14, 17, 0.42);
  color: #e3f6f2;
}

.btn-ghost:hover {
  border-color: rgba(156, 213, 205, 0.6);
  box-shadow: 0 8px 20px rgba(95, 146, 140, 0.2);
  transform: translateY(-1px);
}

.platform-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.platform-badge {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  background: rgba(9, 14, 17, 0.68);
  color: #dae7e5;
}

.sep {
  border: 0;
  height: 2px;
  margin: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(135, 190, 181, 0.34) 20%, rgba(135, 190, 181, 0.34) 80%, transparent 100%);
}

.visual-break {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.visual-break img {
  width: 100%;
  max-height: 62vh;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(1.02);
}

.visual-break::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 8, 11, 0.14), rgba(4, 8, 11, 0.7));
  pointer-events: none;
}

.visual-line {
  position: absolute;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  margin: 0;
  z-index: 1;
  color: #e4f2ef;
  font-family: var(--font-title);
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  text-align: center;
  width: 100%;
  max-width: 760px;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.section-shell {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 5.2rem 0;
  padding-left: clamp(0.8rem, 3.2vw, 1.4rem);
  padding-right: clamp(0.8rem, 3.2vw, 1.4rem);
}

.section-title {
  margin: 0 0 1.3rem;
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1.1;
  color: #f0f8f6;
}

.journey { padding-top: 5.4rem; }

.journey-chapter {
  margin-bottom: 2.2rem;
}

.journey-chapter img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(132, 188, 180, 0.22);
  box-shadow: 0 18px 44px rgba(2, 6, 8, 0.52);
}

.journey-copy {
  margin-top: 0.9rem;
  max-width: 680px;
}

.journey-copy h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  color: #ebf5f2;
}

.journey-copy p {
  margin: 0.35rem 0 0;
  color: #d2d6d0;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.78;
}

.gameplay { background: linear-gradient(180deg, rgba(10, 16, 20, 0.66), rgba(6, 10, 13, 0.62)); }

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

.play-card {
  border-radius: 12px;
  border: 1px solid rgba(132, 188, 180, 0.2);
  background: linear-gradient(180deg, rgba(13, 20, 24, 0.66), rgba(8, 12, 15, 0.56));
  padding: 1.05rem;
}

.play-card h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: #ebf5f2;
}

.play-card p {
  margin: 0.42rem 0 0;
  color: #ced4ce;
}

.final-cta {
  text-align: center;
  padding-top: 5.8rem;
  padding-bottom: 4.6rem;
}

.final-cta .section-title {
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}

.final-cta .btn { margin-top: 0.5rem; }
.final-cta .signature-line { margin-left: auto; margin-right: auto; }

.screens-mini {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 0 4.6rem;
  padding-left: clamp(0.8rem, 3.2vw, 1.4rem);
  padding-right: clamp(0.8rem, 3.2vw, 1.4rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

.shot { grid-column: span 6; }
.shot figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(132, 188, 180, 0.2);
  background: #0b1116;
}

.shot img {
  width: 100%;
  transition: transform 420ms ease;
}

.shot figure:hover img { transform: scale(1.03); }

.shot figcaption {
  margin: 0;
  padding: 0.5rem 0.62rem 0.65rem;
  color: #aeb3ae;
  font-size: 0.84rem;
}

.footer {
  text-align: center;
  padding: 2.4rem 0 3rem;
  color: #afb7b5;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.footer-links a {
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

:focus-visible {
  outline: 2px solid #b3f1e7;
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .gameplay-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .shot { grid-column: span 12; }
}

@media (max-width: 700px) {
  .site-header { position: static; }
  .nav-wrap {
    padding: 0.65rem clamp(0.75rem, 3.2vw, 1.2rem);
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    gap: 0.4rem;
  }
  .nav-links a {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .hero { min-height: auto; }
  .hero-content { margin: 2.4rem auto 3rem; }
  .section-shell { padding: 3.4rem 0; }
  .visual-line { bottom: 0.8rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: fogDrift 86s ease-in-out infinite alternate; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes fogDrift {
  from { transform: scale(1.03) translateX(-0.5%); }
  to { transform: scale(1.045) translateX(0.5%); }
}

/* Optional overflow debugging: add class `debug-overflow` to body when needed. */
body.debug-overflow * {
  outline: 1px solid rgba(255, 80, 80, 0.35);
}
