/* =====================================================================
   WAYDAZ Studio home page (v4)
   A character studio wears its character's colours: the hero floods with
   RAWRK's belly lime, the character stage flips between Rage and Relax,
   and the studio itself stays ink on paper.
   Type: Anybody (display, variable width) + Archivo (text). Nothing else.
   ===================================================================== */

:root {
  --paper: #f4f5f0;
  --white: #ffffff;
  --ink: #101311;
  --ink-soft: rgba(16, 19, 17, .78);
  --muted: #4b524c;
  --line: rgba(16, 19, 17, .14);
  --lime: #dbf952;          /* RAWRK's belly */
  --green-deep: #1d5524;    /* RAWRK's suit, darkened for hover states */
  --rage: #ff7a59;          /* Rage series flood */
  --relax: #a9d9ff;         /* Relax series flood */
  --on-ink: #f4f5f0;
  --muted-on-ink: #aeb5ad;
  --line-on-ink: rgba(244, 245, 240, .2);

  --f-display: "Anybody", "Arial Black", "Helvetica Neue", sans-serif;
  --f-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* the whole page runs on three text sizes (hero + wordmarks excepted) */
  --text-heading: clamp(2rem, 1.05rem + 3.9vw, 4.25rem);
  --text-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --text-sm: .9375rem;

  --gut: clamp(18px, 4vw, 56px);
  --nav-h: 60px;
  --section-y: clamp(72px, 10vw, 150px);
  --ease: cubic-bezier(.22, 1, .36, 1);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--text-body)/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 900;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  letter-spacing: -.022em;
  line-height: 1;
  text-wrap: balance;
}
h2 { font-size: var(--text-heading); }
h3 { font-size: var(--text-body); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: var(--on-ink);
  padding: 12px 16px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
:focus-visible { outline: 3px solid var(--focus, var(--ink)); outline-offset: 3px; }

/* ---------- the one button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 54px; padding: 0 1.6em;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 700 var(--text-body)/1 var(--f-body);
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1.15em; height: 1.15em; transition: transform .2s var(--ease); }
.btn:hover { background: var(--green-deep); }
.btn:hover svg { transform: translateX(4px); }
.btn--down:hover svg { transform: translateY(4px); }
.btn:active { transform: scale(.97); }

/* ---------- nav: borderless over the hero, gains a surface once scrolled ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .24s var(--ease), box-shadow .24s var(--ease);
}
.nav__bar {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-inline: var(--gut);
}
.nav__brand {
  font: 900 1.4rem/1 var(--f-display);
  font-stretch: 150%;
  font-variation-settings: "wdth" 150;
  letter-spacing: -.01em;
  text-decoration: none;
  padding-block: 10px;
}
.nav__links { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.nav__links a {
  display: inline-block; padding-block: 12px;
  font: 600 var(--text-sm)/1 var(--f-body);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left 84% / 0 2px no-repeat;
  transition: background-size .2s var(--ease);
}
.nav__links a:hover { background-size: 100% 2px; }
.nav.is-stuck {
  background: rgba(244, 245, 240, .92);
  -webkit-backdrop-filter: saturate(1.3) blur(12px); backdrop-filter: saturate(1.3) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
@media (max-width: 440px) {
  .nav__brand { font-size: 1.15rem; }
  .nav__links { gap: 12px; }
}
@media (max-width: 379px) {
  .nav__bar { gap: 10px; }
  .nav__brand { font-size: 1.02rem; }
  .nav__links { gap: 10px; }
}

/* ---------- hero: WAYDAZ behind, RAWRK in front ---------- */
.hero {
  --hero-h: 100svh;
  position: relative; isolation: isolate;
  display: grid; grid-template-rows: auto auto 1fr;
  min-height: var(--hero-h);
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  background: var(--lime);
  overflow: clip;
}
.hero__mega {
  --mega-size: min(30svh, 33vw);
  position: relative; z-index: 1;
  margin: 8px 10px 0;
  font: 900 var(--mega-fs, var(--mega-size))/.8 var(--f-display);
  white-space: nowrap; text-align: center;
  user-select: none; pointer-events: none;
}
.hero__mega span {
  display: inline-block;
  font-variation-settings: "wdth" var(--wdth, 50);
}
.hero__mega i { font-style: normal; }
.hero__char {
  position: relative; z-index: 2;
  justify-self: center;
  width: auto; max-width: none;
  height: clamp(250px, 50svh, 560px);
  margin-top: calc(var(--mega-fs, 33vw) * -.3);
}
.hero__text {
  position: relative; z-index: 3;
  display: grid; gap: 14px; align-content: end;
  padding: 12px var(--gut) max(26px, env(safe-area-inset-bottom, 0px));
}
.hero h1 { font-size: clamp(1.7rem, .55rem + 2.35vw, 2.8rem); line-height: 1.02; }
.hero__side { display: grid; gap: 18px; justify-items: start; }
.hero__side p { max-width: 34ch; }

@media (min-width: 900px) {
  .hero {
    --hero-h: clamp(600px, 100svh, 1160px);
    --char-h: min(calc(var(--hero-h) * .84), 66vw);
    display: block;
    height: var(--hero-h); min-height: 0;
  }
  .hero__mega {
    --mega-size: calc(var(--hero-h) * .6);
    position: absolute; inset: calc(var(--nav-h) + var(--hero-h) * .012) 1.6vw auto;
    margin: 0;
  }
  .hero__char {
    position: absolute; inset: auto 0 calc(var(--hero-h) * -.035);
    margin: 0 auto;
    height: var(--char-h);
  }
  .hero__text {
    position: absolute; inset: auto 0 0;
    grid-template-columns: minmax(0, 1fr) calc(var(--char-h) * .64) minmax(0, 1fr);
    align-items: end; gap: 0 clamp(16px, 2vw, 32px);
    padding: 0 var(--gut) clamp(28px, calc(var(--hero-h) * .06), 60px);
  }
  .hero h1 { grid-column: 1; max-width: 11.5em; }
  .hero__side { grid-column: 3; justify-self: end; max-width: 23em; }
}

/* ---------- studio ---------- */
.studio { padding-block: var(--section-y); }
.studio__grid { display: grid; gap: 28px; }
.studio__sheet img { width: 100%; }
.studio__body { display: grid; gap: 1em; max-width: 62ch; }
@media (min-width: 900px) {
  .studio__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(36px, 5vw, 76px) 32px; align-items: end; }
  .studio h2 { grid-column: 1 / span 9; }
  .studio__sheet { grid-column: 1 / span 7; }
  .studio__body { grid-column: 8 / span 5; padding-bottom: 1.5vw; }
}

