:root {
  --page: #0b0b0b;
  --card: #151515;
  --card-2: #1d1d1c;
  --hero: #4a4a4a;
  --paper: #f2f1ec;
  --paper-2: #e7e5dd;
  --ink: #0c0c0c;
  --ink-dim: #5f5d59;
  --fg: #f2f0ea;
  --dim: rgba(242, 240, 234, 0.66);
  --faint: rgba(242, 240, 234, 0.14);
  --rule: rgba(242, 240, 234, 0.14);
  --accent: #ff4a1c;
  --accent-ink: #0c0c0c;
  --violet: #c8b6ff;
  --frame: 10px;
  --r: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Satoshi", "Geist", "Helvetica Neue", Arial, sans-serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

html.js { scroll-behavior: auto; }

html.lenis,
html.lenis body { height: auto; }

body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

button, input { font: inherit; color: inherit; }

a { color: inherit; }

::selection { background: var(--accent); color: var(--ink); }

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

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

.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.6rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
}

.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.6rem);
}

.kicker {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.role {
  margin: 0.35rem 0 0;
  color: var(--dim);
  font-size: 0.95rem;
}

.on-paper {
  --fg: var(--ink);
  --dim: var(--ink-dim);
  --rule: rgba(12, 12, 12, 0.12);
  color: var(--ink);
  background: var(--paper);
}

.shell { padding: 0 var(--frame) var(--frame); }

.line { display: block; overflow: hidden; }

html.js .line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s var(--ease);
}

html.js .is-in .line > span,
html.js.is-ready .line > span { transform: none; }

.line:nth-child(2) > span { transition-delay: 0.08s; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.015em;
  padding: 0.72rem 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.45s var(--ease);
}

.btn:hover { background: var(--fg); color: var(--ink); }

.on-paper .btn:hover { background: var(--ink); color: var(--paper); }

.btn:active { transform: scale(0.97); }

.btn-small { padding: 0.48rem 0.85rem; font-size: 0.88rem; }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.btn-ghost:hover { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }

.on-paper .btn-ghost { color: var(--ink); }
.on-paper .btn-ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.text-link {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 0.18em;
}

.hn {
  --hn-spring: linear(0 0%, 0.0224 2.5%, 0.0795 5%, 0.1582 7.5%, 0.2488 10%, 0.3438 12.5%, 0.4379 15%, 0.5273 17.5%, 0.6097 20%, 0.6837 22.5%, 0.7488 25%, 0.8048 27.5%, 0.8521 30%, 0.8914 32.5%, 0.9234 35%, 0.949 37.5%, 0.969 40%, 0.9842 42.5%, 0.9956 45%, 1.0036 47.5%, 1.0091 50%, 1.0126 52.5%, 1.0144 55%, 1.0151 57.5%, 1.015 60%, 1.0142 62.5%, 1.0131 65%, 1.0118 67.5%, 1.0103 70%, 1.0089 72.5%, 1.0075 75%, 1.0062 77.5%, 1.0051 80%, 1.0041 82.5%, 1.0032 85%, 1.0024 87.5%, 1.0018 90%, 1.0013 92.5%, 1.0009 95%, 1.0005 97.5%, 1 100%);
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 20px 50px 0;
  pointer-events: none;
  color: var(--fg);
}

.hn-bar {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 0fr auto;
  align-items: center;
  width: max-content;
  max-width: calc(100vw - 32px);
  height: auto;
  padding: 5px;
  border-radius: 1000px;
  background: #141414c2;
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  backdrop-filter: blur(20px) saturate(1.2);
  interpolate-size: allow-keywords;
  transition: width 0.4s var(--hn-spring) 0.18s, grid-template-columns 0.4s var(--hn-spring) 0.18s;
}

.hn:hover .hn-bar,
.hn:focus-within .hn-bar,
.hn.is-open .hn-bar {
  grid-template-columns: 150px minmax(0, 1fr) auto;
  width: min(900px, calc(100vw - 100px));
  transition-delay: 0s;
}

