/* Nimbus — editorial sky / paper design. Colors are tokens; each scene (sky | paper) remaps --fg/--muted/--line. */

/* ============ Tokens ============ */
:root {
  --sky: 22 96 216;
  --sky-2: 74 156 245;
  --paper: 241 236 227;
  --paper-2: 248 245 239;
  --ink: 21 23 28;
  --ink-muted: 84 88 96;
  --on-sky: 255 255 255;
  --gold: 255 199 0;
  --gold-deep: 150 108 0;
  --pill-bg: 17 19 24;
  --pill-fg: 255 255 255;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: .25s;
  --t-med: .5s;
  --t-slow: .9s;
}
html.night {
  --sky: 10 22 51;
  --sky-2: 24 44 98;
  --paper: 17 18 20;
  --paper-2: 26 27 30;
  --ink: 237 232 223;
  --ink-muted: 166 162 155;
  --gold-deep: 255 199 0;
  --pill-bg: 237 232 223;
  --pill-fg: 17 18 20;
}

[data-scene="sky"], [data-on="sky"] {
  --fg: var(--on-sky);
  --muted: 255 255 255;
  --muted-a: .86;
  --line: 255 255 255;
  --accent-ink: var(--gold);
  --glass-bg: 16 30 70;
  --glass-a: .26;
  --glass-edge: 255 255 255;
  --glass-edge-a: .24;
}
[data-scene="paper"], [data-on="paper"] {
  --fg: var(--ink);
  --muted: var(--ink-muted);
  --muted-a: 1;
  --line: var(--ink);
  --accent-ink: var(--gold-deep);
  --glass-bg: 255 255 255;
  --glass-a: .58;
  --glass-edge: var(--ink);
  --glass-edge-a: .1;
}
html.night [data-scene="sky"], html.night [data-on="sky"] { --glass-bg: 4 10 28; --glass-a: .38; }
html.night [data-scene="paper"], html.night [data-on="paper"] { --glass-bg: 40 42 48; --glass-a: .6; --glass-edge: 255 255 255; --glass-edge-a: .12; }

/* Frosted glass surface: tint follows the scene underneath */
.glass {
  background: linear-gradient(180deg, rgb(255 255 255 / .1), rgb(255 255 255 / 0) 60%), rgb(var(--glass-bg) / var(--glass-a));
  border: 1px solid rgb(var(--glass-edge) / var(--glass-edge-a));
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 24px 50px -28px rgb(0 0 40 / .45);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html, body { overflow-x: clip; }
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: rgb(var(--on-sky));
  background: rgb(var(--sky));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
::selection { background: rgb(var(--gold)); color: #111; }
:focus-visible { outline: 2px solid rgb(var(--gold)); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: 72px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1rem; background: rgb(var(--pill-bg)); color: rgb(var(--pill-fg));
  transition: top var(--t-fast);
}
.skip:focus { top: 1rem; }

/* WebGL world sits behind everything; sections stay transparent so it shows through */
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
html.gl-ready #world { opacity: 1; }
main, #header { position: relative; z-index: 1; }

/* Without WebGL, sections paint their own scene colors */
html.no-gl [data-scene="sky"] { background: linear-gradient(rgb(var(--sky)), rgb(var(--sky-2))); }
html.no-gl [data-scene="paper"] { background: rgb(var(--paper)); }

[data-scene] { color: rgb(var(--fg)); }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* ============ Type ============ */
.display {
  font-family: var(--serif);
  font-weight: 300;
  font-optical-sizing: auto;
  letter-spacing: -0.022em;
  line-height: 1.04;
  text-wrap: balance;
}
.display em { font-style: italic; font-weight: 300; }
.h2 { font-size: clamp(2.2rem, 5vw, 4.4rem); }
.h3 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.08; }
.label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgb(var(--fg) / .78);
}
.body-muted { color: rgb(var(--muted) / var(--muted-a)); max-width: 40rem; }
.lead { margin-top: 1.25rem; font-size: 1.08rem; }
.mono { font-family: var(--mono); }

/* Split words (JS) */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .w > span { display: inline-block; }

/* ============ Logo ============ */
.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.logo-i { position: relative; color: rgb(var(--gold)); }
.logo-i .halo {
  position: absolute;
  left: 50%;
  top: -.06em;
  width: .9em;
  transform: translateX(-50%);
  overflow: visible;
  fill: none;
  stroke: rgb(var(--gold));
  stroke-width: 7;
  transition: transform var(--t-med) var(--ease-out);
}
.logo:hover .halo { transform: translateX(-50%) rotate(-8deg) scale(1.12); }

