/* ==========================================================================
   GR9 Studio
   ========================================================================== */

:root {
  --bg: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #d9b48b;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Jost", "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  /* Font for the big app names. Change this one line to try another. */
  --name-font: "Plus Jakarta Sans", "Manrope", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --pad: clamp(1.25rem, 3.5vw, 3rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

/* One screen only: the page itself never scrolls */
html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }

/* Small uppercase text used across the page */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.bar h2 {
  font: inherit;
  letter-spacing: inherit;
  outline: none;
}

.bar a,
.close {
  transition: opacity 0.2s ease;
}

.bar a:hover,
.close:hover {
  opacity: 0.55;
}

/* Kill the default focus box (iOS paints a white rectangle on the autofocused Close button). */
.close {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.close:focus,
.close:focus-visible {
  outline: none;
  box-shadow: none;
  background: transparent;
  background-color: transparent;
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   Hero (the whole page)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  --pad-y: 2.5rem;
  padding:
    max(var(--pad-y), env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    max(var(--pad-y), env(safe-area-inset-bottom))
    max(var(--pad), env(safe-area-inset-left));
  overflow: hidden;
}

/* Sits behind the page so the logo can blend into it */
.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  -webkit-mask-image: radial-gradient(ellipse 95% 90% at 50% 50%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 95% 90% at 50% 50%, #000 40%, transparent 100%);
}

.bar-links {
  display: flex;
  gap: 2rem;
}

.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* nothing sits at the bottom of the screen, so balance the space the old footer row gave */
  padding-bottom: clamp(0.75rem, 4vh, 2.5rem);
  /* the floor is low so the logo never overflows a narrow phone */
  --logo: clamp(220px, min(92vw, 98vh), 1080px);
}

.logo {
  width: var(--logo);
  /* The logo file has empty space above its lettering; pull it up so the lettering sits higher on the page */
  margin-top: calc(var(--logo) * -0.18);
  font-size: 0;
  line-height: 0;
  pointer-events: none;
}

.logo img {
  width: 100%;
  /* Fallback when JS can't paint the logo onto the field canvas */
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 82%, transparent 100%);
}

/* Canvas lighten is reliable on Safari/iPhone; CSS mix-blend-mode + mask is not */
.logo-on-canvas .logo img {
  opacity: 0;
  mix-blend-mode: normal;
  -webkit-mask-image: none;
  mask-image: none;
}

.tagline {
  /* "STUDIO" sits above the logo file's bottom padding; this leaves a deliberate gap beneath it */
  margin-top: calc(var(--logo) * -0.14);
  max-width: 100%;
  font-family: var(--display);
  font-size: clamp(0.8rem, 1.45vw, 1.1rem);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.32em;
  word-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

/* Rotating tagline: every phrase shares one grid cell, so the layout never jumps */
.tagline-stage {
  display: grid;
  /* letter-spacing also trails the last letter; this keeps the line visually centered */
  padding-left: 0.32em;
}

.phrase {
  grid-area: 1 / 1;
  visibility: hidden;
}

.phrase.is-active,
.phrase.is-leaving {
  visibility: visible;
}

/* Each word slides up from behind a mask. Padding leaves room for descenders. */
.word {
  display: inline-block;
  overflow: hidden;
  padding: 0.04em 0.12em 0.2em;
  margin: -0.04em -0.12em -0.2em;
  vertical-align: top;
}

.word > span {
  display: inline-block;
  transform: translateY(115%);
}

/* No transition on the resting state, so a finished line resets invisibly */
.phrase.is-active .word > span {
  transform: translateY(0);
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i) * 70ms + 250ms);
}

.phrase.is-leaving .word > span {
  transform: translateY(-115%);
  transition: transform 0.6s cubic-bezier(0.5, 0, 0.75, 0);
  transition-delay: calc(var(--i) * 35ms);
}

/* --------------------------------------------------------------------------
   Panels (Apps, Studio)
   -------------------------------------------------------------------------- */

.panel {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.9);
  color: var(--text);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .panel {
    background: rgba(0, 0, 0, 0.82);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
  }
}

