/* SILKBYTE — studio site.
   Apple-like base (system type, generous space, hairlines), one warm world per
   game. Motion: transform/opacity only, strong ease-out, hovers only on real
   pointers, everything calms down under prefers-reduced-motion. */

@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #fbfbfd;
  --bg-2: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --nav: rgba(251, 251, 253, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.05), 0 24px 48px rgba(0, 0, 0, 0.12);
  --focus: #0071e3;

  /* Pimu's world */
  --sun: #ffd94a;
  --sun-2: #ffe98f;
  --sun-ink: #3a2a00;
  --sun-ink-2: rgba(58, 42, 0, 0.66);
  --fur: #8e97c8;
  --coral: #ff8a65;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
    "Segoe UI", Roboto, Arial, sans-serif;
  --font-round: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1120px;
  --gutter: 16px;
  --radius-xl: 36px;
  --radius-lg: 28px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-2: #0d0d0e;
    --card: #161617;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #8a8a8f;
    --line: rgba(255, 255, 255, 0.1);
    --line-2: rgba(255, 255, 255, 0.18);
    --nav: rgba(0, 0, 0, 0.66);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 48px rgba(0, 0, 0, 0.6);
    --focus: #2997ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-2: #0d0d0e;
  --card: #161617;
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-3: #8a8a8f;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --nav: rgba(0, 0, 0, 0.66);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 48px rgba(0, 0, 0, 0.6);
  --focus: #2997ff;
  color-scheme: dark;
}

@media (min-width: 640px) {
  :root { --gutter: 28px; }
}