/* ============ Header ============ */
#header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* equal side columns keep the nav centered */
  align-items: center;
  gap: 1rem;
  padding: .9rem var(--gutter);
  color: rgb(var(--fg));
  transition: color var(--t-med), transform var(--t-med) var(--ease-out);
}
#header.is-hidden { transform: translateY(-110%); }
.nav { display: flex; gap: .1rem; padding: .25rem .4rem; border-radius: 999px; transition: background-color var(--t-med), border-color var(--t-med); }
.nav-link {
  position: relative;
  padding: .7rem .8rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgb(var(--fg) / .78);
  transition: color var(--t-fast);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem; bottom: .5rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.nav-link:hover, .nav-link.is-active { color: rgb(var(--fg)); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.header-actions { grid-column: 3; display: flex; align-items: center; justify-self: end; gap: .5rem; }
#header .logo { justify-self: start; }
.header-actions .icon-btn { background: rgb(var(--pill-bg)); color: rgb(var(--pill-fg)); border-color: transparent; }
.header-actions .icon-btn:hover { background: rgb(var(--pill-bg)); box-shadow: 0 0 0 4px rgb(var(--gold) / .25); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--line) / .28);
  color: rgb(var(--fg));
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
  touch-action: manipulation;
}
.icon-btn svg { width: 1.1rem; height: 1.1rem; }
.icon-btn:hover { border-color: rgb(var(--line) / .7); background: rgb(var(--line) / .06); }
.icon-btn:active { transform: scale(.94); }
html.day .theme-moon, html.night .theme-sun { display: none; }

.show-sm { display: none; }
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .25rem;
  padding: 5rem var(--gutter) 2rem;
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-io);
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu a {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  line-height: 1.15;
  padding: .2rem 0;
}
body.menu-open #header { --fg: var(--ink); --line: var(--ink); }

/* ============ Buttons ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.9rem;
  padding: .7rem 1.15rem .7rem 1.3rem;
  border-radius: 999px;
  background: rgb(var(--pill-bg));
  color: rgb(var(--pill-fg));
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
  touch-action: manipulation;
}
.pill:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -12px rgb(0 0 0 / .45); }
.pill:active { transform: scale(.97); }
.pill-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: rgb(var(--gold));
  box-shadow: 0 0 0 0 rgb(var(--gold) / .6);
  transition: box-shadow var(--t-med);
}
.pill:hover .pill-dot { box-shadow: 0 0 0 5px rgb(var(--gold) / .22); }
.pill-sm { min-height: 2.75rem; padding: .55rem 1rem; font-size: .68rem; }
.pill-lg { min-height: 3.6rem; padding: 1rem 1.6rem 1rem 1.9rem; font-size: .85rem; }

.link-u {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.link-u::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .6rem;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transition: transform var(--t-med) var(--ease-out);
}
.link-u:hover::after { transform: scaleX(0); }

/* ============ HERO ============ */
.hero { position: relative; height: 260vh; }
.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 2rem;
  will-change: transform, opacity;
}
.hero-copy { padding-top: 3rem; }
.hero-title { margin-top: 1.4rem; font-size: clamp(2.6rem, 5.8vw, 5.6rem); }
.hero-sub { margin-top: 1.6rem; max-width: 30rem; font-size: 1.08rem; color: rgb(var(--fg) / .9); }
.hero-ctas { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.hero-mark {
  position: relative;
  justify-self: center;
  width: min(520px, 40vw);
  aspect-ratio: 1;
  cursor: grab;
  touch-action: pan-y;
}
.hero-mark:active { cursor: grabbing; }
.drag-hint {
  position: absolute;
  left: 50%;
  bottom: -.5rem;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgb(var(--fg) / .7);
  white-space: nowrap;
}
.hero-statement {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: clamp(2.6rem, 7.4vw, 7.6rem);
  pointer-events: none;
}
.hero-statement .w > span { opacity: 0; }
.hero-foot {
  position: absolute;
  left: 0; right: 0;
  bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: none;
}
.scroll-line { position: relative; width: 4rem; height: 1px; background: rgb(var(--line) / .3); overflow: hidden; }
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(var(--fg));
  transform: translateX(-100%);
  animation: scroll-line 2.4s var(--ease-io) infinite;
}
@keyframes scroll-line { 60%, 100% { transform: translateX(100%); } }