/* ---------- RAWRK logo reveal ----------
   Resting look = the finished logo on lime. main.js adds .is-armed (lights off)
   and then .is-playing when the band scrolls into view. One 3 s timeline:
   0.15 s eyes open · 0.7 s blink · 1.1 s glance · 1.7 s lights flicker on · 2.0 s wordmark · 2.6 s frame */
.sting { background: var(--lime); overflow: clip; }
.sting__stage {
  display: flex; align-items: center; justify-content: center; gap: clamp(18px, 5vw, 64px);
  width: 100%; min-height: clamp(300px, 52svh, 620px);
  padding: 48px var(--gut);
  border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 900px) { .sting__stage { min-height: clamp(380px, 68svh, 620px); } }
.sting__mascot { flex: none; height: clamp(170px, 30vw, 330px); width: auto; overflow: visible; }
.sting__mark { flex: none; width: clamp(160px, 34vw, 430px); height: auto; overflow: visible; }
.sting__eye { transform-box: fill-box; transform-origin: center; transform: scale(12); }
.sting__plate { transform-box: fill-box; transform-origin: left center; }
.sting__mascot, .sting__body, .sting__letters { transform-box: fill-box; transform-origin: center; }

.sting.is-armed:not(.is-playing) { background: var(--ink); }
.sting.is-armed:not(.is-playing) .sting__eye { transform: scale(1, 0); }
.sting.is-armed:not(.is-playing) .sting__mark { opacity: 0; }

.sting.is-playing { animation: sting-lights 3s step-end both; }
.sting.is-playing .sting__eye { animation: sting-eyes 3s var(--ease) both; }
.sting.is-playing .sting__body { animation: sting-glance 3s var(--ease) both; }
.sting.is-playing .sting__mascot { animation: sting-land 3s var(--ease) both; }
.sting.is-playing .sting__mark { animation: sting-mark 3s step-end both; }
.sting.is-playing .sting__plate { animation: sting-plate 3s var(--ease) both; }
.sting.is-playing .sting__letters { animation: sting-letters 3s var(--ease) both; }
.sting.is-playing .sting__frame { animation: sting-frame 3s ease-out both; }

