/* ==========================================================================
   scenes.css - hero, numbers (analytics), work (media / videos / text-only),
                contact composition
   ========================================================================== */

/* ---------------------------------------------------------- 1. hero ------ */
.scene--hero {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + var(--sp-7)) var(--sp-7);
  place-items: center;
  overflow: hidden;
  background-color: var(--bg-deep);
}

/* Fixed wallpaper layer: pinned to the viewport so the background NEVER moves
   while the hero text scrolls over it - the 3D "text floats in front" effect.
   It stays the deepest layer for the whole page; every later scene paints
   over it (DOM order). The ::after wash keeps text readable on any wallpaper. */
.hero__bg {
  position: fixed;
  inset: 0;
  background-color: var(--bg-deep);
  background-image: linear-gradient(155deg, #0B1226 0%, #060A16 46%, #04070F 100%);
  background-size: cover;
  background-position: center;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 52% at 50% 46%, rgba(4, 7, 15, 0.62) 0%, rgba(4, 7, 15, 0) 100%),
    linear-gradient(180deg, rgba(4, 7, 15, 0.5) 0%, rgba(4, 7, 15, 0.3) 45%, rgba(4, 7, 15, 0.68) 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--sp-5);
  text-align: center;
}

.hero__title {
  font-family: var(--font-hero);
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  /* Intense shadow drop: hard contact edge + two heavy ambient layers, so the
     pure-white letters stay razor-sharp and readable over any wallpaper. */
  filter:
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95))
    drop-shadow(0 10px 26px rgba(0, 0, 0, 0.95))
    drop-shadow(0 28px 64px rgba(0, 0, 0, 0.85));
}

.hero__name,
.hero__surname {
  display: block;
  color: #FFFFFF;
}

.hero__tagline {
  color: var(--text);
  font-size: var(--fs-lede);
  font-weight: 600;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.95),
    0 10px 34px rgba(0, 0, 0, 0.8);
}

.hero__hint {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  margin-block-start: var(--sp-6);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 8px 24px rgba(0, 0, 0, 0.85);
}

.hero__hint::after {
  content: "";
  width: 1px;
  height: 3rem;
  background-color: var(--line-strong);
}

/* -------------------------------------------------- 2. numbers scene ----- */
.scene--numbers {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--bg-page);
}

.numbers__inner {
  display: grid;
  gap: var(--sp-5);
}

.section-head {
  display: grid;
  gap: var(--sp-4);
  max-width: 58ch;
}

.section-head h2 {
  font-size: var(--fs-h2);
}

/* ------------------------------------------------------ 3. work scenes --- */
.scene--work {
  border-top: 1px solid var(--line);
  background-color: var(--bg-page);
}

.work-root .scene--work:nth-child(even) {
  background-color: var(--bg-panel);
}

.work__inner {
  display: grid;
  gap: var(--sp-7);
}

.work__text {
  display: grid;
  align-content: start;
}

.work__title {
  margin-block-start: var(--sp-4);
  margin-block-end: var(--sp-5);
  font-size: var(--fs-h2);
}

.work__blurb {
  max-width: 46ch;
  margin-block-start: var(--sp-4);
  color: var(--text-muted);
}

/* ----------------------------------------------------- 4. contact scene -- */
/* padding-bottom 0: the scene runs straight into the footer, so the portrait's
   cut-off bottom edge sits exactly on top of it - nothing visible below. */
.scene--contact {
  overflow: hidden;
  padding-block: var(--scene-pad) 0;
  background-color: var(--bg-deep);
}

.contact__bg {
  position: absolute;
  inset: 7% 4% 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background-color: var(--bg-panel);
}

.contact__inner {
  position: relative;
  display: grid;
  gap: var(--sp-8);
  align-items: stretch;
}

/* Unframed transparent cut-out: fills its column, bottom flush with the
   footer, no border / radius / shadow - it simply stands on the panel. */
.contact__media {
  position: relative;
  align-self: end;
}

.contact__portrait {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.contact__body {
  display: grid;
  align-content: center;
}

.contact__title {
  margin-block-start: var(--sp-4);
  font-size: var(--fs-h2);
}

.contact__message {
  max-width: 48ch;
  margin-block-start: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-lede);
}

/* Sits beside the LinkedIn pill (see .contact__actions), not under it. */
.contact__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-block-start: 0;
}

/* ------------------------------------------------------ 5. breakpoints --- */
@media (min-width: 860px) {
  .contact__inner {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: var(--sp-9);
  }
}

@media (min-width: 1100px) {
  .work__inner {
    grid-template-columns: minmax(17rem, 0.8fr) minmax(0, 1.7fr);
    gap: var(--sp-8);
    align-items: start;
  }

  .work__text {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-6));
  }
}

@media (max-width: 860px) {
  .scene--numbers {
    min-height: 0;
    padding-block: var(--scene-pad);
  }

  .chart__label {
    width: 6.5rem;
  }
}