/* ============ SERVIÇOS ============ */
.services { position: relative; height: 420vh; }
.services-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
}
.services-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
.services-copy .h2 { margin-top: 1rem; max-width: 12ch; }
.svc-list { margin-top: 2.6rem; border-top: 1px solid rgb(var(--line) / .14); }
.svc { border-bottom: 1px solid rgb(var(--line) / .14); }
.svc button {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  width: 100%;
  min-height: 3.6rem;
  padding: .9rem 0;
  text-align: left;
  opacity: .38;
  transition: opacity var(--t-med) var(--ease-out);
}
.svc button:hover { opacity: .7; }
.svc.is-active button { opacity: 1; }
.svc-n { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: rgb(var(--accent-ink)); }
.svc-t { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.15; }
.svc p {
  max-height: 0;
  padding-left: 2.6rem;
  color: rgb(var(--muted));
  opacity: 0;
  transition: max-height var(--t-med) var(--ease-out), opacity var(--t-med), padding var(--t-med) var(--ease-out);
  overflow: hidden;
  max-width: 34rem;
}
.svc.is-active p { max-height: 8rem; opacity: 1; padding-bottom: 1.1rem; }
.svc-visual { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.svc-stage { width: min(520px, 40vw); aspect-ratio: 1; }
.svc-meta { display: flex; align-items: center; gap: 1rem; }
.svc-bar { width: 8rem; height: 1px; background: rgb(var(--line) / .16); overflow: hidden; }
.svc-bar i { display: block; height: 100%; background: rgb(var(--fg)); transform: scaleX(0); transform-origin: left; }

/* ============ Generic sections ============ */
.section { position: relative; padding: clamp(6rem, 14vw, 11rem) 0; }
.section-head .h2 { margin-top: 1rem; }

/* ============ Zunvo ============ */
.zunvo {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 3rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
.zunvo-id { display: flex; align-items: center; gap: 1.1rem; }
.zunvo-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  flex: none;
  border-radius: 1.1rem;
  background: #111318;
  color: rgb(var(--gold));
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 14px 30px -14px rgb(0 0 0 / .5);
}
.zunvo-id .h3 { margin-top: .25rem; }
.quote { margin-top: 1.8rem; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.15; }
.zunvo .body-muted { margin-top: 1rem; }
.tags { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem; }
.habit-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 2.9rem;
  padding: .7rem 1.1rem;
  border-radius: 1.4rem;
  border: 1px solid rgb(var(--line) / .38);
  text-align: left;
  transition: border-color var(--t-fast), background-color var(--t-med);
}
.habit-tag:hover { border-color: rgb(var(--line) / .8); }
.habit-tag.glass { border-color: rgb(var(--glass-edge) / var(--glass-edge-a)); }
.habit-tag.glass:hover { border-color: rgb(var(--line) / .6); }
.habit-head { display: inline-flex; align-items: center; gap: .75rem; font-weight: 500; }
.plus { position: relative; width: .7rem; height: .7rem; transition: transform var(--t-med) var(--ease-out); }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; }
.plus::after { transform: rotate(90deg); }
.habit-body {
  display: block;
  width: 0;
  min-width: 100%;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: .9rem;
  color: rgb(var(--fg) / .88);
  transition: max-height var(--t-med) var(--ease-out), opacity var(--t-med), margin var(--t-med);
}
.habit-tag[aria-expanded="true"] { background: rgb(var(--line) / .1); border-color: rgb(var(--line) / .8); }
.habit-tag[aria-expanded="true"] .plus { transform: rotate(45deg); }
.habit-tag[aria-expanded="true"] .habit-body { width: min(16rem, 70vw); min-width: 0; max-height: 6rem; opacity: 1; margin-top: .45rem; }