.hn-logo {
  height: 35px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: inherit;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.hn-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.hn:hover .hn-links,
.hn:focus-within .hn-links,
.hn.is-open .hn-links {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.35s ease 0.06s;
}

.hn-links a {
  height: 35px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 1000px;
  color: inherit;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s cubic-bezier(0.44, 0, 0.56, 1);
}

.hn-links a:hover {
  background: #a6a6a680;
  transition: background-color 0.4s var(--hn-spring);
}

.hn-end {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.lang { display: flex; align-items: center; gap: 0.3rem; color: var(--dim); font-size: 0.8rem; }

.lang button {
  background: none;
  border: 0;
  padding: 0.2rem;
  cursor: pointer;
  color: var(--dim);
}

.lang button[aria-pressed="true"] { color: var(--fg); }

.hn-talk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 35px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.hn-talk:hover { background: var(--fg); }
.hn-talk:active { transform: scale(0.97); }

.hn-toggle {
  display: none;
  box-sizing: border-box;
  height: 35px;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.85rem 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.hn-toggle-icon { position: relative; width: 16px; height: 16px; }

.hn-toggle-icon i {
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 1.5px;
  margin-top: -0.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.4s var(--hn-spring);
}

.hn-toggle-icon i { transform: translateY(-3.5px); }
.hn-toggle-icon i + i { transform: translateY(3.5px); }

.hn.is-open .hn-toggle {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--ink);
}

.hn.is-open .hn-toggle-icon i { transform: translateY(0) rotate(45deg); }
.hn.is-open .hn-toggle-icon i + i { transform: translateY(0) rotate(-45deg); }

.hero-card {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 20px);
  border-radius: var(--r);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 118px clamp(1.25rem, 3.2vw, 3.5rem) clamp(1.25rem, 2vw, 1.8rem);
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.45) 100%),
    radial-gradient(50% 60% at 68% 42%, rgba(150, 149, 150, 0.45), transparent 70%),
    #3f3f3f;
}

.hero-card .stage { z-index: 0; }

.hero-clouds {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-cloud {
  position: absolute;
  display: block;
}

.hero-cloud-shift { display: block; will-change: transform; }

.hero-cloud img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-select: none;
}

.hero-cloud-left { opacity: 0.5; width: 64.4%; top: -1%; left: -29%; }
.hero-cloud-left img { scale: -1 1; }
.hero-cloud-right { opacity: 0.78; width: 71.7%; top: 44.6%; left: 58.5%; }
.hero-cloud-center { opacity: 0.16; width: 40%; top: 14%; left: 34%; }

@media (min-width: 981px) {
  .hero-clouds { z-index: 2; }
  .hero-card .stage { z-index: 3; }
  .hero-top,
  .hero-dock { z-index: 5; }
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(18, 18, 18, 0.78) 0%, rgba(18, 18, 18, 0.28) 46%, transparent 68%);
}

.hero-top,
.hero-dock { position: relative; z-index: 3; }

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.hero-top .display { max-width: 11ch; }

.hero-line {
  max-width: 16rem;
  margin: 0.4rem 0 0;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  line-height: 1.25;
}

.hero-dock {
  align-self: end;
  justify-self: center;
  width: max-content;
  max-width: calc(100% - 1rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.46);
  border: 1px solid rgba(242, 240, 234, 0.16);
  backdrop-filter: blur(12px);
}

.dock-label { font-size: 0.92rem; }

.stage { position: absolute; inset: 0; pointer-events: none; }

.stage canvas { width: 100%; height: 100%; display: block; }

.who { height: 230vh; }

.who-sticky,
.stack-sticky {
  position: sticky;
  top: var(--frame);
  height: calc(100svh - 20px);
}

.who-card,
.stack-card,
.exp-card,
.talk-card,
.metric-row,
.case-card,
.mini {
  border-radius: var(--r);
}

.who-card,
.stack-card,
.exp-card,
.talk-card {
  height: 100%;
  padding: clamp(4.5rem, 8vh, 96px) clamp(1.4rem, 3vw, 3rem) clamp(1.4rem, 3vw, 3rem);
  position: relative;
  overflow: hidden;
}

.who-card { display: flex; flex-direction: column; overflow: hidden; }

