/* Rogue Rock Labs — studio site.
 *
 * High-altitude night: the sky an hour after sunset, seen from above the
 * treeline. Cold blue-black ground, one aurora gradient (violet → cyan) used
 * sparingly enough that it still counts as an event. The game site next door
 * is bright and sky-blue; this one is cold and quiet on purpose, and it
 * commits to a single dark look — a night sky has no light mode.
 *
 * Rogue Rock Display — the studio's own face, built from Orbitron under the
 * OFL — carries the wordmark and the small instrument-panel labels; Plus
 * Jakarta Sans carries everything read in sentences, so the page breathes. */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/plusjakartasans-200-800-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(../fonts/plusjakartasans-200-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* The studio's own display face — built from Orbitron under the OFL at the
   weight the designer drew, with the A rebuilt from the V and the stencil R
   cut into the glyph itself. Source and build script live in
   studio-site/brand/. */
@font-face {
  font-family: 'Rogue Rock Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/RogueRockDisplay-Regular.v2.woff2) format('woff2');
}

:root {
  --bg:        #05080F;   /* ground: deep blue-black                       */
  --bg-2:      #0A0F1B;   /* elevated surface                              */
  --ink:       #E9EDF5;   /* cool white                                    */
  --ink-2:     #8F9CB5;   /* 7.24:1 on --bg                                */
  --ink-3:     #6E7C97;   /* 4.77:1 on --bg — AA for small text            */
  --accent:    #8FA8FF;   /* 8.79:1 — labels, links                        */
  --accent-hi: #B9CBFF;
  --violet:    #8B7BFF;   /* aurora, cold end                              */
  --cyan:      #43C6DE;   /* aurora, warm end                              */
  --line:      rgba(143, 168, 255, 0.14);
  --line-soft: rgba(143, 168, 255, 0.07);
  --mol-blue:  #0EA5E9;   /* Molecule's primary, quoted on its card only    */
  --font: 'Plus Jakarta Sans', 'Noto Sans', system-ui, sans-serif;
  --mono: 'Rogue Rock Display', var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 350;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}

/* ── Parallax scene — fixed behind everything ───────────────────────── */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.top, main, .foot { position: relative; z-index: 1; }

/* ── Top row ────────────────────────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem clamp(1.2rem, 5vw, 3rem);
  background: rgba(5, 8, 15, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(143, 168, 255, 0.06);
}

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

/* ── The wordmark ───────────────────────────────────────────────────
   Everything the wordmark used to fake in CSS — the weight via text-stroke,
   the stencil R via clip-path on a hand-wrapped span — now lives in the font
   file itself. The markup is plain text again, and the letterform travels
   into Figma, PDF and print unchanged. */
.wordmark {
  font-family: 'Rogue Rock Display', var(--font);
  font-size: 1.24rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  white-space: nowrap;
}

/* The aurora touches type in exactly one place. */
.wm-rogue {
  background: linear-gradient(105deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.top-contact {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.top-contact:hover, .top-contact:focus-visible { color: var(--accent-hi); border-color: var(--accent); }

@media (max-width: 520px) {
  .wordmark { font-size: 0.82rem; letter-spacing: 0.05em; }
}

/* ── Shared column ──────────────────────────────────────────────────── */

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 5vw, 2rem) 4rem;
}

.label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

/* ── Hero ───────────────────────────────────────────────────────────── */

/* No min-height. It reserved most of a screen and the copy filled about half
   of it, so the hero opened with 131px of nothing above the eyebrow and 127px
   below the last line - read as a gap in the page rather than as air around
   the type. The section is its content plus its padding now, which is the
   same 70/66 top and bottom the rest of the page uses. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
  /* 3.5rem below, not 5rem: every other section pads 3.5rem, so the extra was
     making the hero's own boundary 24px wider than the rest of the page's. */
  padding: 3.5rem 0;
}

/* Two columns, and the badge sits level with the headline rather than with the
   whole column of copy - centred on the block it belongs to, it drifted well
   below the line it is meant to answer. Dissolving .hero-copy lets the
   headline and the badge share one grid row and centre on each other, so the
   alignment survives the headline rewrapping instead of resting on a measured
   offset that would go stale. The children keep their own margins, which is
   what preserves the column's rhythm once the wrapper is gone; row-gap is
   zeroed so the grid does not add a second helping of space between them. */
@media (min-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
      "eyebrow ."
      "title   emblem"
      "thesis  .";
    row-gap: 0;
    align-items: start;
    /* Auto rows share out any slack the section has between them, which would
       silently loosen the spacing the copy's own margins set. Keeping the rows
       centred as a block lets the margins go on saying what the rhythm is,
       whatever height the section ends up with. */
    align-content: center;
  }
  .hero-copy { display: contents; }
  .hero .eyebrow { grid-area: eyebrow; }
  .hero h1 { grid-area: title; align-self: center; }
  .hero .thesis { grid-area: thesis; }
  .hero-emblem { grid-area: emblem; align-self: center; }
}