/* 3D phone */
.phone-scene { position: relative; display: grid; place-items: center; min-height: 560px; perspective: 1400px; }
.phone3d {
  --rx: 6deg;
  --ry: -18deg;
  position: relative;
  width: 260px;
  height: 530px;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .2s linear;
  will-change: transform;
}
.phone-back, .phone-edge, .phone-face { position: absolute; inset: 0; border-radius: 2.6rem; }
.phone-back { transform: translateZ(-16px); background: linear-gradient(160deg, #2a2a30, #0b0b0e); }
.phone-edge { transform: translateZ(-8px); background: linear-gradient(90deg, #8f6b00, #ffcf33 45%, #8f6b00); }
.phone-face {
  padding: 10px;
  background: #0c0c0f;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08), 0 50px 80px -30px rgb(0 0 30 / .55);
}
.phone-screen {
  height: 100%;
  border-radius: 2rem;
  background: radial-gradient(120% 70% at 50% 0%, #1d1a10, #0a0a0b 60%);
  padding: 1.6rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  color: #fff;
}
.phone-top { display: flex; width: 100%; justify-content: space-between; font-size: .7rem; color: rgb(255 255 255 / .5); }
.streak-ring {
  --p: .86;
  position: relative;
  width: 9.5rem;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(#ffc700 calc(var(--p) * 360deg), rgb(255 255 255 / .08) 0);
  transition: transform var(--t-fast);
}
.streak-ring:hover { transform: scale(1.04); }
.streak-ring.is-bump { animation: ring-bump .5s ease; }
@keyframes ring-bump { 40% { transform: scale(1.06); } }
.streak-core {
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  background: #0d0d0f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.streak-core strong { font-size: 2.6rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.streak-core small { font-size: .75rem; color: rgb(255 255 255 / .55); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; width: 100%; }
.dot { aspect-ratio: 1; border-radius: 999px; background: rgb(255 255 255 / .08); transition: background-color .3s; }
.dot.on { background: #ffc700; }
.habit-list { display: grid; gap: .45rem; width: 100%; font-size: .8rem; }
.habit-list li { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: .8rem; background: rgb(255 255 255 / .04); }
.habit-list li span { width: .9rem; height: .9rem; border-radius: 99px; border: 1.5px solid rgb(255 255 255 / .3); }
.habit-list li.done span { background: #ffc700; border-color: #ffc700; }
.float-chip {
  position: absolute;
  padding: .5rem .85rem;
  border-radius: 999px;
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 16px 30px -14px rgb(0 0 30 / .45);
}
.float-chip.c1 { right: -22%; top: 20%; transform: translateZ(80px); }
.float-chip.c2 { left: -26%; bottom: 22%; transform: translateZ(60px); }

/* ============ Projects coverflow ============ */
.projects-head { margin-top: clamp(5rem, 10vw, 8rem); display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.projects-head .body-muted { margin-top: .4rem; font-size: .95rem; }
.cf-nav { display: flex; gap: .5rem; }
.coverflow {
  position: relative;
  height: 500px;
  margin-top: 2.5rem;
  perspective: 1600px;
  transform-style: preserve-3d;
  touch-action: pan-y;
}
.project-card {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(560px, 82vw);
  margin-left: calc(min(560px, 82vw) / -2);
  padding: .9rem;
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  --fg: var(--ink);
  --muted: var(--ink-muted);
  --line: var(--ink);
  box-shadow: 0 40px 70px -40px rgb(0 0 40 / .55);
  transition: transform .8s var(--ease-out), opacity .8s var(--ease-out);
  cursor: pointer;
  user-select: none;
}
.project-card.is-active { cursor: pointer; }
.browser { overflow: hidden; border: 1px solid rgb(var(--ink) / .12); }
.browser-bar { display: flex; align-items: center; gap: .35rem; padding: .55rem .75rem; border-bottom: 1px solid rgb(var(--ink) / .1); }
.browser-bar span { width: .55rem; height: .55rem; border-radius: 99px; background: rgb(var(--ink) / .18); }
.browser-bar span:first-child { background: rgb(var(--gold)); }
.browser-url { margin-left: .6rem; font-style: normal; font-family: var(--mono); font-size: .68rem; color: rgb(var(--ink) / .6); }
.browser-body { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.shot-body { background: #1a1a1a; }
.shot-body img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease-out); }
.project-card:hover .shot-body img { transform: scale(1.04); }
.featured-badge {
  position: absolute;
  top: .9rem;
  left: 1.2rem;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: rgb(var(--gold));
  color: #15171c;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.project-card.is-featured { box-shadow: 0 0 0 1px rgb(var(--gold) / .7), 0 40px 70px -40px rgb(0 0 40 / .55); }
.zunvo-mock { display: grid; place-items: center; background: #0d0d0f; }
.zm-ring {
  position: absolute;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: conic-gradient(#ffc700 300deg, rgb(255 255 255 / .08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 0);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.zm-z { font-size: 2.4rem; font-weight: 700; color: #ffc700; }
.dash-mock { display: flex; gap: .6rem; padding: .8rem; background: rgb(var(--paper-2)); }
.dm-side { width: 22%; background: rgb(var(--ink) / .06); }
.dm-main { flex: 1; display: grid; grid-template-rows: auto 1fr; gap: .6rem; }
.dm-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.dm-row i { height: 2.2rem; background: rgb(var(--ink) / .06); }
.dm-row i:first-child { background: rgb(var(--sky) / .9); }
.dm-chart { display: flex; align-items: flex-end; gap: 6%; padding: .6rem; background: rgb(var(--ink) / .03); }
.dm-chart b { flex: 1; height: var(--h); background: rgb(var(--sky)); }
.dm-chart b:nth-child(4), .dm-chart b:nth-child(6) { background: rgb(var(--gold)); }
.empty-mock { display: grid; place-items: center; background: linear-gradient(rgb(var(--sky)), rgb(var(--sky-2))); }
.em-halo { width: 30%; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed rgb(255 255 255 / .7); animation: spin 30s linear infinite; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem .2rem .2rem; }
.project-meta h4 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.2; }
.project-meta p { margin-top: .2rem; font-size: .88rem; line-height: 1.45; color: rgb(var(--ink-muted)); }
.project-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--ink) / .3);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.project-link:hover { background: rgb(var(--ink)); color: rgb(var(--paper)); }
.project-link.is-pending { opacity: .55; pointer-events: none; border-style: dashed; }
.cf-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.cf-dots i { width: .45rem; height: .45rem; border-radius: 99px; background: rgb(var(--line) / .35); transition: width var(--t-med) var(--ease-out), background-color var(--t-med); }
.cf-dots i.on { width: 1.6rem; background: rgb(var(--fg)); }

/* ============ Story ============ */
.story-grid { max-width: 52rem; }
.story-text { display: grid; gap: 1.2rem; max-width: 40rem; margin-top: 2.2rem; font-size: 1.08rem; line-height: 1.7; color: rgb(var(--muted) / var(--muted-a)); }
.story-text strong { font-weight: 600; color: rgb(var(--fg)); }
.story-quote {
  margin: .8rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid rgb(var(--gold));
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  line-height: 1.25;
  color: rgb(var(--fg));
}

/* ============ Anatomy ============ */
.anatomy { position: relative; height: 340vh; }
.anatomy-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-top: 3rem; }
.anatomy-grid { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 2.5rem; }
.steps { margin-top: 2.2rem; border-top: 1px solid rgb(var(--line) / .14); }
.step {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: .6rem;
  padding: .95rem 0;
  border-bottom: 1px solid rgb(var(--line) / .14);
  opacity: .4;
  cursor: pointer;
  transition: opacity var(--t-med);
}
.step:hover { opacity: .7; }
.step.is-active { opacity: 1; }
.step-n { font-family: var(--mono); font-size: .72rem; color: rgb(var(--accent-ink)); padding-top: .35rem; }
.step h4 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.25; }
.step p { margin-top: .15rem; font-size: .93rem; color: rgb(var(--muted)); line-height: 1.5; }
.progress { margin-top: 1.4rem; height: 1px; background: rgb(var(--line) / .14); overflow: hidden; }
.progress span { display: block; height: 100%; background: rgb(var(--fg)); transform: scaleX(0); transform-origin: left; }

.stack-scene { position: relative; height: min(72vh, 600px); display: grid; place-items: center; perspective: 1800px; }
.stack {
  --gap: 18px;
  --rot: -42deg;
  position: relative;
  width: min(320px, 70vw);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(var(--rot));
}
.layer {
  --i: 0;
  --lift: 0px;
  position: absolute;
  inset: 0;
  padding: 1.1rem;
  border: 1px solid rgb(var(--ink) / .16);
  background: rgb(var(--paper-2) / .94);
  color: rgb(var(--ink));
  box-shadow: 0 40px 60px -34px rgb(0 0 0 / .35);
  transform: translateZ(calc(var(--i) * var(--gap) + var(--lift)));
  transition: border-color var(--t-med), transform .7s var(--ease-out);
  overflow: hidden;
}
.layer[data-layer="1"] { --i: 1; }
.layer[data-layer="2"] { --i: 2; }
.layer[data-layer="3"] { --i: 3; }
.layer.is-active { border-color: rgb(var(--gold-deep)); }
.layer em {
  position: absolute;
  right: 1rem;
  bottom: .8rem;
  font-style: normal;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgb(var(--gold-deep));
}
.ls-map { position: relative; width: 100%; height: 85%; }
.ls-map i { position: absolute; width: 12px; height: 12px; border-radius: 99px; background: rgb(var(--sky)); }
.ls-map i:nth-child(1) { left: 12%; top: 18%; }
.ls-map i:nth-child(2) { left: 55%; top: 10%; }
.ls-map i:nth-child(3) { left: 78%; top: 48%; }
.ls-map i:nth-child(4) { left: 30%; top: 62%; }
.ls-map i:nth-child(5) { left: 60%; top: 80%; width: 20px; height: 20px; background: rgb(var(--gold)); }
.ls-map b { position: absolute; height: 1px; background: rgb(var(--ink) / .4); transform-origin: left center; }
.ls-map b:nth-child(6) { left: 15%; top: 21%; width: 44%; transform: rotate(-9deg); }
.ls-map b:nth-child(7) { left: 58%; top: 13%; width: 40%; transform: rotate(52deg); }
.ls-map b:nth-child(8) { left: 15%; top: 22%; width: 46%; transform: rotate(60deg); }
.ls-map b:nth-child(9) { left: 33%; top: 66%; width: 32%; transform: rotate(32deg); }
.ld-swatches { display: flex; gap: .5rem; }
.ld-swatches i { width: 2.4rem; height: 2.4rem; }
.ld-swatches i:nth-child(1) { background: #ffc700; }
.ld-swatches i:nth-child(2) { background: #1660d8; }
.ld-swatches i:nth-child(3) { background: #f1ece3; border: 1px solid rgb(0 0 0 / .12); }
.ld-swatches i:nth-child(4) { background: #15171c; }
.ld-type { margin-top: .6rem; font-family: var(--serif); font-weight: 300; font-size: 4.2rem; line-height: 1; }
.ld-comp { display: flex; gap: .5rem; margin-top: .8rem; }
.ld-comp i { height: 1.8rem; flex: 1; border-radius: 99px; border: 1px solid rgb(var(--ink) / .5); }
.ld-comp i:first-child { background: rgb(var(--ink)); }
.l-code pre { font-family: var(--mono); font-size: clamp(.7rem, 1.1vw, .85rem); line-height: 1.7; white-space: pre; }
.l-code .k { color: rgb(var(--gold-deep)); }
.l-code .f { color: rgb(var(--sky)); }
.l-code .s { color: #2b7a2b; }
html.night .l-code .f { color: #7cb4ff; }
html.night .l-code .s { color: #9be29b; }
.lu-bar { display: flex; gap: .4rem; }
.lu-bar i { height: .5rem; width: 2.5rem; border-radius: 99px; background: rgb(var(--ink) / .15); }
.lu-bar i:first-child { width: 1.4rem; background: rgb(var(--gold)); }
.lu-hero { display: grid; gap: .45rem; margin-top: 1.1rem; }
.lu-hero b { display: block; height: .9rem; border-radius: 99px; background: rgb(var(--ink) / .85); width: 85%; }
.lu-hero b + b { width: 60%; background: rgb(var(--sky)); }
.lu-hero span { display: block; margin-top: .4rem; width: 5rem; height: 1.6rem; border-radius: 99px; background: rgb(var(--ink)); }
.lu-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.1rem; }
.lu-cards i { aspect-ratio: 1; background: rgb(var(--ink) / .06); }

/* ============ Contact ============ */
.contact {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: clamp(8rem, 18vh, 12rem);
}
.contact-mark {
  position: relative;
  width: min(300px, 56vw);
  aspect-ratio: 1;
  margin: 0 auto 1.5rem;
}
.contact-inner { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-title { margin-top: 1.4rem; min-height: 2.2em; max-width: 16ch; font-size: clamp(2.4rem, 6vw, 5.4rem); }
.contact-lead { font-size: 1.02rem; color: rgb(var(--fg) / .92); }
.contact-form {
  width: min(100%, 46rem);
  margin-top: 2.2rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.2rem;
  text-align: left;
}
.field { display: grid; gap: .45rem; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgb(var(--fg) / .8);
}
.field input, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: .75rem 1rem;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 14px;
  background: rgb(255 255 255 / .1);
  color: rgb(var(--fg));
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:hover, .field textarea:hover { background: rgb(255 255 255 / .14); }
.field textarea { resize: vertical; min-height: 6.5rem; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: rgb(var(--fg) / .6); }
.field input:focus, .field textarea:focus { outline: none; border-color: rgb(var(--gold)); background: rgb(255 255 255 / .16); box-shadow: 0 0 0 3px rgb(var(--gold) / .25); }
.field [aria-invalid="true"] { border-color: rgb(255 150 130); box-shadow: 0 0 0 3px rgb(255 150 130 / .25); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .2rem; padding-top: 1.2rem; border-top: 1px solid rgb(255 255 255 / .16); }
.form-status { flex: 1 1 14rem; font-size: .92rem; color: rgb(var(--fg) / .88); }
.form-foot .pill { margin-left: auto; }
.caret {
  display: inline-block;
  width: .05em;
  height: .85em;
  margin-left: .06em;
  vertical-align: -0.06em;
  background: rgb(var(--gold));
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  text-align: center;
  margin-top: 6rem;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
  border-top: 1px solid rgb(var(--line) / .2);
  max-width: none;
  font-size: .9rem;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.5rem; }
.footer-links a { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; opacity: .85; transition: opacity var(--t-fast); }
.footer-links a:hover { opacity: 1; }
.footer-links svg { width: 1rem; height: 1rem; }

/* ============ Responsive ============ */
@media (max-width: 1023px) {
  .nav, .hide-sm { display: none; }
  .show-sm { display: inline-grid; }

  .hero { height: 220vh; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-mark { order: -1; width: min(300px, 62vw); margin-top: 3.5rem; }
  .drag-hint { display: none; }
  .hero-copy { padding-top: 0; }
  .hero-title { margin-top: 1rem; font-size: clamp(2.3rem, 8.4vw, 4rem); }
  .hero-sub { font-size: 1rem; margin-top: 1.1rem; }
  .hero-ctas { margin-top: 1.5rem; }
  .hero-foot { display: none; }

  .services { height: 380vh; }
  .services-stage { align-items: flex-start; padding-top: 4.5rem; }
  .services-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .svc-visual { order: -1; flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .svc-meta { flex-direction: column; align-items: flex-end; gap: .6rem; padding-bottom: .5rem; }
  .svc-meta .label { white-space: nowrap; }
  .svc-bar { width: 4.5rem; }
  .svc-stage { width: min(34svh, 60vw); }
  .services-copy .h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); max-width: none; margin-top: .6rem; }
  .svc-list { margin-top: 1.2rem; }
  .svc button { min-height: 3rem; padding: .6rem 0; }
  .svc-t { font-size: 1.25rem; }
  .svc p { font-size: .92rem; padding-left: 2.6rem; }

  .zunvo { grid-template-columns: 1fr; }
  .phone-scene { min-height: 580px; }


  .anatomy { height: auto; }
  .anatomy-pin { position: relative; height: auto; display: block; padding: clamp(5rem, 12vw, 9rem) 0; }
  .anatomy-grid { grid-template-columns: 1fr; }
  .stack-scene { height: 420px; margin-top: 1rem; }
  .stack { --gap: 46px; width: min(240px, 60vw); }
  .l-code pre { font-size: .6rem; }
  .ld-type { font-size: 3rem; }
}
@media (max-width: 640px) {
  .float-chip.c1 { right: -8%; }
  .float-chip.c2 { left: -10%; }
  .coverflow { height: 470px; }
  .contact-form { grid-template-columns: 1fr; }
  .form-foot .pill { width: 100%; justify-content: center; margin-left: 0; }
  .projects-head { flex-direction: column; align-items: flex-start; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero, .services { height: auto; }
  .hero-stage { position: relative; height: auto; min-height: 100svh; padding: 6rem 0 4rem; }
  .hero-statement { position: relative; inset: auto; margin-top: 3rem; }
  .hero-statement .w > span { opacity: 1; transform: none; }
  .services-stage { position: relative; height: auto; padding: 6rem 0; }
  .svc p { max-height: none; opacity: 1; padding-bottom: 1rem; }
  .svc button { opacity: 1; }
}