/* Frozen, soft copy of the home screen (a tiny canvas stretched to the screen, built in script.js) */
.hero-ghost {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  background: #000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-ghost.is-on {
  opacity: 1;
  transition-duration: 0.5s;
}

.panel::backdrop {
  background: transparent;
}

.panel[open] {
  display: block;
  animation: panel-in 0.5s var(--ease);
}

.panel.is-closing {
  animation: panel-out 0.3s ease forwards;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes panel-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.panel-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  --pad-y: clamp(1.25rem, 4.5vh, 2.5rem);
  padding:
    max(var(--pad-y), env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    max(var(--pad-y), env(safe-area-inset-bottom))
    max(var(--pad), env(safe-area-inset-left));
}

.panel-body {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-block: clamp(2rem, 5vh, 4rem);
}

.panel-body > * {
  width: 100%;
}

/* Apps: one at a time */

.panel-inner {
  position: relative;
  z-index: 1;
}

/* Soft wash of each app's own colour behind the content */
.wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease);
  will-change: opacity;
}

.wash--0 { background: radial-gradient(55% 48% at 50% 32%, rgba(132, 204, 22, 0.16), transparent 72%); }
.wash--1 { background: radial-gradient(55% 48% at 50% 32%, rgba(46, 112, 222, 0.24), transparent 72%); }

.panel[data-active="0"] .wash--0,
.panel[data-active="1"] .wash--1 {
  opacity: 1;
}

/* Apps panel: no live backdrop blur (it gets recomputed every frame while things animate).
   Instead the page behind is blurred once and frozen (the .hero-ghost canvas). Results and About do the same. */
.panel--apps,
.panel--results,
.panel--about {
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* One app at a time, never a scrollbar. The icon glow and the fly-in would otherwise stretch the page. */
.panel--apps {
  overflow: hidden;
}

.stage {
  --dir: 1;
  position: relative;
  flex: 1;
  min-height: 19rem;
  touch-action: pan-y;
}

.slide {
  --glow: rgba(255, 255, 255, 0.15);
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  visibility: hidden;
}

.slide:nth-child(1) { --glow: rgba(132, 204, 22, 0.42); --tint: rgb(62, 112, 8); --lit: rgb(124, 192, 30); }
.slide:nth-child(2) { --glow: rgba(46, 112, 222, 0.55); --tint: rgb(28, 74, 160); --lit: rgb(96, 160, 255); }

.slide.is-active,
.slide.is-leaving {
  visibility: visible;
}

/*
  Every part of a slide waits just off to the side. When the slide becomes active the parts glide in
  one after another; when it leaves they glide out the other way.
*/
.slide > * {
  opacity: 0;
  transform: translateX(calc(var(--dir) * 56px));
}

.slide > :nth-child(1) { --k: 0; }
.slide > :nth-child(2) { --k: 1; }
.slide > :nth-child(3) { --k: 2; }
.slide > :nth-child(4) { --k: 3; }

/* No transition on the resting state, so a finished slide resets invisibly */
.slide.is-active > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s ease, transform 1.2s var(--ease);
  transition-delay: calc(var(--k) * 90ms + 180ms);
}

.slide.is-leaving > * {
  opacity: 0;
  transform: translateX(calc(var(--dir) * -56px));
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.5, 0, 0.75, 0);
  transition-delay: calc(var(--k) * 30ms);
}

/* --------------------------------------------------------------------------
   3D app icon
   The icon is a thin slab. When a slide arrives it rolls in from the side on a full 360° turn,
   and when it leaves it spins away the other way. Layers, outside in:
     .icon-flip  enter / leave           .icon-float  slow idle sway
     .icon-tilt  follows the pointer     .icon-spin   click to spin again
   -------------------------------------------------------------------------- */

.slide > .icon-stage,
.slide.is-active > .icon-stage,
.slide.is-leaving > .icon-stage {
  --s: clamp(116px, 33vh, 280px);
  position: relative;
  width: var(--s);
  height: var(--s);
  perspective: 1100px;
  transform: none;
  cursor: pointer;
  /* only the fade is handled here; the movement is on .icon-flip */
  transition: opacity 0.45s ease;
  transition-delay: 0s;
}

