/* ==========================================================================
   ALHYANE STUDIO — PROJECT HELL
   Single stylesheet. No build step, no dependencies.

   HOW THIS FILE IS ORGANISED
   1.  Design tokens (colours, fonts, spacing)  <- change the look from here
   2.  Reset & base
   3.  Accessibility helpers
   4.  Layout & typography helpers
   5.  Buttons
   6.  Header & navigation
   7.  Hero
   8.  Marquee strip
   9.  Studio
   10. The Game
   11. Seven Layers
   12. Story
   13. Features
   14. Development
   15. Contact
   16. Footer
   17. Scroll-reveal animations
   18. Responsive breakpoints
   19. Reduced-motion overrides
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   Change these values to re-theme the whole site in seconds.
   ========================================================================== */
:root {
  /* Colours */
  --bg:            #08090b;   /* page background            */
  --bg-deep:       #040506;   /* darker panels / footer     */
  --bg-raised:     #0d0f13;   /* cards, inputs              */
  --line:          rgba(236, 232, 225, 0.10);  /* hairline rules */
  --line-strong:   rgba(236, 232, 225, 0.24);

  --ink:           #ece8e1;   /* main text   */
  --ink-dim:       #a3a09a;   /* body copy   */
  --ink-faint:     #6b6760;   /* captions    */

  --ember:         #d9482f;   /* accent — blood red  */
  --ember-soft:    #e5774a;   /* accent hover        */
  --amber:         #c9904e;   /* secondary accent    */

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Metrics */
  --container: 1280px;
  --gutter:    clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(5.5rem, 11vw, 10rem);
  --header-h:  76px;

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


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle film grain over everything — gives the page a cinematic texture
   instead of the flat, obviously-template look. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 300;
  line-height: 1.08;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--ember); color: #fff; }

/* Anchor offset, so section headings don't hide under the fixed header */
[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }


/* ==========================================================================
   3. ACCESSIBILITY HELPERS
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--ember);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.skip-link:focus { top: 1rem; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}


/* ==========================================================================
   4. LAYOUT & TYPOGRAPHY HELPERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

/* Small uppercase label that opens every section */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
  color: var(--amber);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: clamp(1.5rem, 4vw, 3.5rem);
  height: 1px;
  background: var(--ember);
  opacity: 0.8;
}

/* The big serif headline used for every section */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  max-width: 62ch;
  margin-top: 1.75rem;
  color: var(--ink-dim);
  font-size: clamp(1.0625rem, 1.05rem + 0.35vw, 1.25rem);
  line-height: 1.8;
  text-wrap: pretty;
}
.lead--narrow { max-width: 54ch; }


/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.9rem 2.25rem;
  border: 1px solid transparent;
  overflow: hidden;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease),
              background-color 0.4s var(--ease);
}

/* Sliding fill that wipes up on hover — one subtle motion, reused */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}
.btn:hover::before { transform: scaleY(1); }

.btn > * { position: relative; }

.btn--solid {
  background: var(--ember);
  color: #fff;
  border-color: var(--ember);
}
.btn--solid::before { background: #fff; }
.btn--solid:hover { color: var(--bg); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.btn--ghost::before { background: var(--ember); }
.btn--ghost:hover { border-color: var(--ember); color: #fff; }


/* ==========================================================================
   6. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease),
              backdrop-filter 0.45s var(--ease);
}
/* Added by JS once the user scrolls past the hero top */
.site-header.is-scrolled {
  background: rgba(6, 7, 9, 0.82);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(140%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1.5rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.nav__brand-thin {
  color: var(--ink-faint);
  font-weight: 200;
  letter-spacing: 0.26em;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
}

.nav__link {
  position: relative;
  padding-block: 0.4rem;
  color: var(--ink-dim);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.35s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover,
.nav__link[aria-current="true"] { color: var(--ink); }
.nav__link:hover::after,
.nav__link[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Mobile menu button — hidden on desktop */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 1px;
  margin: 6px auto;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }


/* ==========================================================================
   7. HERO
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 3rem) 6rem;
  overflow: hidden;
  text-align: center;
}

.hero__bg { position: absolute; inset: 0; z-index: 0; }

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.72) contrast(1.06) saturate(0.88);
  /* Slow push-in — the only "always on" motion in the hero */
  animation: heroDrift 28s var(--ease) infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.13); }
}

/* Layered vignette so text always stays readable over the image */
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(115% 75% at 50% 18%, transparent 0%, rgba(4, 5, 6, 0.55) 62%, var(--bg) 100%),
    linear-gradient(180deg,
      rgba(4, 5, 6, 0.72) 0%,
      rgba(4, 5, 6, 0.10) 32%,
      rgba(4, 5, 6, 0.20) 58%,
      rgba(4, 5, 6, 0.95) 100%);
}

.hero__embers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__content { position: relative; z-index: 2; }

.hero__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 15vw, 12rem);
  font-weight: 300;
  line-height: 0.82;
  letter-spacing: 0.02em;
  text-shadow: 0 0 90px rgba(217, 72, 47, 0.28);
}