.who-card .display,
.stack-card .display { font-size: clamp(2.2rem, 4.2vw, 4.4rem); }

.who-grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: end;
  margin-top: auto;
}

.who-visual { position: relative; min-height: 280px; }


.who-visual img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(70%, 220px);
  height: auto;
  margin: 0 auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
}

/* Editorial left/right mix: Chi sono and Projects lean right */
.who-card > .kicker,
.who-card > .display { text-align: right; }
.who-grid { direction: rtl; }
.who-grid > * { direction: ltr; }
.work-head { text-align: right; }

.beats { display: grid; gap: 0.7rem; }

.beats button,
.layers button {
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--dim);
  padding: 0.15rem 0;
  transition: color 0.35s var(--ease);
}

.beats button {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 500;
}

.beats button[aria-selected="true"],
.layers button[aria-selected="true"] { color: var(--fg); }

.on-paper .beats button[aria-selected="true"] { color: var(--ink); }

.term {
  margin-top: 1.2rem;
  border-radius: 14px;
  overflow: hidden;
  background: #141414;
  color: var(--paper);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.8rem;
  background: #1c1c1c;
  color: rgba(242, 240, 234, 0.55);
  font-size: 0.75rem;
}

.term-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
}

.term-bar i:last-of-type { background: var(--accent); }

.term-bar em { margin-left: 0.4rem; font-style: normal; }

.term-body {
  margin: 0;
  min-height: 5.6rem;
  padding: 0.9rem 1rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.term-body::after {
  content: "▍";
  color: var(--accent);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.metric-row {
  list-style: none;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  background: var(--card);
  text-align: center;
}

.metric-row li { text-align: center; }

.metric-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-align: center;
}

.metric-row small { display: block; color: var(--dim); text-align: center; }

.stack { height: 280vh; }

.stack-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  background: var(--card);
}

.layers { display: grid; margin-top: 1.4rem; }

.layers button {
  display: flex;
  gap: 1.35rem;
  align-items: baseline;
  padding: 0.72rem 0 0.72rem 0.9rem;
  border: 0;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  letter-spacing: -0.03em;
}

.layers button[aria-selected="true"] {
  box-shadow: inset 2px 0 0 var(--accent);
}

.layers button span:first-child {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0;
  color: var(--accent);
}

.layer-detail {
  max-width: 38rem;
  color: var(--dim);
  margin: 0.3rem 0;
}

.stack-visual {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.stack-visual .stage { inset: 0 0 38% 0; }

.work-head { padding: clamp(2rem, 6vw, 5rem) clamp(0.4rem, 2vw, 1.5rem) 0.4rem; }

.case { padding-top: var(--frame); }

.case-card {
  min-height: 0;
  display: block;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.4rem, 3vw, 3rem);
  background: var(--card);
  position: relative;
}

.case-copy { text-align: center; }

.hero-studio {
  display: inline;
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.device-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(140px, 0.42fr);
  gap: 0;
  align-items: end;
  margin: 1.5rem auto 0.4rem;
  max-width: 860px;
  text-align: left;
}

/* Mockup already carries its own device frame + shadow (transparent PNG/WebP) */
.mock {
  margin: 0;
}

.mock img {
  width: 100%;
  height: auto;
  display: block;
}

/* Nudge the phone up so its base aligns with the iMac stand, and tuck it
   toward the iMac to tighten the gap between the two devices */
.mock-phone { margin-bottom: 6%; margin-left: -8%; }

.case-copy .psr { text-align: left; }
.case-copy .tags,
.case-copy .case-links { justify-content: center; }

.case-visual { overflow: hidden; border-radius: 18px; }

.case-title { font-size: clamp(2.8rem, 5.4vw, 5.4rem); }

.psr {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 1rem;
}

.psr h4 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.psr p, .mini p { margin: 0; color: var(--dim); font-size: 0.96rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
}

.tags li {
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  color: var(--dim);
}

.case-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }

.case-visual { position: relative; min-height: 320px; }

.more { padding: clamp(1.5rem, 4vw, 3rem) 0 0; }

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--frame);
  margin-top: 0.8rem;
}

