/* AImagination Lab — retrofuturist studio portfolio */

:root {
  --navy: #061a3a;
  --navy-deep: #031126;
  --blue: #0a3474;
  --cobalt: #0855c7;
  --orange: #f26a2d;
  --orange-deep: #c74620;
  --peach: #ffb257;
  --paper: #edddbd;
  --paper-pale: #f4e9d2;
  --olive: #777642;
  --ink: #f4e7cf;
  --ink-soft: rgba(244, 231, 207, 0.72);
  --ink-faint: rgba(244, 231, 207, 0.46);
  --border: rgba(244, 231, 207, 0.18);
  --accent: var(--orange);
  --accent-dark: var(--peach);
  --accent-soft: rgba(242, 106, 45, 0.15);
  --accent-ink: var(--navy-deep);
  --card: rgba(255, 255, 255, 0.055);
  --bg: var(--navy);
  --bg-alt: var(--navy-deep);
  --max-w: 1260px;
  --header-h: 76px;
  --scene: 0;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--navy-deep);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--navy);
  color: var(--ink);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 14% 23%, rgba(255, 255, 255, 0.18) 0 0.55px, transparent 0.8px),
    radial-gradient(circle at 71% 68%, rgba(0, 0, 0, 0.26) 0 0.7px, transparent 0.95px),
    radial-gradient(circle at 47% 84%, rgba(255, 178, 87, 0.16) 0 0.45px, transparent 0.8px);
  background-size: 5px 7px, 7px 5px, 11px 9px;
  mix-blend-mode: soft-light;
}

main {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 0.5em;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

p {
  margin-bottom: 1em;
  color: var(--ink-soft);
}

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

a {
  color: inherit;
}

.container {
  width: min(100%, var(--max-w));
  margin-inline: auto;
  padding-inline: clamp(22px, 4vw, 56px);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(244, 231, 207, 0.12);
  background: linear-gradient(180deg, rgba(3, 17, 38, 0.88), rgba(3, 17, 38, 0.5));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-decoration: none;
}

.brand i {
  color: var(--orange);
  font-style: normal;
}

.brand-mark {
  position: relative;
  width: 25px;
  height: 25px;
  margin-right: 4px;
  border: 1px solid rgba(244, 231, 207, 0.7);
  border-radius: 50%;
  flex: none;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.brand-mark::before {
  inset: 5px;
  background: var(--orange);
}

.brand-mark::after {
  width: 6px;
  height: 6px;
  top: -2px;
  right: 0;
  background: var(--peach);
  box-shadow: -19px 18px 0 var(--cobalt);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links a,
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--peach);
}

.header-actions {
  display: flex;
  align-items: center;
}

.lang-switcher {
  position: relative;
}

.lang-switcher summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 60px;
  padding: 8px 10px;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.lang-switcher summary::-webkit-details-marker {
  display: none;
}

.lang-switcher summary svg {
  width: 14px;
  height: 14px;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 156px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(3, 17, 38, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.lang-menu a {
  display: block;
  padding: 9px 11px;
  color: var(--ink-soft);
  border-radius: 2px;
  font-size: 13px;
  text-decoration: none;
}

.lang-menu a:hover,
.lang-menu a[aria-current="true"] {
  color: var(--navy-deep);
  background: var(--peach);
}

/* Hero: the page itself is the timeline. The canvas particles move from an
   open field into the supplied risograph landscape as the visitor scrolls. */
.hero {
  position: relative;
  height: 190svh;
  background:
    radial-gradient(circle at 76% 48%, rgba(242, 106, 45, 0.16), transparent 28%),
    linear-gradient(135deg, var(--navy-deep), var(--navy) 58%, #0a2a59);
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
}

.hero-stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: clamp(360px, 42vw, 690px);
  aspect-ratio: 1;
  right: -7vw;
  top: 5vh;
  border: 1px solid rgba(255, 178, 87, 0.28);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(8, 85, 199, 0.04),
    0 0 0 86px rgba(242, 106, 45, 0.025);
}

.hero-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 8vh;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent 3%, rgba(244, 231, 207, 0.18) 3% 97%, transparent 97%);
}

.particle-canvas,
.particle-fallback,
.hero-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle-canvas {
  z-index: 1;
}

.particle-fallback {
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 54%;
  opacity: 0.62;
  filter: saturate(0.92) contrast(1.04);
}

html.js .particle-fallback {
  opacity: clamp(0.12, calc(0.12 + var(--scene) * 0.58), 0.7);
}

.hero-noise {
  z-index: 2;
  opacity: 0.55;
  background:
    linear-gradient(90deg, rgba(3, 17, 38, 0.98) 0%, rgba(3, 17, 38, 0.78) 36%, transparent 68%),
    linear-gradient(180deg, rgba(3, 17, 38, 0.72), transparent 30% 74%, rgba(3, 17, 38, 0.66));
}

.hero-layout {
  position: relative;
  z-index: 4;
  display: grid;
  align-items: center;
  height: 100%;
}

.hero-copy {
  width: min(700px, 62vw);
  padding-top: var(--header-h);
  transform: translate3d(0, calc(var(--scene) * -8vh), 0);
  opacity: clamp(0.08, calc(1 - var(--scene) * 1.55), 1);
  will-change: opacity, transform;
}

.eyebrow,
.section-index,
.projects-head,
.project-index {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(26px, 5vh, 54px);
  color: var(--peach);
}

.eyebrow > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--navy-deep);
  background: var(--orange);
  border-radius: 50%;
}