.hero__tagline {
  max-width: 34ch;
  margin: 2rem auto 0;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 1vw, 1.75rem);
  font-style: italic;
  line-height: 1.45;
  text-wrap: balance;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}

.hero__scrollcue {
  position: absolute;
  left: 50%;
  bottom: 2.25rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transform: translateX(-50%);
  color: var(--ink-faint);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.35s var(--ease);
}
.hero__scrollcue:hover { color: var(--ember); }
.hero__scrollcue svg { animation: cueBob 2.6s var(--ease) infinite; }
@keyframes cueBob {
  0%, 100% { transform: translateY(0);    opacity: 0.5; }
  50%      { transform: translateY(5px);  opacity: 1;   }
}


/* ==========================================================================
   8. MARQUEE STRIP
   ========================================================================== */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 1.15rem;
  border-block: 1px solid var(--line);
  background: var(--bg-deep);
  /* Fades the edges out instead of a hard cut */
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 46s linear infinite;
}
/* The two spans are identical, so -50% loops seamlessly */
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

.marquee__track > span {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__track i {
  color: var(--ember);
  font-size: 0.55em;
  font-style: normal;
}


/* ==========================================================================
   9. STUDIO
   ========================================================================== */
.studio__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.index-list {
  display: grid;
  margin-top: 2.75rem;
  border-top: 1px solid var(--line);
}
.index-list li {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
  transition: color 0.35s var(--ease), padding-left 0.4s var(--ease);
}
.index-list li:hover {
  padding-left: 0.6rem;
  color: var(--ember);
}
.index-list span {
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
}


/* ==========================================================================
   10. THE GAME
   ========================================================================== */
.concept-list {
  display: grid;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.concept-list__row {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  align-items: baseline;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.concept-list dt {
  color: var(--amber);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.concept-list dd {
  margin: 0;
  color: var(--ink-dim);
}


/* ==========================================================================
   11. SEVEN LAYERS
   ========================================================================== */
.layers { position: relative; }

/* Vertical decorative word running down the left edge */
.layers__edge {
  position: absolute;
  top: var(--section-y);
  left: clamp(0.5rem, 1.6vw, 1.5rem);
  color: var(--ink-faint);
  font-size: 0.625rem;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.layers__list { margin-top: clamp(3rem, 6vw, 4.5rem); }

.layer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.75rem, 5.5vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.layer:last-child { border-bottom: 1px solid var(--line); }

/* Alternate the sides so the descent zig-zags down the page */
.layer:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
.layer:nth-child(even) .layer__media { order: 2; }
.layer:nth-child(even) .layer__body  { order: 1; }

/* Huge outlined Roman numeral sitting behind the text block */
.layer__numeral {
  position: absolute;
  top: -0.18em;
  z-index: 0;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(5rem, 13vw, 11rem);
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(217, 72, 47, 0.20);
  pointer-events: none;
  user-select: none;
}
.layer:nth-child(odd)  .layer__numeral { right: 0; }
.layer:nth-child(even) .layer__numeral { left: 0; }

.layer__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.layer__media::after {
  /* Inner shadow keeps the artwork grounded in the dark theme */
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px 20px rgba(4, 5, 6, 0.65);
}
.layer__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: brightness(0.8) contrast(1.05) saturate(0.9);
  transition: transform 1s var(--ease), filter 0.6s var(--ease);
}
.layer:hover .layer__media img {
  transform: scale(1.045);
  filter: brightness(0.94) contrast(1.05) saturate(1);
}

.layer__body { position: relative; z-index: 1; }

.layer__count {
  color: var(--amber);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.layer__name {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  letter-spacing: -0.005em;
}

.layer__desc {
  max-width: 46ch;
  margin-top: 1.1rem;
  color: var(--ink-dim);
  line-height: 1.8;
}

/* The final layer gets the accent treatment */
.layer--final .layer__name { color: var(--ember-soft); }
.layer--final .layer__media { border-color: rgba(217, 72, 47, 0.45); }
.layer--final .layer__media img { filter: brightness(0.9) contrast(1.06) saturate(1.05); }


/* ==========================================================================
   12. STORY
   ========================================================================== */
.story {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
}
.story__bg { position: absolute; inset: 0; z-index: 0; }
.story__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42) contrast(1.1) saturate(0.75);
}
.story__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 4%, rgba(8, 9, 11, 0.82) 46%, rgba(8, 9, 11, 0.45) 100%),
    linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 78%, var(--bg) 100%);
}

.story__inner { position: relative; z-index: 1; }

.story__text {
  display: grid;
  gap: 1.35rem;
  max-width: 58ch;
  margin-top: 2rem;
  color: var(--ink-dim);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.85;
}
.story__text p { text-wrap: pretty; }

/* Final beat of the story — emphasised */
.story__final {
  margin-top: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
  color: var(--ink);
}
.story__final em { color: var(--ember-soft); font-style: italic; }