.mini {
  background: var(--card);
  padding: 1.3rem 1.25rem 1.25rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: transform 0.45s var(--ease), background-color 0.3s ease;
}

.mini h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.mini .case-links { margin-top: auto; padding-top: 0.6rem; }

.mini:hover { transform: translateY(-4px); background: var(--card-2); }

.exp-card { background: var(--card); height: auto; }

.exp-card .stage { inset: 0 0 0 45%; }

.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: 46rem; position: relative; z-index: 1; }

.timeline li {
  display: grid;
  grid-template-columns: 8.5rem 1rem minmax(0, 1fr);
  gap: 0.8rem;
  padding: 1.1rem 0 1.3rem;
}

.when { color: var(--accent); font-size: 0.85rem; font-weight: 600; padding-top: 0.2rem; }

.dot {
  width: 9px;
  height: 9px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 74, 28, 0.12);
}

.timeline h3 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -0.03em;
  font-size: 1.8rem;
  font-weight: 500;
}

.talk-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  padding-bottom: clamp(3rem, 8vh, 5rem);
}

.talk-lead { max-width: 34rem; margin: 0 auto; color: var(--ink-dim); font-size: 1.08rem; }

.mail {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink-dim);
  border: 1px solid var(--rule);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.socials a:hover { color: var(--ink); border-color: var(--ink); }
.socials svg { width: 20px; height: 20px; }

.legal { margin: 1rem 0 0; color: var(--ink-dim); font-size: 0.85rem; }

.reveal { opacity: 1; }

html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

html.js .reveal.is-in,
html.js.is-ready .reveal { opacity: 1; transform: none; }

.support {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: 16px;
}

.eye-launcher {
  width: 68px;
  height: 68px;
  border: 0;
  padding: 0;
  border-radius: 22px;
  background: transparent;
  cursor: pointer;
}

.eye-face {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 3px 10px rgba(60, 40, 120, 0.22), 0 0 0 1px rgba(12, 12, 12, 0.06);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.eye-launcher:hover .eye-face,
.eye-launcher.is-near .eye-face,
.support.is-open .eye-face {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 14px rgba(60, 40, 120, 0.26), 0 0 0 1px rgba(12, 12, 12, 0.06);
}

.eye-ball {
  width: 18px;
  height: 22px;
  border-radius: 999px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.pupil {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  transform: translate(var(--px, 0px), var(--py, 0px));
  transition: transform 0.12s linear;
}

.eye-ball::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  background: var(--violet);
  transform: scaleY(0);
  transform-origin: center top;
}

.eye-face.is-blink .eye-ball::after {
  transform: scaleY(1);
  transition: transform 0.08s linear;
}

.support-panel {
  position: absolute;
  right: 0;
  bottom: 80px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: linear-gradient(180deg, #1c1c1c 0%, #121212 100%);
  border: 1px solid rgba(242, 240, 234, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform-origin: bottom right;
  transform: translateY(10px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.3s ease;
}

.support.is-open .support-panel {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}


.support-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.9rem 0.9rem 0.4rem 1rem;
}

.support-head strong { display: block; letter-spacing: -0.03em; }
.support-head small { color: var(--dim); }

.support-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.support-avatar i {
  width: 9px;
  height: 12px;
  border-radius: 99px;
  background: radial-gradient(circle at 50% 58%, #fff 0 1.7px, var(--ink) 2.2px);
}

.panel-x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  font-size: 1.3rem;
}

.support-log {
  padding: 0.4rem 1rem 0.6rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bubble {
  max-width: 92%;
  padding: 0.75rem 0.85rem;
  border-radius: 16px 16px 16px 6px;
  background: rgba(242, 240, 234, 0.06);
}

.bubble p { margin: 0; }

.bubble.user {
  margin-left: auto;
  border-radius: 16px 16px 6px 16px;
  background: rgba(255, 74, 28, 0.16);
}

.greet-text:empty { display: none; }

.dots { display: inline-flex; gap: 4px; padding: 0.2rem 0; }

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg);
  animation: bounce 1s infinite ease-in-out;
}

.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }

.dots.is-done { display: none; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.7rem;
}

.chip {
  border: 1px solid rgba(242, 240, 234, 0.16);
  background: transparent;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.chip:hover { border-color: var(--accent); background: rgba(255, 74, 28, 0.1); }

.composer {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  border-top: 1px solid rgba(242, 240, 234, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.composer input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 240, 234, 0.06);
  padding: 0.65rem 0.9rem;
}

.chat-lock { overflow: hidden; }

@media (max-width: 980px) {
  html { overflow-x: hidden; }
  .hero-top { flex-direction: column; }
  .case-card, .stack-card, .who-grid, .more-grid { grid-template-columns: 1fr; }
  .psr { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr; gap: 1.2rem; }
  .hero-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: calc(100svh - 20px);
    padding-top: 108px;
  }
  .hero-top { margin-top: 26vh; }
  .hero-cloud-center { display: none; }
  .hero-cloud-left { opacity: 0.42; width: 125%; top: 6%; left: -62%; }
  .hero-cloud-right { opacity: 0.7; width: 135%; top: 58%; left: 22%; }
  .hero-dock {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 2.75rem;
    transform: translateX(-50%);
    margin: 0;
    max-width: calc(100% - 20px);
  }
  .hero-card::after {
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.1) 20%, rgba(18, 18, 18, 0.78) 68%);
  }
  .who, .stack { height: auto; }
  .who-sticky, .stack-sticky { position: static; height: auto; }
  .who-card, .stack-card, .talk-card { height: auto; }
  .stack-visual { min-height: 320px; }
  .stack-visual .stage { inset: 0 0 50% 0; }
  .case-card { min-height: 0; }
  .case-visual { min-height: 220px; }
  .device-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.1rem;
    max-width: 460px;
    text-align: center;
  }
  .device-row .mock-phone { width: 52%; margin-bottom: 0; margin-left: 0; }
  .case-copy .device-row { margin-inline: auto; }
  .timeline li { grid-template-columns: 1rem minmax(0, 1fr); }
  .when { grid-column: 2; }
}

