/* ==========================================================================
   Sandcat Studios
   Direction: nocturnal desert. Sand cats hunt at night, so the studio brand
   lives after dark: cold indigo sky, warm dune ochre, one moon-pale accent.
   The dune ridge is the signature and repeats as every structural divider.
   ========================================================================== */

:root {
  --ink:        #090B11;
  --ink-2:      #0F1420;
  --ink-3:      #171E2E;
  --dune:       #C89B5C;
  --dune-deep:  #7A5B2E;
  --moon:       #8FB3C4;
  --bone:       #ECE7DB;
  --text:       #CFC9BC;
  --text-dim:   #8D8879;
  --line:       rgba(236, 231, 219, 0.13);
  --line-warm:  rgba(200, 155, 92, 0.30);

  --shell:      70rem;
  --gutter:     clamp(1.25rem, 5vw, 3rem);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --s-1:  clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --s0:   clamp(1.02rem, 0.98rem + 0.2vw, 1.15rem);
  --s1:   clamp(1.2rem,  1.1rem  + 0.5vw, 1.45rem);
  --s2:   clamp(1.5rem,  1.3rem  + 1vw,   2.1rem);
  --s3:   clamp(2rem,    1.6rem  + 2vw,   3.1rem);
  --s4:   clamp(2.7rem,  1.9rem  + 3.8vw, 5.4rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------------ reset */

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--s0);
  line-height: 1.68;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--bone);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--bone); text-decoration-color: var(--line-warm); text-underline-offset: 0.22em; }
a:hover { color: var(--dune); text-decoration-color: var(--dune); }

:focus-visible {
  outline: 2px solid var(--moon);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 50%; top: -4rem; transform: translateX(-50%);
  background: var(--dune); color: var(--ink); padding: 0.6rem 1.2rem;
  z-index: 100; font-family: var(--font-mono); font-size: var(--s-1);
  text-decoration: none; transition: top 0.2s var(--ease);
}
.skip:focus { top: 0.75rem; }

/* ----------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(3.75rem, 8vw, 7rem); position: relative; }
.band--tight { padding-block: clamp(2.75rem, 5vw, 4.25rem); }
.band--raised { background: var(--ink-2); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--s-1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dune);
  margin: 0 0 1.1rem;
}
.eyebrow--moon { color: var(--moon); }

.lede {
  font-size: var(--s1);
  color: var(--text);
  max-width: 34ch;
}
.prose { max-width: 62ch; }
.prose h2 { font-size: var(--s2); margin-top: 2.6rem; margin-bottom: 0.7rem; }
.prose h3 { font-size: var(--s1); margin-top: 1.9rem; margin-bottom: 0.4rem; font-weight: 500; }
.prose ul { padding-left: 1.15rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--dune-deep); }

/* ------------------------------------------------------------------ dunes */

.dune { width: 100%; height: clamp(48px, 7vw, 96px); display: block; }
.dune__crest { fill: none; stroke: var(--line-warm); stroke-width: 1; }
.dune--hero .dune__crest { stroke: rgba(200, 155, 92, 0.5); }
/* hero: anchored to the base of the hero, colour-matched to the band below
   so the horizon and the next section read as one mass */
.dune--hero    { position: absolute; inset: auto 0 -1px 0; z-index: 1;
                 height: clamp(80px, 14vw, 180px); }
.dune--hero .dune__mass { fill: var(--ink-2); }
/* divider: trails out of a raised band, so the mass sits at the top */
.dune--divider { transform: scaleY(-1); margin-top: -1px; }
.dune--divider .dune__mass { fill: var(--ink-2); }
/* back: the leading edge of a raised band, lifted above it */
.dune--back    { position: absolute; inset: auto 0 100% 0; height: clamp(40px, 6vw, 80px); }
.dune--back .dune__mass { fill: var(--ink-2); }
.dune--foot    { transform: scaleY(-1); opacity: 0.5; height: clamp(36px, 5vw, 64px); }
.dune--foot .dune__mass { fill: var(--ink-2); }

/* --------------------------------------------------------------- masthead */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.masthead.is-stuck { border-bottom-color: var(--line); }

.masthead__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4.5rem;
}

.wordmark {
  display: flex; align-items: baseline; gap: 0.45rem;
  text-decoration: none; margin-right: auto;
  position: relative; padding-left: 1rem;
}
.wordmark__glint {
  position: absolute; left: 0; top: 50%; width: 6px; height: 6px;
  margin-top: -3px; border-radius: 50%;
  background: var(--dune);
  box-shadow: 0 0 10px 2px rgba(200, 155, 92, 0.55);
}
.wordmark:hover .wordmark__glint { background: var(--moon); box-shadow: 0 0 12px 3px rgba(143, 179, 196, 0.6); }
.wordmark__text {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.03em; color: var(--bone);
}
.wordmark__sub {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim);
}

/* Logo files, when configured. Height is fixed and width follows, so any
   aspect ratio drops in without redesigning the masthead. */
