/* ==========================================================================
   Do You Know Where You Are? — cinematic scroll sequence
   ========================================================================== */

@font-face {
  font-family: "Wobbly";
  src: url("../fonts/wobbly.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  /* The headline is invisible for the first two thirds of the scroll, so we
     can afford to block on the real face rather than flash a fallback. */
  font-display: block;
}

@font-face {
  font-family: "Skyline";
  src: url("../fonts/skyline.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  /* The menu is on screen immediately — swap so its text is never invisible. */
  font-display: swap;
}

/* Body copy. One variable file per style covers 300–800. */
@font-face {
  font-family: "Karla";
  src: url("../fonts/karla-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Karla";
  src: url("../fonts/karla-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */

:root {
  --black: #000;
  --white: #fff;
  --muted: rgba(255, 255, 255, 0.62);

  /* Sampled from the Use Your Illusion backdrops that anchor the two halves
     of the talk. Accents only — the ground stays black throughout. */
  --uyi1-red: #c9331b;
  --uyi1-amber: #f2a02c;
  --uyi2-blue: #3e90ce;
  --uyi2-indigo: #1e2a66;

  --display: "Wobbly", "Helvetica Neue", Arial, sans-serif;
  --menu: "Skyline", "Helvetica Neue", Arial, sans-serif;
  --body: "Karla", "Helvetica Neue", Arial, sans-serif;

  /* Clears the fixed top bar when an anchor link lands. */
  --topbar-height: 4rem;
}

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

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

html {
  /* ScrollTrigger drives the hero timeline; native smooth scrolling fights the
     scrub. Anchor links jump instead — the pin spacer is real layout, so they
     land correctly on their own. */
  scroll-behavior: auto;
}

/* Anchor targets clear the fixed bar. */
[id] {
  scroll-margin-top: calc(var(--topbar-height) + 1.5rem);
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  line-height: 1.65;
  overflow-x: hidden;
  /* The scroll length is set by ScrollTrigger's pin spacer, not by content. */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Vertical scroll only: block the horizontal/pinch gestures that make a
     pinned canvas feel loose on touch devices. */
  touch-action: pan-y;
  overscroll-behavior-y: none;
}

/* Nothing on a black page should carry the browser's default link blue. */
a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--uyi1-amber);
  outline-offset: 3px;
}

/* Scrolling is meaningless until the frames are in memory. */
body:not(.is-ready) {
  overflow: hidden;
}

/* ----------------------------------------------------------------- topbar */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  padding-top: max(0.85rem, env(safe-area-inset-top, 0px));

  background: rgba(28, 28, 30, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);

  font-family: var(--menu);
  text-transform: uppercase;
}

.topbar__brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.5em;
  text-decoration: none;
  color: #fff;
}

.topbar__title {
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar__subtitle {
  /* Same size as the title — the distinction is weight and colour, not scale. */
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.topbar__nav {
  /* Skyline stays on the brand; the items themselves read better in Karla. */
  font-family: var(--body);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem clamp(1rem, 2.2vw, 1.9rem);
}

.topbar__link {
  /* Skyline is a display face — it needs more size than a UI sans to stay
     legible at this scale. */
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.topbar__link:hover,
.topbar__link:focus-visible {
  color: #fff;
}

.topbar__cta {
  font-family: var(--body);
  padding: 0.62em 1.35em;
  border-radius: 999px;
  background: #b3121b; /* the red of the roses */
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(179, 18, 27, 0.42);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.topbar__cta:hover,
.topbar__cta:focus-visible {
  background: #d4161f;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(179, 18, 27, 0.55);
}

.topbar :focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

/* Narrow screens: the bar becomes two stacked rows, and the link row scrolls
   sideways rather than pushing the CTA off the edge. */
@media (max-width: 720px) {
  .topbar {
    gap: 0.6rem 1rem;
  }

  .topbar__brand {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1em;
  }

  .topbar__title {
    white-space: nowrap;
  }

  /* At the same size as the title the subtitle wraps to three lines and the
     bar swallows the hero. The title card carries it a screen later anyway. */
  .topbar__subtitle {
    display: none;
  }

  .topbar__cta {
    padding: 0.55em 1.05em;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
  }

  /* Row two, below the brand and the CTA. */
  .topbar__nav {
    order: 1;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    /* body sets pan-y, which would otherwise swallow the sideways drag. */
    touch-action: pan-x;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar__nav::-webkit-scrollbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar__cta:hover,
  .topbar__cta:focus-visible {
    transform: none;
  }
}

/* ------------------------------------------------------------------ stage */

.stage {
  position: relative;
  width: 100%;
  /* Small-viewport units keep the stage flush under mobile browser chrome. */
  height: 100vh;
  height: 100svh;
  background: #000;
  overflow: hidden;
}

.stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

/* --------------------------------------------------------------- headline */

.headline {
  position: absolute;
  /* Track the drawn artwork, not the viewport — on a letterboxed portrait
     screen the art sits at the top, and the headline must sit with it.
     JS publishes both values; the fallbacks cover the pre-paint frame. */
  left: 0;
  right: 0;
  top: var(--art-top, 0px);
  height: var(--art-height, 100%);
  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0;
  padding: 0 6vw;

  font-family: var(--display);
  font-weight: 400;
  /* Fluid from phone to ultrawide without a single media query. JS shrinks
     this further if the widest tracking would not fit — see fitHeadline(). */
  font-size: clamp(2rem, 7.5vw, 8.5rem);
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  /* Resting state: the font's own metrics, no manual tracking. GSAP opens it
     up at the start of the fade and closes back to this. */
  letter-spacing: 0;
  /* letter-spacing adds trailing space after the final glyph; pull it back
     so the line stays optically centred as the spacing animates. */
  text-indent: 0;

  /* Starts fully transparent — GSAP fades it in over the final third. */
  opacity: 0;
  will-change: opacity, transform, letter-spacing;
  pointer-events: none;
  user-select: none;

  /* A tight offset shadow for definition, over a wide ambient one that lifts
     the type off the brightest parts of the footage. */
  text-shadow:
    0 clamp(2px, 0.35vw, 5px) clamp(4px, 0.7vw, 10px) rgba(0, 0, 0, 0.65),
    0 0 clamp(20px, 4vw, 60px) rgba(0, 0, 0, 0.55);
}

/* The line count — and therefore the block's height and vertical centre — is
   fixed by the markup, not by how wide the tracking happens to be. Without
   this, tightening the letter-spacing collapses lines together mid-fade. */
.headline__line {
  display: block;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- sections */

/* The card comes to rest in the headline's own box — same rectangle, same
   optical centre — having risen from below the stage while the headline
   cleared out ahead of it. JS measures the travel; see cardRise(). */
.titlecard {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--art-top, 0px);
  height: var(--art-height, 100%);

  display: grid;
  place-content: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  padding: 0 6vw;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;

  /* At this scale the card overlaps the artwork rather than sitting under it,
     so it carries the headline's shadow treatment to stay legible over the
     revolvers' highlights. */
  text-shadow:
    0 clamp(2px, 0.3vw, 4px) clamp(4px, 0.6vw, 9px) rgba(0, 0, 0, 0.7),
    0 0 clamp(18px, 3.5vw, 50px) rgba(0, 0, 0, 0.6);
}

.titlecard__kicker {
  font-family: var(--menu);
  /* Deliberately out of proportion with the title: at 0.3em of tracking this
     line needs real size before it reads as a line rather than as texture. */
  font-size: clamp(1.15rem, 3vw, 2.3rem);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.titlecard__title {
  display: grid;
  gap: 0.32em;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
}

.titlecard__band {
  /* The lower bound is set by the narrowest phone: "Guns N' Roses" has to
     stay on one line inside the card's 6vw gutters. */
  font-size: clamp(2.9rem, 12.5vw, 10rem);
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  text-transform: uppercase;
}

.apos {
  display: inline-block;
  transform: translateY(-0.08em);
  /* Wobbly sets the quote on a wide sidebearing, and the word space after it
     compounds with the line's tracking. Both are pulled back by hand. */
  margin-left: -0.04em;
  margin-right: -0.14em;
}

.titlecard__sub {
  /* Only a starting point: JS solves the size that makes this line exactly as
     wide as the band name above it. The tracking below stays put — the width
     is bought with size, not with spacing. */
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  white-space: nowrap;
}

.section {
  /* Each section picks its own accent; everything below reads from this. */
  --accent: var(--uyi1-red);
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(3.5rem, 9vw, 7rem) 6vw;
}

.section--red { --accent: var(--uyi1-red); }
.section--blue { --accent: var(--uyi2-blue); }
.section--amber { --accent: var(--uyi1-amber); }

.section__head {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section__rule {
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-bottom: 1.25rem;
  background: var(--accent);
}

.section__title {
  font-family: var(--display);
  font-weight: 400;
  /* Deliberately below the hero's scale: display voice, editorial size. */
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  text-transform: uppercase;
}

.prose > * + * {
  margin-top: 1.4em;
}

.prose p {
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.86);
}

.pullquote {
  max-width: 46rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-left: clamp(1.25rem, 3vw, 2rem);
  border-left: 2px solid var(--accent);

  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 500;
  line-height: 1.4;
  font-style: italic;
}

/* ---------------------------------------------------------------- figures */

.figure {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  /* A hairline in the section accent, so the photo reads as framed rather
     than as a rectangle that happens to end. */
  border-bottom: 2px solid var(--accent);
}

/* -------------------------------------------------------------- rose list */

.rose-list {
  display: grid;
  gap: 1.1rem;
  max-width: 50rem;
  list-style: none;
}

.rose-list li {
  position: relative;
  padding-left: 2.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.rose-list li::before {
  content: "";
  position: absolute;
  left: 0;
  /* Optical centring on the first line, whatever the line-height computes to. */
  top: calc(0.82em - 0.65rem);
  width: 1.3rem;
  height: 1.3rem;
  background: url("../assets/rosebullet.png") center / contain no-repeat;
}

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

/* Portrait beside copy, stacking on anything narrow. The image column is
   fixed rather than fractional so the text measure stays readable. */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 22rem 1fr;
  }

  .split--wide {
    grid-template-columns: 1fr 1.15fr;
  }
}

.split .prose p {
  max-width: none;
}

/* Wider than the 62rem text column and tinted, so it reads as an interruption
   between two sections rather than as another one. */
.breakout {
  --accent: var(--uyi1-amber);
  max-width: 74rem;
  /* Flush left with the sections' text column — the same centring offset the
     .section rule produces, plus its gutter — and breaking out to the right
     only. Below 62rem both sides collapse to the plain gutter. */
  margin-block: clamp(1rem, 3vw, 2rem);
  margin-left: calc(max(0px, (100% - 62rem) / 2) + 6vw);
  margin-right: 6vw;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.02)
  );
  border-left: 3px solid var(--accent);
}

.breakout__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-indent: 0.05em;
  text-transform: uppercase;
}

.breakout__body {
  max-width: 46rem;
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.86);
}

.section__sub {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-indent: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.prose > .section__sub + p {
  margin-top: 0.85em;
}

.prose > * + .section__sub {
  margin-top: 2.2em;
}

.figure--portrait {
  margin-top: 0;
}

/* ----------------------------------------------------------------- quotes */

/* Columns rather than a grid: the cards are wildly different heights, and
   columns pack them with no gaps while keeping the client's order readable
   top-to-bottom, column by column. */
.quotes {
  columns: 1;
  column-gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 44rem) {
  .quotes { columns: 2; }
}

@media (min-width: 68rem) {
  .quotes { columns: 3; }
}

.quote {
  /* A card that breaks across a column boundary would read as two quotes. */
  break-inside: avoid;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.35rem, 2.5vw, 1.9rem);
  background: rgba(255, 255, 255, 0.04);
  border-top: 2px solid var(--accent);
}

/* Type size runs inversely to length, so every card lands at roughly the same
   weight on the page: a two-word verdict gets to be a headline, a paragraph
   gets to be read. Not a ranking — the order is the client's and is flat. */
.quote blockquote {
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.quote--short blockquote {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.25;
}

.quote--long blockquote {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.quote figcaption {
  margin-top: 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------ logos */

/* Three across, then two under them — left-aligned, so the row of two starts
   on the same edge as the section's rule and heading. */
.logos {
  --logo-gap: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--logo-gap);
  list-style: none;
}

.logo {
  flex: 0 1 calc((100% - 2 * var(--logo-gap)) / 3);
  display: grid;
  place-items: center start;
}

@media (max-width: 34rem) {
  .logo {
    flex-basis: calc((100% - var(--logo-gap)) / 2);
  }
}

.logo img {
  display: block;
  width: 100%;
  max-height: 4.5rem;
  object-fit: contain;
  /* The box fills its cell, so the mark inside it has to be pushed left too. */
  object-position: left center;
  /* Five unrelated marks in five palettes; flattening them to white is what
     makes the row read as one row. */
  filter: brightness(0) invert(1);
  opacity: 0.72;
  transition: opacity 0.3s ease;
}

/* elleve's mark is a disc with the wordmark cut out of it, so the same flat
   white treatment yields a white disc with the letters knocked through. A
   circle set to the wordmarks' height reads smaller than they do, so it is
   given more room to sit at the same optical weight. */
.logo--disc img {
  max-height: 6rem;
}

.logo img:hover {
  opacity: 1;
}

/* ------------------------------------------------------------------- form */

.contact {
  margin-top: 1.6em;
  list-style: none;
  display: grid;
  gap: 0.4rem;
  font-size: 1.05rem;
}

.contact a {
  color: var(--white);
  text-decoration-color: var(--accent);
  text-underline-offset: 0.25em;
}

.form {
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

/* Off-screen rather than display:none — a bot reading the DOM should still
   find it, and a screen reader skips it via aria-hidden on the wrapper. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  justify-self: start;
  margin-top: 0.5rem;
  padding: 0.85rem 1.9rem;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--uyi1-red);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: #e04529;
}

.button[disabled] {
  opacity: 0.55;
  cursor: default;
}

.form__status:empty {
  display: none;
}

.form__status {
  font-size: 0.95rem;
  color: var(--muted);
}

.form__status.is-error {
  color: var(--uyi1-amber);
}

.form__status.is-ok {
  color: var(--uyi2-blue);
}

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

.footer {
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5rem) 6vw clamp(3rem, 6vw, 4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.footer__title {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  text-transform: uppercase;
}

.footer__meta {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer__meta a {
  color: inherit;
}

/* --------------------------------------------------------------- preloader */

.loader {
  position: absolute;
  left: 50%;
  bottom: max(3rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(180px, 40vw);
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  transition: opacity 0.6s ease 0.15s;
}

.loader__bar {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease-out;
}

.loader.is-hidden {
  opacity: 0;
}

/* ------------------------------------------------------------ accessibility */

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

.fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* ------------------------------------------------------------ reduced motion */

/* The sequence itself is scroll-position, not autoplay, so it stays. We drop
   the loader's animation and let JS shorten the scrub instead. */
@media (prefers-reduced-motion: reduce) {
  .loader,
  .loader__bar {
    transition-duration: 0.01ms;
  }
}