/* ── The coin: the badge as an object, not an image ──────────────────── */

.hero-emblem { display: flex; justify-content: center; }

.coin {
  position: relative;
  width: min(58vw, 340px);
  aspect-ratio: 512 / 469;
}

/* The dark badge is drawn for light grounds: on this one its graphite lower
   segment measures 1.02:1 against the sky behind it, so the disc loses its
   own silhouette and the mark reads as a dome with the name floating under
   it. The halo does one job - close the circle. Cool rather than violet,
   because violet could not separate from an aurora that is already violet;
   and at 0.16, which is the lowest value that shuts the silhouette. Measured
   against 0.24 and 0.32, both of which stop being light on an object and
   start being a glow effect. */
.coin img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.55))
          drop-shadow(0 0 22px rgba(185, 203, 255, 0.16));
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.6rem;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 240;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
  max-width: 14ch;
}

.thesis {
  margin-top: 1.9rem;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 350;
  color: var(--ink-2);
  max-width: 46ch;
}

/* ── Work card ──────────────────────────────────────────────────────── */

.work { padding: 3.5rem 0; border-top: 1px solid var(--line-soft); }

.card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.8rem 1.9rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 15, 27, 0.6);
  backdrop-filter: blur(3px);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.card:hover, .card:focus-visible {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(10, 15, 27, 0.78);
  transform: perspective(800px) rotateX(var(--cardTiltX, 0deg)) rotateY(var(--cardTiltY, 0deg)) translateY(-3px);
}

.card-mark {
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #F1F5F9;
}
.card-e { color: var(--mol-blue); }

.card-copy {
  font-size: 0.95rem;
  color: var(--ink-2);
  max-width: 52ch;
}

/* On a narrow card the row ran out of room and both halves broke mid-phrase -
   the chip wrapping inside its own pill, the link splitting the domain. They
   wrap as whole pieces now, and the row stacks rather than tearing. */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  margin-top: 0.3rem;
}

.chip {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mol-blue);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  padding: 0.38rem 0.8rem 0.3rem;
  white-space: nowrap;
}

.card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.card:hover .card-link, .card:focus-visible .card-link { color: var(--mol-blue); }

/* ── Contact / footer ───────────────────────────────────────────────── */

.contact { padding: 3.5rem 0 2rem; border-top: 1px solid var(--line-soft); }

.contact-lede {
  font-size: 0.98rem;
  color: var(--ink-2);
  margin-bottom: 1.2rem;
  max-width: 52ch;
}

.mail {
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.mail:hover, .mail:focus-visible { color: var(--accent-hi); border-color: var(--accent); }

.back-line { margin-top: 2.2rem; }

.foot {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem clamp(1.2rem, 5vw, 2rem) 3rem;
  font-size: 0.78rem;
  color: var(--ink-3);
  border-top: 1px solid var(--line-soft);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Reveal on scroll ───────────────────────────────────────────────── */

/* Hidden only once the script has confirmed it can reveal them again —
   otherwise a JS failure would leave the page blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ── Focus & motion ─────────────────────────────────────────────────── */

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover, .card:focus-visible { transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}