.wordmark--lockup { padding-left: 0; align-items: center; }
.wordmark--lockup img { height: 2.1rem; width: auto; }
.wordmark__mark { height: 1.9rem; width: auto; align-self: center; }
.wordmark--lockup:hover img, .wordmark:hover .wordmark__mark { opacity: 0.85; }

.footsite__logo { height: 2.4rem; width: auto; margin-bottom: 0.6rem; }
.footsite__logo--mark { height: 2.1rem; }

@media (max-width: 30rem) {
  .wordmark--lockup img { height: 1.75rem; }
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav a {
  font-family: var(--font-mono); font-size: var(--s-1);
  letter-spacing: 0.05em; text-decoration: none; color: var(--text);
  padding-block: 0.4rem;
}
.nav a:hover { color: var(--dune); }
.nav a[aria-current="page"] { color: var(--bone); box-shadow: inset 0 -1px 0 var(--dune); }

.nav__cta {
  border: 1px solid var(--line-warm); padding: 0.5rem 0.95rem !important;
  color: var(--dune) !important;
}
.nav__cta:hover { background: var(--dune); color: var(--ink) !important; border-color: var(--dune); }

.navtoggle { display: none; }

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: min(88svh, 46rem);
  display: flex; align-items: center;
  padding-block: clamp(4rem, 12vw, 8rem) clamp(6rem, 16vw, 11rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__sky {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(70% 55% at 78% 8%,  rgba(143, 179, 196, 0.16), transparent 62%),
    radial-gradient(85% 60% at 20% 88%, rgba(200, 155, 92, 0.14),  transparent 65%),
    linear-gradient(178deg, #0D1220 0%, #0A0D16 46%, var(--ink) 100%);
  animation: drift 34s var(--ease) infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-1.2%, 0, 0) scale(1.04); }
  to   { transform: translate3d(1.2%, -1%, 0) scale(1.09); }
}
.hero__stars {
  position: absolute; inset: 0; z-index: -2; opacity: 0.5;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 68% 12%, #cfe0e8, transparent),
    radial-gradient(1.6px 1.6px at 84% 34%, #fff, transparent),
    radial-gradient(1px 1px   at 34% 46%, #e7d8bd, transparent),
    radial-gradient(1.2px 1.2px at 52% 18%, #fff, transparent),
    radial-gradient(1px 1px   at 92% 8%,  #cfe0e8, transparent);
}

.hero__body { position: relative; z-index: 2; }
.hero__body > * { max-width: 46rem; }
.hero h1 {
  font-size: var(--s4);
  font-weight: 800;
  letter-spacing: -0.045em;
  margin-bottom: 1.4rem;
  max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  display: block;
  color: var(--dune);
}
.hero__lede { font-size: var(--s1); max-width: 40ch; margin-bottom: 2.2rem; }

/* the two eyes in the dune shadow — the signature */
.hero__eyes {
  position: absolute; z-index: 2;
  left: clamp(1.5rem, 8vw, 9rem); bottom: clamp(2rem, 5vw, 4rem);
  display: flex; gap: 13px;
}
.hero__eyes span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--dune);
  box-shadow: 0 0 14px 3px rgba(200, 155, 92, 0.6);
  opacity: 0;
  animation: watch 9s var(--ease) 2.5s infinite;
}
.hero__eyes span:nth-child(2) { animation-delay: 2.62s; }
@keyframes watch {
  0%, 62%, 100% { opacity: 0; }
  70%, 88%      { opacity: 0.85; }
}

/* --------------------------------------------------------------- buttons */

.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: var(--s-1);
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0.9rem 1.5rem; text-decoration: none;
  border: 1px solid var(--line); color: var(--bone);
  background: transparent; cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--dune); color: var(--dune); }

.btn--solid { background: var(--dune); border-color: var(--dune); color: var(--ink); font-weight: 500; }
.btn--solid:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }

.btn--moon { border-color: rgba(143, 179, 196, 0.45); color: var(--moon); }
.btn--moon:hover { background: var(--moon); color: var(--ink); border-color: var(--moon); }

/* ----------------------------------------------------------------- cards */

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(236,231,219,0.035), transparent 60%);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card h3 { font-size: var(--s1); margin-bottom: 0.55rem; }
.card p { color: var(--text-dim); font-size: 0.97em; }
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--line-warm); transform: translateY(-3px); }
a.card:hover h3 { color: var(--dune); }

.card__meta {
  font-family: var(--font-mono); font-size: var(--s-1);
  color: var(--dune); letter-spacing: 0.1em; text-transform: uppercase;
  display: block; margin-bottom: 0.7rem;
}

/* the game feature block */
.feature { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 55rem) { .feature { grid-template-columns: 1.05fr 0.95fr; } }