@keyframes sting-lights {
  0% { background-color: var(--ink); }
  56% { background-color: var(--lime); }
  58.5% { background-color: var(--ink); }
  61%, 100% { background-color: var(--lime); }
}
@keyframes sting-eyes {
  0%, 4% { transform: scale(1, 0); }
  9%, 22% { transform: scale(1, 1); }
  25% { transform: scale(1, .06); }
  29%, 54% { transform: scale(1, 1); }
  60%, 100% { transform: scale(12); }
}
@keyframes sting-glance {
  0%, 34% { transform: translateX(0); }
  39%, 44% { transform: translateX(-9px); }
  49%, 53% { transform: translateX(7px); }
  58%, 100% { transform: translateX(0); }
}
@keyframes sting-land {
  0%, 56% { transform: scale(1); }
  61% { transform: scale(1.07); }
  74%, 100% { transform: scale(1); }
}
@keyframes sting-mark { 0% { opacity: 0; } 65%, 100% { opacity: 1; } }
@keyframes sting-plate { 0%, 65% { transform: scaleX(0); } 76%, 100% { transform: scaleX(1); } }
@keyframes sting-letters {
  0%, 70% { opacity: 0; transform: translateY(26%); }
  82%, 100% { opacity: 1; transform: translateY(0); }
}
@keyframes sting-frame { 0%, 84% { opacity: 0; } 96%, 100% { opacity: 1; } }

/* ---------- character stage ---------- */
.stage {
  --flood: var(--rage);
  background: var(--flood);
  padding-bottom: var(--section-y);
  transition: background-color .35s var(--ease);
}
.stage[data-series="relax"] { --flood: var(--relax); }
.stage__grid { display: grid; }
.stage__art {
  position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); z-index: 2;
  height: 44svh; min-height: 250px;
  margin-inline: calc(var(--gut) * -1);
  padding: 18px var(--gut) 12px;
  background: var(--flood);
  transition: background-color .35s var(--ease);
}
.stage__art img {
  width: 100%; height: 100%;
  object-fit: contain; object-position: center bottom;
  transition: opacity .2s var(--ease), transform .24s var(--ease);
}
.stage__art img.is-out { opacity: 0; transform: translateY(10px) scale(.985); }
.stage__panel { display: grid; gap: 18px; justify-items: start; padding-top: 22px; }
.stage__lede { max-width: 44ch; }

.scenes { display: grid; gap: 18px; width: 100%; }
.scenes fieldset { display: grid; gap: 2px; min-width: 0; margin: 0; padding: 0; border: 0; }
.scenes legend { padding: 0 14px; margin-bottom: 6px; font: 700 var(--text-sm)/1.2 var(--f-body); color: var(--ink-soft); }
.scene {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.scene input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.scene__name {
  font: 800 var(--text-body)/1.15 var(--f-display);
  font-stretch: 108%; font-variation-settings: "wdth" 108;
  letter-spacing: -.01em;
}
.scene__mood { font-size: var(--text-sm); line-height: 1.3; color: var(--ink-soft); }
.scene:hover { background: rgba(16, 19, 17, .09); }
.scene.is-on, .scene:has(input:checked) { background: var(--ink); color: var(--flood); }
.scene.is-on .scene__mood, .scene:has(input:checked) .scene__mood { color: inherit; }
.scene:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (max-width: 599px) {
  .scene { flex-direction: column; align-items: flex-start; gap: 3px; }
}

@media (min-width: 900px) {
  .stage { padding-block: var(--section-y); }
  .stage__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
  .stage__art {
    top: calc(var(--nav-h) + 3svh);
    height: min(80svh, 780px);
    margin: 0; padding: 0;
    background: none;
  }
  .stage__panel { gap: 22px; padding-top: 0; }
}

/* ---------- cases ---------- */
.cases { background: var(--white); padding-block: var(--section-y) calc(var(--section-y) * .8); }
.cases__head { display: grid; gap: 22px; margin-bottom: clamp(28px, 4vw, 56px); }
.cases__side { display: grid; gap: 20px; justify-items: start; }
.cases__side p { max-width: 40ch; }
.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 44vw, 230px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut);
  scrollbar-width: none;
  padding-inline: var(--gut);
}
.shelf::-webkit-scrollbar { display: none; }
.shelf li { scroll-snap-align: start; min-width: 0; }
.shelf a { display: grid; gap: 10px; justify-items: center; text-align: center; text-decoration: none; }
.shelf img { width: 100%; aspect-ratio: 1 / 2; object-fit: cover; transition: transform .24s var(--ease); }
.shelf span { font: 700 var(--text-sm)/1.2 var(--f-body); }
.shelf a:hover img { transform: translateY(-8px); }
@media (min-width: 900px) {
  .cases__head { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: end; }
  .shelf { grid-auto-columns: minmax(0, 1fr); overflow: visible; padding-inline: clamp(8px, 1.5vw, 28px); }
}