.slide.is-active > .icon-stage {
  transition: opacity 0.6s ease 0.1s;
}

.icon-flip,
.icon-float,
.icon-tilt,
.icon-spin {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.icon-flip {
  transform: translate3d(calc(var(--dir) * 170px), 0, -260px) rotateY(calc(var(--dir) * -360deg)) scale(0.5);
}

.slide.is-active .icon-flip {
  transform: none;
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.slide.is-leaving .icon-flip {
  transform: translate3d(calc(var(--dir) * -170px), 0, -260px) rotateY(calc(var(--dir) * 200deg)) scale(0.6);
  transition: transform 0.75s cubic-bezier(0.5, 0, 0.75, 0);
}

.icon-flip,
.icon-float,
.icon-tilt,
.icon-spin,
.icon-aura,
.icon-aura::before,
.icon-ground::before {
  will-change: transform;
}

.icon-float {
  animation: icon-float 7s ease-in-out infinite;
}

/* The slide that isn't showing keeps its idle loops paused */
.slide:not(.is-active):not(.is-leaving) .icon-float,
.slide:not(.is-active):not(.is-leaving) .icon-aura::before,
.slide:not(.is-active):not(.is-leaving) .icon-ground::before {
  animation-play-state: paused;
}

.icon-tilt {
  transform: rotateX(calc(var(--py, 0) * -12deg)) rotateY(calc(var(--px, 0) * 16deg));
  transition: transform 0.7s var(--ease);
}

.icon-spin.is-spinning {
  animation: icon-spin 1.25s cubic-bezier(0.25, 0.8, 0.2, 1);
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotateY(-9deg) rotateX(2deg); }
  50%      { transform: translateY(-10px) rotateY(9deg) rotateX(-2deg); }
}

@keyframes icon-spin {
  from { transform: rotateY(0); }
  to   { transform: rotateY(360deg); }
}

/* Faces and edge layers */
.icon-face,
.icon-edge {
  position: absolute;
  inset: 0;
  border-radius: 22.5%;
}

.icon-face {
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.icon-face img,
.app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-front { transform: translateZ(calc(var(--s) * 0.03)); }

.icon-back  {
  transform: rotateY(180deg) translateZ(calc(var(--s) * 0.03));
  background: #080808;
}

/* The back of the slab: the same icon, dimmed under dark glass */
.icon-back img { filter: brightness(0.42) saturate(0.7); }

.icon-back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 45%, rgba(0, 0, 0, 0.35));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* The thickness: a stack of coloured layers between the faces */
.icon-edge {
  background: linear-gradient(135deg, var(--lit), var(--tint) 45%, #04060a);
  transform: translateZ(calc(var(--s) * var(--k)));
}

/* Light on the front: a soft highlight that follows the pointer, a hairline rim, and a sheen that sweeps across */
.icon-front::before,
.icon-front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* The highlight follows the pointer by moving as its own layer (no repainting) */
.icon-gloss {
  position: absolute;
  left: -10%;
  top: -48%;
  width: 120%;
  height: 100%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
  transform: translate(calc(var(--px, 0) * 22%), calc(var(--py, 0) * 18%));
  transition: transform 0.7s var(--ease);
  will-change: transform;
}

.icon-front::before {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.icon-front::after {
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%);
  transform: translateX(-110%);
}

.icon-spin.is-shine .icon-front::after {
  animation: sheen 1.5s cubic-bezier(0.4, 0, 0.2, 1) var(--sd, 0s) both;
}

@keyframes sheen {
  from { transform: translateX(-110%); }
  to   { transform: translateX(110%); }
}

/* Behind the icon: coloured aura, a slowly orbiting ring, and light pooling on the floor */
.icon-aura,
.icon-ground {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
}

.slide.is-active .icon-aura,
.slide.is-active .icon-ground {
  opacity: 1;
  transform: none;
  transition: opacity 1.4s ease 0.5s, transform 1.6s var(--ease) 0.4s;
}

.slide.is-leaving .icon-aura,
.slide.is-leaving .icon-ground {
  transition: opacity 0.3s ease;
}

.icon-aura {
  inset: -60%;
}

.icon-aura::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
  animation: aura 5.5s ease-in-out infinite;
}

.icon-ground {
  left: 8%;
  right: 8%;
  bottom: -7%;
  height: 11%;
}

.icon-ground::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(8px);
  animation: ground 7s ease-in-out infinite;
}