.feature__art {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(143,179,196,0.16), transparent 70%),
    linear-gradient(200deg, var(--ink-3), var(--ink));
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.feature__art img { width: 100%; height: 100%; object-fit: cover; }
.feature__art figcaption {
  position: absolute; inset: auto 0 0 0; padding: 0.6rem 0.9rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim);
  background: linear-gradient(180deg, transparent, rgba(9,11,17,0.9));
}

/* the staccato tagline */
.beats {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--s2); letter-spacing: -0.02em; color: var(--bone);
  margin: 1.6rem 0 0;
}
.beats span { position: relative; }
.beats span::after {
  content: ""; position: absolute; left: 0; bottom: -0.35rem;
  width: 1.6rem; height: 1px; background: var(--dune);
}

/* pull quote from the game's opening */
.opening {
  font-size: var(--s2);
  font-family: var(--font-body);
  font-style: italic;
  color: var(--bone);
  max-width: 24ch;
  line-height: 1.28;
  border-left: 1px solid var(--line-warm);
  padding-left: clamp(1rem, 3vw, 2rem);
}

/* --------------------------------------------------------------- specs */

.specs { border-top: 1px solid var(--line); margin-top: 2rem; }
.specs div {
  display: grid; grid-template-columns: 10rem 1fr; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.specs dt {
  font-family: var(--font-mono); font-size: var(--s-1);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
}
.specs dd { margin: 0; color: var(--text); }
@media (max-width: 34rem) { .specs div { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ---------------------------------------------------------------- forms */

.form { max-width: 34rem; }
.field { margin-bottom: 1.3rem; }
.field label {
  display: block; font-family: var(--font-mono); font-size: var(--s-1);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  color: var(--bone); background: var(--ink-2);
  border: 1px solid var(--line); padding: 0.8rem 0.9rem;
  border-radius: 0; transition: border-color 0.2s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--dune); }
.field__hint { font-size: var(--s-1); color: var(--text-dim); margin-top: 0.4rem; }
.field--trap { position: absolute; left: -9999px; }

.note {
  border-left: 2px solid var(--dune);
  padding: 0.9rem 0 0.9rem 1.1rem;
  margin-bottom: 2rem;
  background: rgba(200, 155, 92, 0.05);
}
.note--bad { border-left-color: #C4685C; background: rgba(196, 104, 92, 0.06); }
.note p { font-size: 0.97em; }

/* -------------------------------------------------------------- footer */

.footsite { background: var(--ink); margin-top: clamp(3rem, 7vw, 6rem); }
.footsite__inner {
  display: grid; gap: 2rem clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 46rem) {
  .footsite__inner { grid-template-columns: 1.4fr repeat(3, 1fr); }
  .footsite__legal { grid-column: 1 / -1; }
}

.footsite__mark {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  color: var(--bone); letter-spacing: -0.03em; margin-bottom: 0.3rem;
}
.footsite__line { color: var(--text-dim); font-size: var(--s-1); font-family: var(--font-mono); }

.footsite__col { display: flex; flex-direction: column; gap: 0.55rem; }
.footsite__col h2 {
  font-family: var(--font-mono); font-size: var(--s-1); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--dune);
  margin-bottom: 0.3rem;
}
.footsite__col a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.footsite__col a:hover { color: var(--dune); }

.footsite__legal {
  border-top: 1px solid var(--line); padding-top: 1.5rem;
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.7;
  color: var(--text-dim); letter-spacing: 0.02em;
}
.footsite__legal p { margin-bottom: 0.4rem; }

/* ------------------------------------------------------------- reveals */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* -------------------------------------------------------------- mobile */

@media (max-width: 52rem) {
  .navtoggle {
    display: grid; place-items: center;
    width: 2.75rem; height: 2.75rem;
    background: none; border: 1px solid var(--line); cursor: pointer;
  }
  .navtoggle__bars, .navtoggle__bars::before, .navtoggle__bars::after {
    content: ""; display: block; width: 17px; height: 1.5px;
    background: var(--bone); transition: transform 0.25s var(--ease), opacity 0.2s;
  }
  .navtoggle__bars::before { transform: translateY(-5.5px); }
  .navtoggle__bars::after  { transform: translateY(4px); }
  .navtoggle[aria-expanded="true"] .navtoggle__bars { background: transparent; }
  .navtoggle[aria-expanded="true"] .navtoggle__bars::before { transform: rotate(45deg); }
  .navtoggle[aria-expanded="true"] .navtoggle__bars::after  { transform: rotate(-45deg) translateY(0); }

  .nav {
    position: fixed; inset: 4.5rem 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink-2); border-block: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-120%); transition: transform 0.32s var(--ease);
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 0.95rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
  .nav__cta { text-align: center; margin-top: 1rem; border-bottom: 0 !important; }
}

/* ------------------------------------------------------------ a11y prefs */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__eyes span { opacity: 0.7; }
}

@media print {
  .masthead, .nav, .hero__sky, .hero__stars, .dune { display: none; }
  body { background: #fff; color: #000; }
}