@media (max-width: 900px) {
  .hn { padding: 14px 16px 0; }
  .hn-bar,
  .hn:hover .hn-bar,
  .hn:focus-within .hn-bar,
  .hn.is-open .hn-bar {
    width: 100%;
    grid-template-columns: 1fr auto;
    transition: none;
  }
  .hn-talk { display: none; }
  .hn-toggle { display: inline-flex; }
  .hn-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-radius: 18px;
    background: #141414e6;
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    backdrop-filter: blur(20px) saturate(1.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-16px);
    overflow: hidden;
    transition: opacity 0.4s var(--hn-spring), transform 0.4s var(--hn-spring);
  }
  .hn.is-open .hn-links {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .hn-links a { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .hn-bar, .hn-links, .hn-links a, .hn-toggle-icon i, .hn-talk { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .line > span,
  html.js .reveal { transform: none; opacity: 1; transition: none; }
  .term-body::after,
  .dots i { animation: none; }
  .mini:hover,
  .eye-launcher:hover .eye-face { transform: none; }
}

@media (max-width: 640px) {
  main { padding-bottom: 84px; }
  .support { right: 10px; bottom: 10px; }
  .support-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 88px;
    width: auto;
  }
}

/* Play: physics playground + name marquee (before contact) */
.play-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--card);
  padding-top: clamp(1.2rem, 3vh, 2rem);
}

.play-field {
  position: relative;
  height: clamp(300px, 44vh, 440px);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  touch-action: pan-y;
}

.toy {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: transform;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--fg);
}

.toy.is-grabbed { cursor: grabbing; }

/* Static fallback (no JS physics / reduced motion): toys rest in a row */
.play-field:not(:has(.is-live)) {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0 1rem 0.6rem;
}
.toy:not(.is-live) { position: relative; }