/* ---------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 10px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  transition: top 200ms var(--ease-out);
}
.skip:focus { top: 12px; }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.nav.is-stuck {
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 -1px 0 var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
}
.brand svg { width: 24px; height: 24px; flex: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}
.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  transition: color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.nav-links a.cta-mini {
  color: var(--bg);
  background: var(--ink);
  margin-left: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ink); }
  .nav-links a.cta-mini:hover { color: var(--bg); opacity: 0.86; }
}
@media (max-width: 559px) {
  .nav-links a:not(.cta-mini) { display: none; }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out),
    opacity 200ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn .arrow { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { opacity: 0.86; }
  .btn-ghost:hover { background: var(--bg-2); }
  .btn:hover .arrow { transform: translateX(3px); }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(56px, 11vw, 132px) 0 clamp(64px, 9vw, 112px);
  text-align: center;
  isolation: isolate;
}
.hero::before {
  /* soft warm light from above, the only "glow" on the page */
  content: "";
  position: absolute;
  inset: -120px 0 auto;
  height: 720px;
  z-index: -1;
  background: radial-gradient(60% 55% at 50% 0%, color-mix(in srgb, var(--sun) 30%, transparent), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(46px, 9.2vw, 104px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
  margin-top: 18px;
}
.hero h1 .line { display: block; text-wrap: balance; }
.hero h1 .dim { color: var(--ink-3); }
.hero .lede {
  max-width: 34em;
  margin: 28px auto 0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

/* shelf of game icons */
.shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 12px;
  max-width: 360px;
  margin: clamp(56px, 8vw, 88px) auto 0;
}
@media (min-width: 720px) {
  .shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 780px; gap: 20px; }
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.app-icon {
  position: relative;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 23%;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
@media (min-width: 720px) { .app-icon { width: 96px; } }
.app-icon img,
.app-icon svg { width: 100%; height: 100%; object-fit: cover; }
.app-icon::after {
  /* hairline + top sheen, like a real icon */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 45%);
  pointer-events: none;
}
.app-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.app-state { font-size: 12px; color: var(--ink-3); margin-top: -7px; }
.app-soon .app-icon { box-shadow: none; }
.app-soon .app-icon::before {
  /* "not out yet": a quiet dashed rim */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .app:hover .app-icon { transform: translateY(-6px) scale(1.04); box-shadow: var(--shadow-lift); }
}
.app-live .app-state { color: #b07d00; }
:root[data-theme="dark"] .app-live .app-state { color: var(--sun); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-live .app-state { color: var(--sun); }
}

/* ---------------------------------------------------------------- section heads */

.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-top: 12px;
  text-wrap: balance;
}
.section-head h2 .dim { color: var(--ink-3); }
.section-head p.sub {
  margin-top: 18px;
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- Pimu */

.pimu-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  overflow: clip;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 90% at 85% 10%, var(--sun-2), transparent 60%),
    linear-gradient(160deg, #ffe25c 0%, var(--sun) 55%, #ffc93a 100%);
  color: var(--sun-ink);
  isolation: isolate;
}
@media (min-width: 900px) {
  .pimu-card { grid-template-columns: 1.05fr 0.95fr; min-height: 620px; }
}
.splats { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.splats span {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.3px);
  opacity: 0.9;
}
.pimu-copy {
  padding: clamp(28px, 5vw, 64px);
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 900px) { .pimu-copy { padding-bottom: clamp(28px, 5vw, 64px); } }
.pimu-id { display: flex; align-items: center; gap: 14px; }
.pimu-id img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(120, 70, 0, 0.22);
}
.pimu-id .kicker { font-size: 13px; font-weight: 700; color: var(--sun-ink-2); }
.pimu-id .title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.pimu-card h2 {
  margin-top: 28px;
  font-family: var(--font-round);
  font-weight: 900;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.pimu-card .pimu-lede {
  margin-top: 18px;
  max-width: 30em;
  font-size: clamp(17px, 1.7vw, 19px);
  color: var(--sun-ink-2);
  text-wrap: pretty;
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 32px;
  max-width: 460px;
}
.facts li {
  padding: 14px 0 0;
  box-shadow: inset 0 1px 0 rgba(58, 42, 0, 0.18);
}
.facts b {
  display: block;
  font-family: var(--font-round);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.facts span { font-size: 13px; color: var(--sun-ink-2); font-weight: 600; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 18px 0 14px;
  border-radius: 14px;
  background: rgba(58, 42, 0, 0.92);
  color: #fff8e1;
}
.store svg { width: 22px; height: 22px; flex: none; }
.store .s1 { display: block; font-size: 11px; line-height: 1.1; opacity: 0.7; font-weight: 500; }
.store .s2 { display: block; font-size: 16px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }

.pimu-stage {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 360px;
  padding-top: 64px;
}
@media (min-width: 900px) {
  .pimu-stage { padding-top: 0; }
  .pimu-btn { width: min(78%, 400px); }
}
.pimu-btn {
  position: relative;
  width: min(66%, 400px);
  margin-bottom: -6%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pimu-btn:focus-visible { outline-offset: -8px; border-radius: 40px; }
.pimu-float { animation: bob 4.2s var(--ease-in-out) infinite alternate; }
.pimu-btn img {
  width: 100%;
  transition: opacity 180ms var(--ease-out), transform 420ms var(--ease-spring);
  transform-origin: 50% 100%;
}
.pimu-btn .wave,
.pimu-btn .cheer {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
  .pimu-btn:hover .idle { opacity: 0; }
  .pimu-btn:hover .wave { opacity: 1; }
}
.pimu-btn.is-cheering .idle,
.pimu-btn.is-cheering .wave { opacity: 0; }
.pimu-btn.is-cheering .cheer { opacity: 1; }
.pimu-btn.is-cheering img { transform: scale(1.04) rotate(-2deg); }
.pimu-btn:active img { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .pimu-btn:hover img { transform: scale(1.025); }
}
.pimu-hint {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--sun-ink);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.pimu-hint.is-gone { opacity: 0; transform: translateY(-4px); }
@keyframes bob {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}
.burst {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

/* gallery of screens */
.gallery { margin-top: clamp(56px, 7vw, 88px); }
.gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.gallery-head h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.03em; }
.gallery-head p { color: var(--ink-2); margin-top: 6px; }
.gallery-nav { display: flex; gap: 10px; }
.round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 160ms var(--ease-out), opacity 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.round svg { width: 18px; height: 18px; }
.round:active { transform: scale(0.94); }
.round:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .round:not(:disabled):hover { background: var(--line); }
}
.track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 8px var(--gutter) 28px;
  margin: -8px 0 0;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.track::-webkit-scrollbar { display: none; }
.track > li {
  flex: 0 0 min(84vw, 760px);
  scroll-snap-align: start;
}
@media (min-width: 1176px) {
  /* align first slide with the content column */
  .track { padding-inline: calc((100vw - var(--wrap)) / 2); scroll-padding-inline: calc((100vw - var(--wrap)) / 2); }
}
.device {
  position: relative;
  padding: clamp(6px, 1vw, 11px);
  border-radius: clamp(22px, 3.4vw, 40px);
  background: #1d1d1f;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #3a3a3c;
}
.device img {
  width: 100%;
  aspect-ratio: 1200 / 552;
  object-fit: cover;
  border-radius: clamp(16px, 2.6vw, 30px);
  background: #e8e8ed;
}
.device::after {
  /* Dynamic Island, landscape */
  content: "";
  position: absolute;
  left: clamp(14px, 2vw, 24px);
  top: 50%;
  width: clamp(6px, 0.8vw, 10px);
  height: clamp(22px, 3.2vw, 36px);
  transform: translateY(-50%);
  border-radius: 99px;
  background: #000;
}
.track figcaption {
  margin-top: 16px;
  padding-inline: 4px;
  font-size: 15px;
  color: var(--ink-2);
}
.track figcaption b { color: var(--ink); font-weight: 600; }

/* ribbon of worlds */
.worlds { margin-top: clamp(40px, 6vw, 72px); }
.worlds-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 20px; }
.worlds-head h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.03em; }
.worlds-head p { color: var(--ink-2); font-size: 15px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 6px 0 10px;
  animation: drift 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes drift {
  to { transform: translateX(calc(-50% - 8px)); }
}
.world { width: 132px; flex: none; }
.world img {
  width: 132px;
  height: 132px;
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.world span {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
}

/* ---------------------------------------------------------------- bento */

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
  .b-4 { grid-column: span 4; }
  .b-2 { grid-column: span 2; }
  .b-3 { grid-column: span 3; }
  .b-6 { grid-column: span 6; }
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  cursor: default;
}
.tile .tag {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tile h3 {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.tile p { margin-top: 6px; color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
.tile .art {
  flex: 1;
  display: grid;
  place-items: center;
  margin-top: 20px;
}

/* puzzle */
.puzzle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  width: min(80%, 272px);
  aspect-ratio: 1;
}
.puzzle i {
  border-radius: 8px;
  background-image: url("assets/covers/pack_wild@400.webp");
  background-size: 300% 300%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 700ms var(--ease-spring), box-shadow 400ms var(--ease-out);
  transition-delay: calc(var(--k, 0) * 40ms);
}
.puzzle i.loose {
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}
.tile.is-play .puzzle i.loose { transform: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
@media (hover: hover) and (pointer: fine) {
  .tile:hover .puzzle i.loose { transform: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
}

/* kitchen */
.plate {
  position: relative;
  width: min(100%, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 55%, #f1f1f4 56%, #fff 70%, #e9e9ee 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: grid;
  place-items: center;
}
.plate img {
  width: 74%;
  border-radius: 50%;
  transition: transform 900ms var(--ease-out);
}
.tile.is-play .plate img { transform: rotate(160deg) scale(1.04); }
@media (hover: hover) and (pointer: fine) {
  .tile:hover .plate img { transform: rotate(160deg) scale(1.04); }
}

/* letters */
.letters {
  display: flex;
  gap: 2px;
  font-family: var(--font-round);
  font-weight: 900;
  font-size: clamp(52px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.letters span {
  display: inline-block;
  transition: transform 420ms var(--ease-spring);
  transition-delay: calc(var(--i) * 45ms);
}
.tile.is-play .letters span { transform: translateY(-14px) rotate(var(--t, -6deg)); }
@media (hover: hover) and (pointer: fine) {
  .tile:hover .letters span { transform: translateY(-14px) rotate(var(--t, -6deg)); }
}

/* piano */
.keys {
  position: relative;
  display: flex;
  gap: 4px;
  width: min(100%, 240px);
  height: 150px;
}
.keys .w {
  flex: 1;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(#fff, #f6f6f8);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 0 #d9d9de;
  transition: transform 90ms var(--ease-out), box-shadow 90ms var(--ease-out), background-color 120ms;
  transform-origin: 50% 0;
}
.keys .b {
  position: absolute;
  top: 0;
  width: 9%;
  height: 58%;
  border-radius: 0 0 7px 7px;
  background: linear-gradient(#3a3a3c, #1d1d1f);
  box-shadow: 0 3px 0 #000;
  transition: transform 90ms var(--ease-out), box-shadow 90ms var(--ease-out);
  transform-origin: 50% 0;
  z-index: 1;
}
.keys .w.down { transform: scaleY(0.985) translateY(2px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 1px 0 #d9d9de; background: linear-gradient(#fff6d6, #ffeaa0); }
.keys .b.down { transform: translateY(2px); box-shadow: 0 1px 0 #000; }

/* color by number */
.cbn {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  width: min(100%, 220px);
}
.cbn i {
  position: relative;
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cbn i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c);
  transform: scale(0);
  border-radius: 50%;
  transition: transform 420ms var(--ease-out), border-radius 420ms var(--ease-out);
  transition-delay: calc(var(--d) * 32ms);
}
.tile.is-filled .cbn i::after { transform: scale(1.5); border-radius: 0; }

/* grown-ups */
.tile-dark {
  min-height: 360px;
  background: #0a0a0b;
  color: #f5f5f7;
  box-shadow: none;
  justify-content: flex-end;
}
.tile-dark .tag { background: rgba(255, 255, 255, 0.08); color: #c7c7cc; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.tile-dark h3 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.04em; line-height: 1.04; max-width: 12em; }
.tile-dark p { color: #a1a1a6; font-size: 17px; max-width: 32em; margin-top: 12px; }
.orb {
  position: absolute;
  z-index: -1;
  right: -8%;
  top: -40%;
  width: min(70vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #ff6b3d, #ffb340, #ff3d6e, #7a5cff, #2ec5ff, #ff6b3d);
  filter: blur(70px);
  opacity: 0.55;
  animation: spin 24s linear infinite;
}
.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- studio */

.manifesto {
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 19em;
  text-wrap: pretty;
}
.manifesto .w { transition: opacity 260ms linear; }
.js .manifesto .w { opacity: 0.16; }
.js .manifesto .w.on { opacity: 1; }

.principles { margin-top: clamp(56px, 8vw, 96px); }
.principles li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 32px;
  padding: 28px 0;
  box-shadow: inset 0 1px 0 var(--line);
}
@media (min-width: 760px) {
  .principles li { grid-template-columns: 72px 1fr 1.3fr; align-items: baseline; }
}
.principles .n { font-size: 14px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.principles h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -0.03em; }
.principles p { color: var(--ink-2); }

/* ---------------------------------------------------------------- contact */

.contact {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 72px);
  text-align: center;
  overflow: hidden;
  overflow: clip;
}
.contact h2 {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.peek {
  display: none;
  position: absolute;
  right: 7%;
  bottom: 0;
  width: 150px;
  transform: translateY(46%);
  transition: transform 500ms var(--ease-spring);
  pointer-events: none;
}
@media (min-width: 900px) { .peek { display: block; } }
@media (hover: hover) and (pointer: fine) {
  .contact:hover .peek { transform: translateY(34%) rotate(-4deg); }
}
.contact p { margin-top: 16px; color: var(--ink-2); font-size: clamp(17px, 1.8vw, 21px); }
.mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  padding: 6px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  max-width: 100%;
}
.mail a {
  padding: 0 14px 0 16px;
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy {
  position: relative;
  display: grid;
  place-items: center;
  height: 44px;
  min-width: 96px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  transition: transform 160ms var(--ease-out);
  flex: none;
}
.copy:active { transform: scale(0.96); }
.copy span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), filter 200ms var(--ease-out);
}
.copy svg { width: 16px; height: 16px; }
.copy .done { opacity: 0; transform: scale(0.6); filter: blur(4px); }
.copy.is-done .idle { opacity: 0; transform: scale(0.6); filter: blur(4px); }
.copy.is-done .done { opacity: 1; transform: none; filter: none; }

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

.footer {
  padding: 40px 0 56px;
  font-size: 13px;
  color: var(--ink-3);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  /* hairline only as wide as the content column */
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { transition: color 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .footer a:hover { color: var(--ink); }
}

/* ---------------------------------------------------------------- reveal on scroll */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-expo), transform 900ms var(--ease-expo);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* hero intro */
.js .intro {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
  animation: intro 1000ms var(--ease-expo) forwards;
  animation-delay: calc(120ms + var(--d, 0) * 80ms);
}
@keyframes intro {
  to { opacity: 1; transform: none; filter: blur(0); }
}
.js .shelf .app {
  opacity: 0;
  transform: translateY(16px) scale(0.94);
  animation: pop 800ms var(--ease-expo) forwards;
  animation-delay: calc(560ms + var(--d, 0) * 60ms);
}
@keyframes pop {
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- legal pages */

.legal { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 8vw, 112px); }
.legal article { max-width: 720px; }
.legal .crumb { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.legal .crumb a { color: var(--ink-2); }
.legal h1 {
  margin-top: 12px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.legal .updated { margin-top: 12px; color: var(--ink-3); font-size: 15px; }
.legal article ul:not(.summary) {
  margin-top: 12px;
  padding-left: 1.3em;
  list-style: disc;
  color: var(--ink-2);
}
.legal article ul ul { margin-top: 6px; list-style: circle; }
.legal article ul:not(.summary) li { margin: 6px 0; padding-left: 2px; }
.legal article ul:not(.summary) li::marker { color: var(--ink-3); }
.legal .summary {
  margin-top: 32px;
  padding: 24px 28px;
  border-radius: 22px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.legal .summary li { position: relative; padding-left: 22px; margin: 6px 0; }
.legal .summary li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.legal h2 { margin-top: 44px; font-size: 24px; letter-spacing: -0.025em; font-weight: 700; }
.legal h3 { margin-top: 24px; font-size: 18px; letter-spacing: -0.015em; font-weight: 700; }
.legal p { margin-top: 12px; color: var(--ink-2); }
.legal p strong, .legal li strong { color: var(--ink); font-weight: 600; }
.legal a.ext { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.ph {
  padding: 0 4px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--sun) 40%, transparent);
  color: var(--ink);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
  .js .reveal { transform: none; }
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  .pimu-float, .orb { animation: none; }
}