@keyframes aura {
  0%, 100% { transform: scale(0.94); opacity: 0.85; }
  50%      { transform: scale(1.06); opacity: 1; }
}

@keyframes ground {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(0.82); opacity: 0.6; }
}

.app-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1rem, 4.5vh, 2.5rem);
}

.app-name-main {
  font-family: var(--name-font);
  font-size: clamp(2.6rem, min(11.5vh, 12vw), 6.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  /* white fading very slightly toward the bottom, like light falling on glass */
  background: linear-gradient(180deg, #fff 40%, rgba(255, 255, 255, 0.68));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-bottom: 0.08em; /* keeps descenders (p) from being clipped by the gradient box */
}

/* Second half of the full app name, set like the tagline on the home screen */
.app-name-sub {
  margin-top: clamp(0.6rem, 2vh, 1.1rem);
  padding-left: 0.32em; /* offsets the trailing letter-spacing so it stays centered */
  font-family: var(--display);
  font-size: clamp(0.75rem, 1.3vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.app-desc {
  max-width: 30em;
  margin-top: clamp(0.7rem, 2.2vh, 1.25rem);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: var(--muted);
}

/* Store links: small, quiet, underlined by a single hairline */
.app-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2.5rem;
  margin-top: clamp(1.1rem, 4.5vh, 2.75rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 0.3s ease;
}

.btn img {
  width: auto;
  height: 17px;
  flex: none;
}

.btn::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-left: 0.5rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M1.5 8.5 8.5 1.5M3 1.5h5.5V7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M1.5 8.5 8.5 1.5M3 1.5h5.5V7'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.6;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.btn:hover {
  border-bottom-color: var(--text);
}

.btn:hover::after {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* Pager */

.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0;
  transition: opacity 0.2s ease;
}

.pager-btn:hover { opacity: 0.55; }

.pager-btn--prev { justify-self: start; }
.pager-btn--next { justify-self: end; flex-direction: row-reverse; }

.pager-btn::before {
  content: "";
  width: 22px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 10' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M22 5H1M5 1 1 5l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 10' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M22 5H1M5 1 1 5l4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.35s var(--ease);
}

.pager-btn--next::before { transform: scaleX(-1); }

.pager-btn--prev:hover::before { transform: translateX(-4px); }
.pager-btn--next:hover::before { transform: scaleX(-1) translateX(-4px); }

.pager-count {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-variant-numeric: tabular-nums;
}

.pager-count span:not(.pager-line) {
  color: var(--muted);
}

.pager-count .pager-current {
  color: var(--text);
}

.pager-line {
  position: relative;
  width: 56px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.pager-line i {
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: scaleX(var(--p, 0.5));
  transform-origin: left;
  transition: transform 0.9s var(--ease);
}

/* --------------------------------------------------------------------------
   Results
   Same language as About: soft wash, big gradient type, thin Jost labels, hairlines.
   Two large stats sit under a short headline — numbers do the talking.
   -------------------------------------------------------------------------- */

.wash--results {
  opacity: 1;
  background:
    radial-gradient(46% 40% at 50% 22%, rgba(255, 255, 255, 0.1), transparent 72%),
    radial-gradient(55% 38% at 28% 78%, rgba(217, 180, 139, 0.1), transparent 70%),
    radial-gradient(50% 36% at 74% 82%, rgba(46, 112, 222, 0.08), transparent 70%);
}

.panel--results .panel-body {
  max-width: 56rem;
  padding-block: clamp(1rem, 3vh, 2.5rem);
}

.results {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.results-eyebrow {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-left: 0.32em;
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.2vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.results-eyebrow::before,
.results-eyebrow::after {
  content: "";
  width: clamp(1.75rem, 4vw, 3rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
}

.results-eyebrow::after {
  transform: scaleX(-1);
}

.results-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1rem, 3.6vh, 2rem);
  font-family: var(--name-font);
  font-size: clamp(2.4rem, min(9.5vh, 8vw), 5.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.results-headline span {
  padding-bottom: 0.08em;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-image: linear-gradient(180deg, #fff 40%, rgba(255, 255, 255, 0.68));
}

.results-headline .results-headline-accent {
  background-image: linear-gradient(180deg, #f3dcbc 30%, #d9b48b 100%);
}

.results-lead {
  max-width: 32em;
  margin-top: clamp(0.85rem, 2.8vh, 1.5rem);
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  line-height: 1.7;
  color: var(--muted);
  text-wrap: balance;
}

.results-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  width: 100%;
  max-width: 44rem;
  margin-top: clamp(2rem, 7vh, 4.25rem);
}

.results-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: clamp(1.25rem, 4.5vw, 3.25rem);
}

/* Vertical hairline between the two stats */
.results-stat + .results-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.24) 20%,
    rgba(255, 255, 255, 0.24) 80%,
    transparent
  );
}

.results-stat-value {
  font-family: var(--name-font);
  font-size: clamp(3.4rem, min(12vh, 11vw), 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.results-stat-num {
  display: inline-block;
  padding-bottom: 0.08em;
  background: linear-gradient(180deg, #fff 35%, rgba(255, 255, 255, 0.62));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Stats lock in colour + soft glow when their count finishes */
.results-stat-num--downloads,
.results-stat-num--apps {
  transition:
    background 0.7s var(--ease),
    filter 0.7s var(--ease);
}

.results-stat-num--downloads.is-lit {
  background: linear-gradient(180deg, #d9f99d 20%, #84cc16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(132, 204, 22, 0.55))
          drop-shadow(0 0 42px rgba(132, 204, 22, 0.28));
}

.results-stat-num--apps.is-lit {
  background: linear-gradient(180deg, #ffe9a8 20%, #e8c547 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(232, 197, 71, 0.55))
          drop-shadow(0 0 42px rgba(232, 197, 71, 0.28));
}

.results-stat-label {
  margin-top: clamp(0.85rem, 2.4vh, 1.35rem);
  font-family: var(--name-font);
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   About
   Same language as Apps: a soft coloured wash, big gradient type, thin Jost labels, hairlines.
   -------------------------------------------------------------------------- */

/* The studio's own colour: the warm tone from the "9" in the logo */
.wash--about {
  opacity: 1;
  background:
    radial-gradient(48% 42% at 50% 24%, rgba(217, 180, 139, 0.17), transparent 72%),
    radial-gradient(60% 40% at 50% 112%, rgba(217, 180, 139, 0.08), transparent 70%);
}

.panel--about .panel-body {
  max-width: 62rem;
  padding-block: clamp(1rem, 3vh, 2.5rem);
}

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Everything on the page rises into place one after another (--k is set per element in the HTML) */
.panel[open] .rv {
  animation: rise 1.2s var(--ease) calc(var(--k, 0) * 100ms + 150ms) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Small label, set like the app subtitles, with a hairline each side */
.about-eyebrow {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-left: 0.32em; /* offsets the trailing letter-spacing so it stays centered */
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.2vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(226, 184, 135, 0.92);
}

.about-eyebrow::before,
.about-eyebrow::after {
  content: "";
  width: clamp(1.75rem, 4vw, 3rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 184, 135, 0.55));
}

.about-eyebrow::after {
  transform: scaleX(-1);
}

.about-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1rem, 3.6vh, 2rem);
  font-family: var(--name-font);
  font-size: clamp(2.4rem, min(9.5vh, 8vw), 5.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.about-headline span {
  padding-bottom: 0.08em; /* keeps descenders from being clipped by the gradient box */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-image: linear-gradient(180deg, #fff 40%, rgba(255, 255, 255, 0.68));
}

.about-headline .about-headline-accent {
  background-image: linear-gradient(180deg, #f3dcbc 30%, #d9b48b 100%);
}

.about-lead {
  max-width: 34em;
  margin-top: clamp(0.9rem, 3vh, 1.75rem);
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  line-height: 1.7;
  color: var(--muted);
  text-wrap: balance;
}

/* What we do: three columns under hairlines. The hairline lights up warm on hover. */
.about-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3.5vw, 3rem);
  width: 100%;
  max-width: 56rem;
  margin-top: clamp(1.6rem, 6vh, 3.75rem);
  text-align: left;
}

.about-step {
  position: relative;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.about-step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(217, 180, 139, 0.15));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}

.about-step:hover::before {
  transform: scaleX(1);
}

.about-step-num {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  transition: color 0.4s ease;
}

.about-step:hover .about-step-num {
  color: var(--accent);
}

.about-step-title {
  margin-top: 0.85rem;
  font-family: var(--name-font);
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.about-step-text {
  margin-top: 0.5rem;
  max-width: 17em;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Contact */
.about-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-top: clamp(1.75rem, 6.5vh, 4rem);
}

.about-contact-label {
  padding-left: 0.32em;
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.2vw, 0.9rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* Same treatment as the store links on the Apps screen */
.mail {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: border-color 0.3s ease;
}

.mail::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-left: 0.5rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M1.5 8.5 8.5 1.5M3 1.5h5.5V7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M1.5 8.5 8.5 1.5M3 1.5h5.5V7'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.6;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.mail:hover {
  border-bottom-color: var(--accent);
}

.mail:hover::after {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .hero,
  .panel-inner { --pad-y: 1.5rem; }

  .bar { font-size: 0.65rem; letter-spacing: 0.1em; }
  .bar-links { gap: 0.5rem; }

  /* comfortable thumb-sized tap targets (the visible text stays small) */
  .bar-links a,
  .close {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 0.65rem;
  }
  .bar-links { margin-right: -0.65rem; }
  .close { margin-right: -0.65rem; }
  .pager-btn { min-height: 44px; }
  .btn, .mail { padding-top: 0.85rem; }

  .tagline { letter-spacing: 0.22em; word-spacing: 0.15em; }
  .tagline-stage { padding-left: 0.22em; }

  .pager { font-size: 0.65rem; letter-spacing: 0.1em; }
  .app-name-main { font-size: clamp(2.4rem, min(11.5vh, 13vw), 4.5rem); }
  .app-name-sub { letter-spacing: 0.24em; padding-left: 0.24em; }
  .app-actions { gap: 1.25rem 2rem; }
  .panel-body { align-items: flex-start; }

  .about-eyebrow { letter-spacing: 0.24em; padding-left: 0.24em; gap: 0.8rem; }
  .about-contact-label { letter-spacing: 0.24em; padding-left: 0.24em; }

  .results-eyebrow { letter-spacing: 0.24em; padding-left: 0.24em; gap: 0.8rem; }
  .results-stats { margin-top: clamp(1.75rem, 6vh, 3rem); }
  .results-stat { padding-inline: clamp(0.85rem, 3vw, 1.75rem); }

  /* steps stack: number on the left, text on the right */
  .about-steps { grid-template-columns: 1fr; gap: 1.5rem; max-width: 26rem; }
  .about-step {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    column-gap: 0.5rem;
    padding-top: 1rem;
  }
  .about-step-num { grid-row: 1 / span 2; padding-top: 0.28rem; }
  .about-step-title { margin-top: 0; }
  .about-step-text { max-width: none; }
}

@media (max-width: 480px) {
  .bar { font-size: 0.6rem; }
  .pager-line { width: 36px; }
  .pager-count { gap: 0.75rem; }

  /* smaller icon + tighter store links so a whole app fits on one phone screen */
  .slide > .icon-stage,
  .slide.is-active > .icon-stage,
  .slide.is-leaving > .icon-stage { --s: clamp(100px, 24vh, 190px); }

  .stage { min-height: 17rem; }
  .app-name { margin-top: clamp(0.9rem, 3.5vh, 1.75rem); }
  .app-actions { gap: 0 1.5rem; margin-top: clamp(0.5rem, 2vh, 1.25rem); }
  .btn { gap: 0.55rem; letter-spacing: 0.12em; }
  .btn::after { margin-left: 0.15rem; }

  .about-headline { font-size: clamp(1.9rem, min(9.5vh, 8.5vw), 5.75rem); }
  .about-eyebrow::before,
  .about-eyebrow::after { width: 1.25rem; }
  .about-eyebrow, .about-contact-label { letter-spacing: 0.2em; padding-left: 0.2em; }
  .mail { letter-spacing: 0.1em; font-size: 0.7rem; max-width: 100%; }

  .results-headline { font-size: clamp(1.9rem, min(9.5vh, 8.5vw), 5.75rem); }
  .results-eyebrow::before,
  .results-eyebrow::after { width: 1.25rem; }
  .results-eyebrow { letter-spacing: 0.2em; padding-left: 0.2em; }
  .results-stat-value { font-size: clamp(2.8rem, min(11vh, 14vw), 5rem); }
  .results-stat { padding-inline: 0.75rem; }
}

/* Very narrow phones (iPhone SE / small Androids) */
@media (max-width: 360px) {
  :root { --pad: 1rem; }
  .app-name-main { font-size: 2.3rem; }
  .app-name-sub { letter-spacing: 0.18em; padding-left: 0.18em; }
  .tagline { letter-spacing: 0.16em; }
  .tagline-stage { padding-left: 0.16em; }
  .mail { font-size: 0.65rem; }
}

/* Phones held sideways (or any very short screen): icon on the left, text on the right */
@media (max-height: 520px) and (orientation: landscape) {
  .hero, .panel-inner { --pad-y: 0.75rem; }
  .hero-main { --logo: clamp(160px, 78vh, 1080px); padding-bottom: 0; }
  .tagline { font-size: 0.7rem; }

  .stage { min-height: 0; }

  .slide {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto auto;
    align-content: center;
    align-items: start;
    justify-items: start;
    column-gap: clamp(1.5rem, 6vw, 4rem);
    text-align: left;
    padding-inline: 4vw;
  }
  .slide > .icon-stage,
  .slide.is-active > .icon-stage,
  .slide.is-leaving > .icon-stage {
    --s: clamp(90px, 46vh, 190px);
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: center;
    justify-self: center;
  }
  .slide > .app-name,
  .slide > .app-desc,
  .slide > .app-actions { grid-column: 2; }
  .slide > .app-name { grid-row: 1; align-items: flex-start; margin-top: 0; align-self: end; }
  .slide > .app-desc { grid-row: 2; margin-top: 0.5rem; }
  .slide > .app-actions { grid-row: 3; justify-content: flex-start; margin-top: 0.5rem; }
  .app-name-main { font-size: clamp(2rem, 11vh, 3.5rem); }
  .app-name-sub { padding-left: 0; margin-top: 0.4rem; }
  .app-desc { font-size: 0.85rem; line-height: 1.5; }

  .panel-body { align-items: flex-start; padding-block: 1rem; }
  .about-headline { font-size: clamp(1.9rem, 9vh, 3.5rem); margin-top: 0.75rem; }
  .about-lead { margin-top: 0.6rem; }
  .about-steps { grid-template-columns: repeat(3, 1fr); max-width: 56rem; margin-top: 1.25rem; }
  .about-step { display: block; }
  .about-step-title { margin-top: 0.6rem; }
  .about-step-text { max-width: 17em; }
  .about-contact { margin-top: 1.25rem; }

  .results-headline { font-size: clamp(1.9rem, 9vh, 3.5rem); margin-top: 0.75rem; }
  .results-lead { margin-top: 0.55rem; }
  .results-stats { margin-top: 1.25rem; }
  .results-stat-value { font-size: clamp(2.4rem, 12vh, 4rem); }
  .results-stat-label { margin-top: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .panel[open],
  .panel.is-closing { animation: none; }

  .panel[open] .rv { animation: none; }
  .about-step::before { transition: none; }
  .results-stat-num { transition: none; }

  .wash,
  .icon-float,
  .icon-aura::before,
  .icon-ground::before,
  .icon-spin.is-spinning,
  .icon-spin.is-shine .icon-front::after { animation: none; }

  .icon-flip,
  .icon-tilt,
  .icon-aura,
  .icon-ground { transition: none !important; }

  .slide.is-active > *,
  .slide.is-leaving > *,
  .wash,
  .pager-line i { transition: none; }
}