.toy-pill {
  height: 60px;
  padding: 0 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(242, 240, 234, 0.45);
  background: var(--page);
}
.toy-pill s { text-decoration-thickness: 1.5px; margin-right: 0.3em; }
.toy-pill-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.toy-pill-paper { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.toy-dot {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.8rem;
}

.toy-diamond {
  width: 70px;
  height: 70px;
  background: var(--paper);
  border-radius: 3px;
}

.toy-half {
  width: 110px;
  height: 55px;
  background: var(--paper);
  border-radius: 110px 110px 0 0;
}
.toy-half-violet { background: var(--violet); }

.toy-plus { width: 88px; height: 88px; }
.toy-plus-accent { --plus: var(--accent); }
.toy-plus::before,
.toy-plus::after {
  content: "";
  position: absolute;
  background: var(--plus, var(--paper));
}
.toy-plus::before { left: 0; right: 0; top: 35%; height: 30%; }
.toy-plus::after { top: 0; bottom: 0; left: 35%; width: 30%; }

.play-marquee {
  overflow: hidden;
  padding: clamp(0.4rem, 1.5vh, 1rem) 0 clamp(1rem, 3vh, 2rem);
}

.play-track {
  display: flex;
  width: max-content;
  animation: play-marquee 26s linear infinite;
}

.play-track span {
  flex: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 10.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--fg);
  white-space: nowrap;
}

@keyframes play-marquee {
  to { transform: translateX(-50%); }
}

.play-hint {
  position: absolute;
  top: clamp(1rem, 2.5vh, 1.6rem);
  right: clamp(1.2rem, 3vw, 2rem);
  margin: 0;
  color: var(--dim);
  font-size: 0.78rem;
  pointer-events: none;
}

@media (max-width: 640px) {
  .play-field { height: clamp(220px, 34vh, 300px); }
  .toy-pill { height: 44px; padding: 0 1.1rem; font-size: 0.82rem; }
  .toy-dot { width: 66px; height: 66px; font-size: 1.3rem; }
  .toy-diamond { width: 50px; height: 50px; }
  .toy-half { width: 80px; height: 40px; }
  .toy-plus { width: 62px; height: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  .play-track { animation: none; }
  .play-hint { display: none; }
}

/* Tech tags with brand icons */
.tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  background: rgba(242, 240, 234, 0.035);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.tags li:hover {
  color: var(--fg);
  border-color: color-mix(in srgb, var(--tc, var(--fg)) 55%, transparent);
  background: color-mix(in srgb, var(--tc, var(--fg)) 10%, transparent);
}
.tags .ti {
  width: 15px;
  height: 15px;
  flex: none;
  fill: var(--tc, currentColor);
}
.on-paper .tags li { background: rgba(12, 12, 12, 0.03); }

/* Marquee: glossy liquid-orange name; the liquid moves inside the letters with the pointer */
.play-track span {
  color: var(--accent);
  background-color: var(--accent);
  background-image: var(--liquid, linear-gradient(100deg, #ff4a1c, #ff7040 50%, #ff4a1c));
  background-size: var(--liquid-size, 900px 450px);
  background-position: var(--lx, 0px) var(--ly, 0px);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 74, 28, 0.22));
  line-height: 1.12;
  padding: 0.04em 0 0.16em;
}
.play-marquee { cursor: default; }

/* Metrics: hurricane spin on hover */
.metric-row li { position: relative; }
.metric-num {
  position: relative;
  width: max-content;
  margin: 0 auto;
  transform: rotate(var(--spin, 0deg)) scale(var(--spin-scale, 1));
  will-change: transform;
}
.metric-num::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.2em;
  height: 2.2em;
  margin: -1.1em 0 0 -1.1em;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(255, 74, 28, 0.0) 55%, rgba(255, 74, 28, 0.45) 80%, rgba(200, 182, 255, 0.35) 92%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 38%, #000 39% 41%, transparent 42% 52%, #000 53% 55%, transparent 56% 66%, #000 67% 69%, transparent 70%);
  mask: radial-gradient(circle, transparent 0 38%, #000 39% 41%, transparent 42% 52%, #000 53% 55%, transparent 56% 66%, #000 67% 69%, transparent 70%);
  opacity: var(--swirl, 0);
  pointer-events: none;
  z-index: -1;
}
.metric-row li.is-spinning .metric-num {
  text-shadow: -0.06em 0 0 rgba(255, 74, 28, 0.55), 0.06em 0 0 rgba(200, 182, 255, 0.45);
}
@media (prefers-reduced-motion: reduce) {
}