/* ---------- contact ---------- */
.contact {
  --focus: var(--lime);
  background: var(--ink); color: var(--on-ink);
  padding-block: var(--section-y) calc(var(--section-y) * .7);
}
.contact__grid { display: grid; gap: clamp(40px, 6vw, 72px); }
.contact__lead { display: grid; gap: 22px; justify-items: start; }
.contact__mail {
  font: 900 var(--text-heading)/1 var(--f-display);
  font-stretch: 62%; font-variation-settings: "wdth" 62;
  color: var(--lime);
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) left 100% / 0 .06em no-repeat;
  transition: background-size .24s var(--ease);
}
.contact__mail:hover { background-size: 100% .06em; }
.contact__copy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: var(--text-sm); }
.copy {
  min-height: 46px; padding: 0 1.25em;
  border: 1.5px solid rgba(244, 245, 240, .5); border-radius: 999px;
  background: transparent; color: var(--on-ink);
  font: 700 var(--text-sm)/1 var(--f-body);
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.copy:hover { background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); }
.desk { border-top: 1px solid var(--line-on-ink); }
.desk li { border-bottom: 1px solid var(--line-on-ink); }
.desk a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: center;
  padding: 22px 2px;
  text-decoration: none;
  transition: color .18s var(--ease);
}
.desk h3, .desk p { grid-column: 1; }
.desk p { max-width: 46ch; color: var(--muted-on-ink); transition: color .18s var(--ease); }
.desk svg { grid-column: 2; grid-row: 1 / span 2; width: 28px; height: 28px; transition: transform .2s var(--ease); }
.desk a:hover { color: var(--lime); }
.desk a:hover p { color: var(--on-ink); }
.desk a:hover svg { transform: translate(4px, -4px); }
@media (min-width: 900px) {
  .contact__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 120px); align-items: start; }
  .contact__lead { gap: 28px; }
}

/* ---------- footer ---------- */
.foot {
  --focus: var(--lime);
  background: var(--ink); color: var(--on-ink);
  padding-top: clamp(36px, 5vw, 64px);
  overflow: clip;
}
.foot__row { display: grid; gap: 16px; padding-bottom: clamp(28px, 4vw, 52px); }
.foot__tag {
  font: 800 var(--text-body)/1.2 var(--f-display);
  font-stretch: 108%; font-variation-settings: "wdth" 108;
}
.foot__links { display: flex; flex-wrap: wrap; gap: 2px 26px; }
.foot__links a {
  display: inline-block; padding-block: 10px;
  font: 600 var(--text-sm)/1 var(--f-body);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left 84% / 0 2px no-repeat;
  transition: background-size .2s var(--ease);
}
.foot__links a:hover { background-size: 100% 2px; }
.foot__legal { font-size: var(--text-sm); color: var(--muted-on-ink); }
.foot__mega {
  margin: 0 1.6vw -.085em;
  font: 900 13.6vw/.74 var(--f-display);
  font-stretch: 150%; font-variation-settings: "wdth" 150;
  white-space: nowrap; text-align: center;
  color: var(--lime);
  user-select: none;
}
.foot__mega span { display: inline-block; }
@media (min-width: 900px) {
  .foot__row { grid-template-columns: 1fr auto; align-items: baseline; }
  .foot__legal { grid-column: 1 / -1; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__mega span {
    animation: mega-in .8s var(--ease) both, mega-jolt .55s var(--ease) none;
    animation-delay: calc(var(--i) * 55ms), calc(.84s + var(--j) * 40ms);
  }
  .hero__mega span:nth-child(1) { --i: 0; --j: 2; }
  .hero__mega span:nth-child(2) { --i: 1; --j: 1; }
  .hero__mega span:nth-child(3) { --i: 2; --j: 0; }
  .hero__mega span:nth-child(4) { --i: 3; --j: 0; }
  .hero__mega span:nth-child(5) { --i: 4; --j: 1; }
  .hero__mega span:nth-child(6) { --i: 5; --j: 2; }
  .js .hero__char { animation: char-in .75s var(--ease) .3s both; }
  .js .hero h1 { animation: rise .7s var(--ease) .55s both; }
  .js .hero__side { animation: rise .7s var(--ease) .68s both; }

  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@keyframes mega-in { from { opacity: 0; transform: translateY(16%); } to { opacity: 1; transform: none; } }
@keyframes mega-jolt { 0% { translate: 0 0; } 35% { translate: 0 -2.6%; } 100% { translate: 0 0; } }
@keyframes char-in { from { opacity: 0; transform: translateY(9%) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- owner helper: add #todo to the URL to outline every placeholder ---------- */
.show-todo [data-todo] { outline: 3px dashed #d8261c !important; outline-offset: 3px; position: relative; }
.show-todo [data-todo]::after {
  content: "TODO: " attr(data-todo);
  position: absolute; left: 0; top: 100%; z-index: 60; margin-top: 6px;
  padding: 4px 8px; background: #d8261c; color: #fff;
  font: 700 13px/1.3 var(--f-body); border-radius: 4px;
  width: max-content; max-width: 260px;
}