@media (max-width: 600px) {
  .hero__title {
    line-height: 1;
  }

  /* Channel labels leave the axis track and wrap under the chart. */
  .chart__labels {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-3) var(--sp-4);
    height: auto;
    margin-block-start: var(--sp-4);
    padding-block-start: var(--sp-4);
    border-top: 1px solid var(--line);
  }

  .chart__label {
    position: static;
    width: auto;
    transform: none !important;
    flex-direction: row;
    gap: var(--sp-2);
    padding: var(--sp-1) var(--sp-3);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background-color: var(--bg-panel);
  }

  .stat-row {
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  }

  .spec__row {
    gap: var(--sp-4);
  }
}

/* ------------------------------------------- 6. text-only work scenes ---- */
/* No imagery beyond an optional single feature image: the type carries the
   section (writing & worldbuilding, games & localization). Kept last in the
   file so these overrides win over the breakpoint rules above (.work__text
   sticky, .work__inner columns).

   Composition - one page read top to bottom, with the same head rhythm as the
   numbers section (eyebrow -> display title -> standfirst):

     eyebrow
     TITLE
     [ standfirst | feature image ]     <- .work__head-band
     ----------------------------------
     body copy, two columns once wide
     ----------------------------------
     NOVEL | WORLD | LANGUAGES | SINCE  <- .spec, full-width fact band
     ----------------------------------
     " pull quote "                     <- closing line

   Facts and the quote are re-ordered to sit after the body at every width, so
   the phone order matches the desktop one. */
.work__inner--text {
  grid-template-columns: minmax(0, 1fr);
}

.work__text--full {
  position: static;
  top: auto;
  max-width: 62ch;
}

.work__text--full > .spec {
  order: 1;
}

/* Standfirst, with the section's optional feature image beside it once wide. */
.work__head-band {
  display: grid;
  gap: var(--sp-6);
}

/* No margin on the band items here: vertical rhythm comes from the grid gap,
   and at >=960px the band centres lead and artwork against each other. */
.work__head-band > .work__lead {
  margin-block-start: 0;
}

.work__lead {
  max-width: 46ch;
  margin-block-start: var(--sp-5);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
}

.work__head-band > .feature {
  margin-block-start: 0;
}

.prose {
  margin-block-start: var(--sp-6);
}

.prose p {
  margin-block-start: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-lede);
  line-height: var(--lh-body);
}

.prose p:first-child {
  margin-block-start: 0;
}

/* Editorial drop cap on the opening paragraph. */
.prose p:first-child::first-letter {
  float: left;
  padding-inline-end: 0.09em;
  color: var(--gold);
  font-family: var(--font-hero);
  font-size: 3.4em;
  line-height: 0.78;
}

/* Closing line: display quote against a gold rule. */
.pullquote {
  order: 2;
  margin-block-start: var(--sp-7);
  padding-inline-start: var(--sp-5);
  border-inline-start: 2px solid var(--gold);
}

.pullquote p {
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
}

/* Optional single image on a text section (the shipped game, a cover...):
   the artwork is the link out, the caption names it and repeats the link. */
.feature {
  margin-block-start: var(--sp-5);
}

.feature__link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background-color: var(--bg-panel);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.feature__img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform var(--dur-mid) var(--ease-out);
}

.feature__cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-4);
  padding-block-start: var(--sp-2);
}

.feature__name {
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.feature__cta {
  color: var(--gold);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.feature__cta::after {
  content: "\2197";
  padding-inline-start: 0.35em;
}

/* From 960px (covers tablet landscape) the page stops hugging the left edge
   and every band runs the full width of the shell: the standfirst and the
   feature image share a band, the body copy is set in two columns under a
   hairline, and the facts become a full-width band of cells separated by the
   same hairline. */
@media (min-width: 960px) {
  .work__text--full {
    max-width: none;
  }

  .work__head-band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    column-gap: var(--sp-9);
  }

  /* Artwork is vertically centred against the lead line. */
  .work__head-band > .feature {
    margin-block-start: 0;
  }

  /* Body band: hairline above, hairline between the two columns. */
  .work__text--full > .prose {
    column-count: 2;
    column-gap: var(--sp-9);
    column-rule: 1px solid var(--line);
    margin-block-start: var(--sp-7);
    padding-block-start: var(--sp-6);
    border-block-start: 1px solid var(--line);
  }

  /* Fact band: one cell per fact, rules above, below and between. */
  .work__text--full > .spec {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    max-width: none;
    margin-block-start: var(--sp-7);
    border-block: 1px solid var(--line);
  }

  .work__text--full > .spec .spec__row {
    display: grid;
    align-content: start;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-5);
    border: 0;
  }

  .work__text--full > .spec .spec__row:first-child {
    padding-inline-start: 0;
  }

  .work__text--full > .spec .spec__row + .spec__row {
    border-inline-start: 1px solid var(--line);
  }

  .work__text--full > .spec dd {
    text-align: start;
  }

  /* Artwork stays near its native size - it is a 460px Steam asset. */
  .work__text--full > .feature {
    max-width: 32rem;
  }

  .work__text--full > .pullquote {
    margin-block-start: var(--sp-7);
  }
}