.hero h1 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(56px, 9.3vw, 144px);
  line-height: 0.78;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.hero h1 span,
.hero h1 em {
  display: block;
}

.hero h1 em {
  margin-left: clamp(22px, 5vw, 74px);
  color: var(--orange);
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.hero .lede {
  max-width: 51ch;
  margin: clamp(30px, 5vh, 58px) 0 28px;
  padding-left: clamp(22px, 5vw, 74px);
  color: rgba(244, 231, 207, 0.76);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  padding-left: clamp(22px, 5vw, 74px);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn-primary {
  color: var(--navy-deep);
  background: var(--orange);
}

.btn-primary:hover {
  background: var(--peach);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(3, 17, 38, 0.24);
}

.btn-ghost:hover {
  border-color: var(--peach);
  color: var(--peach);
}

.btn-lg {
  min-height: 54px;
  padding-inline: 26px;
}

.hero-count {
  margin: 22px 0 0;
  padding-left: clamp(22px, 5vw, 74px);
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-count b {
  color: var(--peach);
  font-size: 16px;
}

.hero-coordinate {
  position: absolute;
  top: calc(var(--header-h) + 26px);
  right: clamp(22px, 4vw, 56px);
  display: flex;
  gap: 18px;
  color: rgba(244, 231, 207, 0.35);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
}

.scroll-cue {
  position: absolute;
  z-index: 5;
  right: clamp(22px, 4vw, 56px);
  bottom: 29px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: clamp(0, calc(1 - var(--scene) * 3), 1);
}

.scroll-cue i {
  position: relative;
  width: 48px;
  height: 1px;
  overflow: hidden;
  background: rgba(244, 231, 207, 0.22);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--orange);
  transform: translateX(-100%);
  animation: scan-line 2s ease-in-out infinite;
}

.hero-reveal {
  position: absolute;
  z-index: 5;
  left: clamp(22px, 5vw, 74px);
  bottom: 13vh;
  max-width: 12ch;
  margin: 0;
  color: var(--paper-pale);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(38px, 5.4vw, 80px);
  font-style: italic;
  line-height: 0.94;
  letter-spacing: -0.04em;
  opacity: clamp(0, calc((var(--scene) - 0.62) * 3.2), 1);
  transform: translateY(calc((1 - var(--scene)) * 35px));
}

@keyframes scan-line {
  0%, 15% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

/* Projects */
.projects {
  position: relative;
  z-index: 5;
  background: var(--paper);
}

.projects-head {
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(6, 26, 58, 0.65);
}

.app-banner {
  --section-bg: var(--paper-pale);
  --section-ink: var(--navy);
  --section-soft: rgba(6, 26, 58, 0.68);
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(110px, 14vh, 170px) 0;
  color: var(--section-ink);
  background: var(--section-bg);
  border-top: 1px solid rgba(6, 26, 58, 0.14);
  overflow: hidden;
}

.app-banner::before {
  content: attr(data-project);
  position: absolute;
  right: -0.03em;
  bottom: -0.19em;
  color: color-mix(in srgb, var(--app-accent) 10%, transparent);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: min(45vw, 680px);
  font-style: italic;
  line-height: 1;
  pointer-events: none;
}

.app-banner.is-alt {
  --section-bg: var(--orange);
  --section-ink: var(--navy-deep);
  --section-soft: rgba(3, 17, 38, 0.72);
  --app-accent: var(--navy) !important;
}

.app-banner .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(44px, 7vw, 100px);
  align-items: center;
}

.app-banner-body {
  position: relative;
  z-index: 3;
}

.project-index {
  display: block;
  margin-bottom: clamp(34px, 7vh, 74px);
  color: color-mix(in srgb, var(--section-ink) 46%, transparent);
}

.app-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 25px;
}

.app-eyebrow img,
.app-dot {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  flex: none;
}

.app-dot {
  display: inline-block;
  background: var(--navy);
  box-shadow: inset 0 0 0 9px var(--peach);
}

.app-name {
  color: var(--section-ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.app-pill {
  margin-left: 4px;
  padding: 5px 9px;
  color: var(--section-ink);
  border: 1px solid color-mix(in srgb, var(--section-ink) 28%, transparent);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-banner h1,
.app-banner h2 {
  max-width: 11ch;
  margin-bottom: 28px;
  color: var(--section-ink);
  font-size: clamp(42px, 5.7vw, 82px);
  line-height: 0.97;
}

.app-banner .lede {
  max-width: 48ch;
  color: var(--section-soft);
  font-size: clamp(16px, 1.45vw, 19px);
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 34px;
  padding: 0;
  list-style: none;
}

.app-meta li {
  padding: 6px 11px;
  color: var(--section-soft);
  border: 1px solid color-mix(in srgb, var(--section-ink) 22%, transparent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-cta {
  color: var(--paper-pale);
  background: var(--app-accent);
}

.is-alt .app-cta {
  color: var(--paper-pale);
  background: var(--navy-deep);
}

.app-cta:hover {
  color: var(--navy-deep);
  background: var(--peach);
}

.app-cta::after {
  content: "";
  position: absolute;
  inset: -24px;
}

.app-art {
  position: relative;
  z-index: 2;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-banner:hover .app-art {
  transform: rotate(-1deg) scale(1.018);
}

.art-stack {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 22px 26px 0 color-mix(in srgb, var(--app-accent) 42%, transparent);
  transform: rotate(1.4deg);
}

.art-stack::after,
.art-mosaic::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-radial-gradient(circle at 30% 20%, rgba(3, 17, 38, 0.24) 0 0.8px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: 0.36;
}

.art-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: art-crossfade 25s infinite;
}

.art-stack img:nth-child(1) { animation-delay: 0s; }
.art-stack img:nth-child(2) { animation-delay: 5s; }
.art-stack img:nth-child(3) { animation-delay: 10s; }
.art-stack img:nth-child(4) { animation-delay: 15s; }
.art-stack img:nth-child(5) { animation-delay: 20s; }

@keyframes art-crossfade {
  0%, 16% { opacity: 1; }
  20%, 96% { opacity: 0; }
  100% { opacity: 1; }
}

.art-caption,
.art-zoom {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 12px 15px;
  color: var(--paper-pale);
  background: rgba(3, 17, 38, 0.78);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 14px;
  font-style: italic;
  backdrop-filter: blur(8px);
}

.art-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-mosaic {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  aspect-ratio: 1;
  padding: 5px;
  background: var(--navy-deep);
  box-shadow: -22px 26px 0 rgba(6, 26, 58, 0.27);
  transform: rotate(-1.3deg);
}

.art-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  animation: tile-paint 9s infinite;
}

.art-mosaic img:nth-child(1) { animation-delay: 0s; }
.art-mosaic img:nth-child(2) { animation-delay: 0.5s; }
.art-mosaic img:nth-child(3) { animation-delay: 1.4s; }
.art-mosaic img:nth-child(4) { animation-delay: 0.9s; }
.art-mosaic img:nth-child(5) { animation-delay: 2.1s; }
.art-mosaic img:nth-child(6) { animation-delay: 1.7s; }
.art-mosaic img:nth-child(7) { animation-delay: 2.6s; }
.art-mosaic img:nth-child(8) { animation-delay: 1.1s; }
.art-mosaic img:nth-child(9) { animation-delay: 3s; }

@keyframes tile-paint {
  0%, 100% { opacity: 0.2; filter: saturate(0.25) blur(5px); transform: scale(0.93); }
  13%, 76% { opacity: 1; filter: none; transform: none; }
}

.art-zoom {
  left: auto;
  right: 14px;
  width: max-content;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.art-zoom svg {
  width: 14px;
  height: 14px;
}

.app-banner.is-flipped .app-banner-body {
  order: 2;
}

.app-banner.is-flipped .app-art {
  order: 1;
}

/* Open experiments */
.experiments-section {
  position: relative;
  z-index: 5;
  padding: clamp(120px, 17vh, 210px) 0;
  color: var(--navy);
  background:
    radial-gradient(circle at 92% 18%, rgba(242, 106, 45, 0.14), transparent 24%),
    var(--paper);
  overflow: hidden;
}

.experiments-section::before {
  content: "EXPERIMENTS";
  position: absolute;
  top: 0.12em;
  right: -0.04em;
  color: rgba(6, 26, 58, 0.045);
  font-size: clamp(74px, 15vw, 230px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
  pointer-events: none;
}

.experiments-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.35fr 1fr;
  gap: clamp(28px, 7vw, 110px);
  align-items: start;
  margin-bottom: clamp(70px, 11vh, 125px);
}

.experiments-head .section-index {
  grid-row: auto;
  color: var(--orange-deep);
}

.experiments-head h2 {
  max-width: 10ch;
  margin: 0;
  color: var(--navy);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(58px, 8.5vw, 122px);
  font-style: italic;
  font-weight: 400;
  line-height: 0.86;
}

.experiments-head p {
  max-width: 58ch;
  margin: 32px 0 0;
  color: rgba(6, 26, 58, 0.68);
  font-size: clamp(16px, 1.65vw, 20px);
}

.experiment-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 4vw, 54px);
  color: var(--paper-pale);
  background: var(--navy-deep);
  border: 1px solid rgba(6, 26, 58, 0.16);
  box-shadow: 24px 28px 0 rgba(242, 106, 45, 0.22);
}

.experiment-card::after {
  content: "01";
  position: absolute;
  right: 0.03em;
  bottom: -0.23em;
  color: rgba(8, 85, 199, 0.12);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(170px, 25vw, 360px);
  font-style: italic;
  line-height: 1;
  pointer-events: none;
}

.experiment-copy {
  position: relative;
  z-index: 2;
}

.experiment-tag {
  display: block;
  margin-bottom: 34px;
  color: var(--peach);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.experiment-copy h3 {
  max-width: 11ch;
  margin-bottom: 25px;
  color: var(--paper-pale);
  font-size: clamp(40px, 5vw, 70px);
  line-height: 0.96;
}

.experiment-copy > p {
  max-width: 45ch;
  color: rgba(244, 231, 207, 0.7);
  font-size: 15px;
}

.experiment-copy > .experiment-model {
  margin-top: 24px;
  padding-top: 24px;
  color: rgba(244, 231, 207, 0.82);
  border-top: 1px solid rgba(244, 231, 207, 0.18);
  font-size: 13px;
}

.experiment-cta {
  margin-top: 34px;
  color: var(--navy-deep);
  background: var(--orange);
}

.experiment-cta:hover {
  background: var(--peach);
}

.concept-demo {
  position: relative;
  z-index: 2;
  min-width: 0;
  transform: rotate(0.8deg);
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.experiment-card:hover .concept-demo {
  transform: rotate(0deg) translateY(-5px);
}

.experiment-card-vivo {
  margin-top: clamp(86px, 12vh, 140px);
  background:
    radial-gradient(circle at 75% 20%, rgba(8, 85, 199, 0.34), transparent 30%),
    var(--navy-deep);
  box-shadow: -24px 28px 0 rgba(8, 85, 199, 0.22);
}

.experiment-card-vivo::after {
  content: "02";
  color: rgba(242, 106, 45, 0.11);
}

.vivo-demo {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(155px, 0.62fr) minmax(230px, 1fr);
  gap: clamp(18px, 2.5vw, 32px);
  align-items: end;
  min-width: 0;
}

.vivo-steps {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.vivo-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 10px;
  background: rgba(244, 231, 207, 0.07);
  border: 1px solid rgba(244, 231, 207, 0.14);
}

.vivo-phone-shot {
  position: relative;
  aspect-ratio: 480 / 833;
  overflow: hidden;
  background: #061a3a;
  border: 2px solid rgba(244, 231, 207, 0.62);
  border-radius: 12px;
  box-shadow: 4px 5px 0 rgba(242, 106, 45, 0.3);
}

.vivo-phone-shot::before,
.vivo-video-shell::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 5px;
  left: 50%;
  width: 24%;
  height: 6px;
  border-radius: 999px;
  background: rgba(3, 10, 20, 0.82);
  transform: translateX(-50%);
  pointer-events: none;
}

.vivo-phone-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vivo-step figcaption {
  display: grid;
  min-width: 0;
}

.vivo-step figcaption b {
  color: var(--orange);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.vivo-step figcaption strong {
  margin-top: 3px;
  color: var(--paper-pale);
  font-size: 12px;
  line-height: 1.15;
}

.vivo-step figcaption span {
  margin-top: 5px;
  color: rgba(244, 231, 207, 0.56);
  font-size: 9px;
  line-height: 1.35;
}

.vivo-video-figure {
  position: relative;
  margin: 0;
}

.vivo-video-label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--paper-pale);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.vivo-video-label span {
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(242, 106, 45, 0.18);
}

.vivo-video-shell {
  position: relative;
  width: min(100%, 310px);
  margin-inline: auto;
  padding: 7px;
  background: #040b16;
  border: 1px solid rgba(244, 231, 207, 0.38);
  border-radius: 28px;
  box-shadow: 14px 18px 0 rgba(242, 106, 45, 0.2), 0 24px 60px rgba(0, 0, 0, 0.38);
}

.vivo-video-shell::before {
  top: 13px;
  height: 8px;
}

.vivo-video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 720 / 1250;
  object-fit: cover;
  background: #061a3a;
  border-radius: 21px;
}

.demo-window {
  padding: 3px;
  color: #101010;
  background: #bdbdbd;
  border-top: 3px solid #f5f5f5;
  border-left: 3px solid #f5f5f5;
  border-right: 3px solid #353535;
  border-bottom: 3px solid #353535;
  box-shadow: 18px 20px 0 rgba(8, 85, 199, 0.22), 0 28px 70px rgba(0, 0, 0, 0.36);
  font-family: Arial, Helvetica, sans-serif;
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 4px 6px;
  color: #fff;
  background: linear-gradient(90deg, #001b7a, #0b81b5);
  font-size: 12px;
}

.demo-titlebar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-controls {
  margin-left: auto;
  padding: 2px 4px;
  color: #111;
  background: #c7c7c7;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #333;
  border-bottom: 1px solid #333;
  font-weight: 700;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.mini-folder {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 12px;
  border: 1px solid #151515;
  background: #ffd54a;
  flex: none;
}

.mini-folder::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 3px;
  top: -4px;
  left: 1px;
  border: 1px solid #151515;
  border-bottom: 0;
  background: #ffd54a;
}

.demo-toolbar {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 5px;
  align-items: center;
  padding: 6px;
  border-bottom: 2px solid #6c6c6c;
  font-size: 10px;
}

.demo-toolbar > span {
  padding: 3px 7px;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #555;
  border-bottom: 1px solid #555;
  white-space: nowrap;
}

.demo-toolbar code {
  min-width: 0;
  padding: 4px 7px;
  overflow: hidden;
  color: #202020;
  background: #fff;
  border: 1px inset #d5d5d5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #008b8b;
}

.demo-screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: experiment-pan 14s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.demo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 17, 38, 0.78) 100%);
  pointer-events: none;
}

.concept-trail {
  position: absolute;
  right: 16px;
  bottom: 17px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 12px;
  overflow: hidden;
  color: #fff;
  background: rgba(3, 17, 38, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: "Space Grotesk", sans-serif;
  font-size: 10px;
  backdrop-filter: blur(7px);
}

.concept-trail > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  opacity: 0.28;
  white-space: nowrap;
  animation: concept-open 8s ease-in-out infinite;
  animation-delay: calc(var(--trail-index) * 1.3s);
}

.concept-trail .mini-folder {
  width: 12px;
  height: 8px;
  border-color: #fff;
}

.concept-trail .mini-folder::before {
  width: 5px;
  height: 2px;
  top: -3px;
  border-color: #fff;
}

.concept-trail > b {
  color: var(--peach);
}

.demo-cursor {
  position: absolute;
  top: 37%;
  left: 52%;
  width: 18px;
  height: 25px;
  background: #fff;
  clip-path: polygon(0 0, 100% 67%, 61% 70%, 79% 100%, 64% 100%, 47% 72%, 20% 100%);
  filter: drop-shadow(1px 1px 0 #000) drop-shadow(-1px -1px 0 #000);
  animation: demo-cursor 8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.demo-cursor i {
  position: absolute;
  width: 26px;
  height: 26px;
  left: -9px;
  top: -9px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  opacity: 0;
  animation: double-click-ring 8s ease-out infinite;
}

.demo-cursor i:last-child {
  animation-delay: 0.16s;
}

.demo-hint {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
  padding: 7px 10px;
  color: #151515;
  background: #fff4c6;
  border: 1px solid #111;
  box-shadow: 3px 3px 0 #111;
  font-family: "Space Grotesk", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes experiment-pan {
  0% { transform: scale(1.03) translate3d(0, 0, 0); }
  50% { transform: scale(1.09) translate3d(-1.5%, -1%, 0); }
  100% { transform: scale(1.13) translate3d(2%, 1.5%, 0); }
}

@keyframes concept-open {
  0%, 9% { opacity: 0.22; transform: translateY(4px); }
  18%, 65% { opacity: 1; transform: none; }
  80%, 100% { opacity: 0.22; transform: none; }
}

@keyframes demo-cursor {
  0%, 12% { transform: translate3d(-120px, 90px, 0); }
  32%, 50% { transform: translate3d(0, 0, 0); }
  68%, 100% { transform: translate3d(125px, -42px, 0); }
}

@keyframes double-click-ring {
  0%, 34% { opacity: 0; transform: scale(0.35); }
  38% { opacity: 1; }
  46%, 100% { opacity: 0; transform: scale(1.25); }
}

/* Manifesto */
.section {
  position: relative;
  z-index: 4;
  padding: clamp(120px, 18vh, 220px) 0;
  background:
    radial-gradient(circle at 82% 32%, rgba(8, 85, 199, 0.2), transparent 24%),
    var(--navy-deep);
}

.section-alt {
  background: var(--paper);
}

.section-head {
  display: grid;
  grid-template-columns: 0.35fr 1fr;
  column-gap: clamp(28px, 7vw, 110px);
  align-items: start;
  max-width: 1100px;
  margin-bottom: clamp(70px, 11vh, 130px);
}

.section-index {
  grid-row: span 2;
  padding-top: 13px;
  color: var(--orange);
}

.section-head h2 {
  max-width: 12ch;
  margin: 0;
  color: var(--paper-pale);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(58px, 8.5vw, 126px);
  font-style: italic;
  font-weight: 400;
  line-height: 0.86;
}

.section-head p {
  max-width: 56ch;
  margin: 34px 0 0;
  font-size: clamp(16px, 1.65vw, 20px);
}

.section-head.center {
  display: block;
  margin-inline: auto;
  text-align: center;
}

.section-head.center h2,
.section-head.center p {
  margin-inline: auto;
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--border);
}

.principle {
  min-height: 300px;
  padding: 28px clamp(18px, 2.3vw, 34px) 34px;
  border-right: 1px solid var(--border);
}

.principle:first-child {
  border-left: 1px solid var(--border);
}

.principle-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 74px;
  color: var(--navy-deep);
  background: var(--orange);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.principle h3 {
  margin-bottom: 16px;
  color: var(--paper-pale);
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.principle p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.section-alt .principles {
  border-color: rgba(6, 26, 58, 0.18);
}

.section-alt .principle {
  border-color: rgba(6, 26, 58, 0.18);
}

.section-alt .principle h3,
.section-alt .section-head h2 {
  color: var(--navy);
}

.section-alt .principle p,
.section-alt .section-head p {
  color: rgba(6, 26, 58, 0.68);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 4;
  padding: 62px 0 calc(42px + env(safe-area-inset-bottom));
  color: var(--ink-faint);
  background: var(--navy-deep);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.footer-top,
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}

.footer-top {
  margin-bottom: 50px;
}

.footer-brand {
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-bottom {
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Accessibility and progressive enhancement */
[id] {
  scroll-margin-top: var(--header-h);
}

.skip-link {
  position: fixed;
  top: 0;
  left: -9999px;
  z-index: 200;
  padding: 12px 18px;
  color: var(--navy-deep);
  background: var(--peach);
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--peach);
  outline-offset: 4px;
}

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 750ms ease, transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .app-banner .container {
    grid-template-columns: 1fr 1fr;
    gap: 38px;
  }

  .principles {
    grid-template-columns: repeat(2, 1fr);
  }

  .experiment-card {
    grid-template-columns: 1fr;
  }

  .experiment-copy h3 {
    max-width: 13ch;
  }

  .vivo-demo {
    grid-template-columns: minmax(190px, 0.65fr) minmax(250px, 1fr);
    max-width: 760px;
    margin-inline: auto;
  }

  .principle:nth-child(2) {
    border-right: 1px solid var(--border);
  }

  .principle:nth-child(3),
  .principle:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .principle:nth-child(3) {
    border-left: 1px solid var(--border);
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 66px;
  }

  .nav-links {
    display: none;
  }

  .brand {
    letter-spacing: 0.1em;
  }

  .hero {
    height: 165svh;
  }

  .hero-stage {
    min-height: 620px;
  }

  .hero-stage::before {
    width: 82vw;
    right: -26vw;
    top: 12vh;
  }

  .particle-fallback {
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: 62% center;
    opacity: 0.48;
  }

  .hero-noise {
    background:
      linear-gradient(90deg, rgba(3, 17, 38, 0.96), rgba(3, 17, 38, 0.62) 70%, transparent),
      linear-gradient(180deg, rgba(3, 17, 38, 0.52), transparent 48%, rgba(3, 17, 38, 0.8));
  }

  .hero-copy {
    width: 100%;
    align-self: center;
  }

  .hero h1 {
    font-size: clamp(54px, 18vw, 92px);
  }

  .hero .lede {
    max-width: 38ch;
    font-size: 15px;
  }

  .hero-coordinate {
    display: none;
  }

  .scroll-cue span {
    display: none;
  }

  .hero-reveal {
    bottom: 15vh;
    max-width: 9.5ch;
    font-size: clamp(43px, 13vw, 68px);
  }

  .projects-head {
    height: 86px;
  }

  .app-banner {
    min-height: auto;
    padding: 110px 0 120px;
  }

  .app-banner .container {
    grid-template-columns: 1fr;
    gap: 68px;
  }

  .app-banner.is-flipped .app-banner-body,
  .app-banner.is-flipped .app-art {
    order: initial;
  }

  .app-banner h1,
  .app-banner h2 {
    max-width: 13ch;
    font-size: clamp(42px, 13.5vw, 68px);
  }

  .app-art {
    width: min(100%, 580px);
    margin-inline: auto;
  }

  .art-stack {
    aspect-ratio: 4 / 4.65;
    box-shadow: 12px 15px 0 color-mix(in srgb, var(--app-accent) 42%, transparent);
  }

  .art-mosaic {
    box-shadow: -12px 15px 0 rgba(6, 26, 58, 0.27);
  }

  .section-head {
    display: block;
  }

  .experiments-head {
    display: block;
  }

  .experiments-head .section-index {
    display: block;
    margin-bottom: 46px;
  }

  .experiments-head h2 {
    font-size: clamp(58px, 17vw, 92px);
  }

  .experiment-card {
    padding: 28px 22px 38px;
    box-shadow: 12px 15px 0 rgba(242, 106, 45, 0.22);
  }

  .concept-demo {
    margin-top: 26px;
  }

  .vivo-demo {
    margin-top: 30px;
  }

  .section-index {
    display: block;
    margin-bottom: 46px;
  }

  .section-head h2 {
    font-size: clamp(58px, 17vw, 92px);
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .principle,
  .principle:first-child,
  .principle:nth-child(3) {
    min-height: 0;
    border: 0;
    border-top: 1px solid var(--border);
    padding: 28px 0 36px;
  }

  .principle-num {
    margin-bottom: 46px;
  }
}

@media (max-width: 480px) {
  .brand span:first-of-type {
    display: none;
  }

  .brand i {
    display: none;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero .lede,
  .hero-actions,
  .hero-count {
    padding-left: 14px;
  }

  .footer-bottom .lang-switcher {
    display: none;
  }

  .demo-toolbar {
    grid-template-columns: auto auto 1fr;
  }

  .demo-toolbar > span:nth-child(3) {
    display: none;
  }

  .concept-trail {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 4px;
    padding: 8px;
  }

  .concept-trail > span:nth-of-type(n + 4),
  .concept-trail > b:nth-of-type(n + 3) {
    display: none;
  }

  .demo-hint {
    display: none;
  }

  .vivo-demo {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .vivo-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }

  .vivo-step {
    display: block;
    padding: 6px;
  }

  .vivo-phone-shot {
    width: 100%;
  }

  .vivo-step figcaption {
    padding: 9px 3px 3px;
  }

  .vivo-step figcaption span {
    display: none;
  }

  .vivo-video-shell {
    width: min(90%, 310px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-delay: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .particle-canvas {
    display: none;
  }

  html.js .particle-fallback {
    opacity: 0.48;
  }

  .hero-copy,
  .hero-reveal {
    transform: none;
  }

  .hero-copy {
    opacity: 1;
  }

  .hero-reveal {
    display: none;
  }

  .art-stack img:first-child,
  .art-mosaic img {
    opacity: 1;
  }
}