/* ==========================================================================
   13. FEATURES
   Cards share 1px borders drawn by the grid background — a spec-sheet
   look rather than six floating boxes.
   ========================================================================== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  background: var(--line);
  border: 1px solid var(--line);
}

.feature {
  position: relative;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  background: var(--bg);
  transition: background-color 0.45s var(--ease);
}
.feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.feature:hover { background: var(--bg-raised); }
.feature:hover::before { transform: scaleX(1); }

.feature__index {
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  letter-spacing: 0.18em;
  transition: color 0.4s var(--ease);
}
.feature:hover .feature__index { color: var(--ember); }

.feature__title {
  margin-top: 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}

.feature__desc {
  margin-top: 0.85rem;
  color: var(--ink-dim);
  font-size: 0.9375rem;
  line-height: 1.75;
}


/* ==========================================================================
   14. DEVELOPMENT
   ========================================================================== */
.dev { border-top: 1px solid var(--line); }

.dev__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

/* Pulsing status dot */
.dev__status {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.25rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--ink);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.dev__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  flex: none;
}
.dev__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ember);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(3.2); opacity: 0;   }
  100% { transform: scale(3.2); opacity: 0;   }
}

.dev__meters { display: grid; gap: 1.75rem; }

.meter__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  color: var(--ink-dim);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.meter__head span:last-child { color: var(--ink); }

.meter {
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.meter span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--ember), var(--amber));
}
/* Animate the fill in when the block scrolls into view */
html.js .meter span {
  width: 0;
  transition: width 1.5s var(--ease) 0.25s;
}
html.js .dev__meters.is-visible .meter span { width: var(--value); }


/* ==========================================================================
   15. CONTACT
   ========================================================================== */
.contact { border-top: 1px solid var(--line); }

.contact__mail {
  display: inline-block;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: 0.35rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.6vw, 3.4rem);
  line-height: 1.15;
  border-bottom: 1px solid var(--line-strong);
  word-break: break-word;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.contact__mail:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.5rem;
  margin-top: 3rem;
  border-top: 1px solid var(--line);
}
.contact__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-block: 1.15rem;
  color: var(--ink-dim);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.35s var(--ease);
}
.contact__links a span {
  font-size: 0.9em;
  transition: transform 0.35s var(--ease);
}
.contact__links a:hover { color: var(--ember); }
.contact__links a:hover span { transform: translate(2px, -2px); }


/* ==========================================================================
   16. FOOTER
   ========================================================================== */
.site-footer {
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}

.footer__logo {
  display: inline-flex;
  gap: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.footer__logo span { color: var(--ink-faint); font-weight: 200; }

.footer__tagline {
  margin-top: 1.1rem;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.6;
}

.footer__heading {
  margin-bottom: 1.25rem;
  color: var(--amber);
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.footer__col ul { display: grid; gap: 0.65rem; }
.footer__col a {
  color: var(--ink-dim);
  font-size: 0.875rem;
  transition: color 0.3s var(--ease);
}
.footer__col a:hover { color: var(--ember); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.75rem;
}
.footer__legal { color: var(--ink-faint); }

.footer__top {
  color: var(--ink-dim);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease);
}
.footer__top:hover { color: var(--ember); }


/* ==========================================================================
   17. SCROLL-REVEAL ANIMATIONS
   Elements get .reveal in the HTML and .is-visible from JS.
   The html.js gate means content is always visible without JavaScript.
   ========================================================================== */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease) var(--reveal-delay, 0s),
    transform 0.9s var(--ease) var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* ==========================================================================
   18. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* --- Tablet and below --- */
@media (max-width: 1024px) {
  /* Vertical edge label would collide with content — drop it */
  .layers__edge { display: none; }

  .studio__grid,
  .dev__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Mobile navigation --- */
@media (max-width: 860px) {
  .nav__toggle { display: block; }

  .nav__menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem var(--gutter) 2.5rem;
    background: rgba(6, 7, 9, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    /* Hidden by default; .is-open slides it down */
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
                visibility 0.35s var(--ease);
  }
  .nav__menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__menu li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav__link {
    display: block;
    padding-block: 1.15rem;
    font-size: 0.8125rem;
  }
  .nav__link::after { display: none; }

  /* Layers stack: image on top, text below, always */
  .layer,
  .layer:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .layer:nth-child(even) .layer__media { order: 1; }
  .layer:nth-child(even) .layer__body  { order: 2; }

  .layer__numeral { font-size: clamp(4.5rem, 22vw, 8rem); top: 0.1em; }
  .layer:nth-child(odd)  .layer__numeral,
  .layer:nth-child(even) .layer__numeral { right: 0.05em; left: auto; }

  .layer__media img { aspect-ratio: 16 / 11; }

  .concept-list__row { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
}

/* --- Small phones --- */
@media (max-width: 560px) {
  :root { --header-h: 64px; }

  .hero { min-height: 92svh; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .hero__scrollcue { display: none; }

  .story__bg::after {
    background:
      linear-gradient(180deg, var(--bg) 0%, rgba(8, 9, 11, 0.78) 35%, rgba(8, 9, 11, 0.92) 100%);
  }

  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}


/* ==========================================================================
   19. REDUCED MOTION
   Respect the user's OS setting: no drifting, no pulses, no reveals.
   ========================================================================== */
@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;
  }

  html.js .reveal { opacity: 1; transform: none; }
  html.js .meter span { width: var(--value); }
  .hero__embers { display: none; }
}
