/* ================= Tokens ================= */
:root {
  --bg: #0c0c0d;
  --tile: #161618;
  --tile-2: #1d1d20;
  --fg: #f2f1ec;
  --muted: #8e8d88;
  --ink: #111112;
  --paper: #f3f2ee;
  --lime: #f3f2ee; /* accent = paper, no colour */
  --orange: #ff5b1f;
  --line: rgba(242, 241, 236, .1);
  --r: clamp(18px, 2vw, 28px);
  --gap: clamp(8px, 1vw, 12px);
  --pad: clamp(12px, 2vw, 24px);
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-weight: 500; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.page { padding: 0 var(--pad); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.tile { position: relative; border-radius: var(--r); background: var(--tile); overflow: hidden; isolation: isolate; }
.tile.grain::after { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: .09; mix-blend-mode: overlay; pointer-events: none; z-index: 3; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 99px; font-size: 13px; font-weight: 600; background: rgba(242, 241, 236, .08); white-space: nowrap; }
.chip--light { background: rgba(255, 255, 255, .7); color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 99px; font-weight: 700; font-size: 15px; transition: transform .4s var(--ease), background .3s, color .3s; }
.btn:hover { transform: translateY(-2px); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--fg); }
.btn--ghost { background: rgba(17, 17, 18, .08); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--fg); }
.arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--fg); flex: none; transition: transform .5s var(--ease), background .3s, color .3s; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc6b; box-shadow: 0 0 0 0 rgba(61, 220, 107, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 107, 0); } }

.js [data-reveal] { opacity: 0; }
.curtain { position: fixed; inset: 0; z-index: 90; pointer-events: none; background: var(--bg); opacity: 0; }

/* ================= Nav ================= */
.nav { position: fixed; z-index: 50; top: 12px; left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; align-items: center; pointer-events: none; transition: transform .5s var(--ease); }
.nav.is-hidden { transform: translateY(-140%); }
.nav > * { pointer-events: auto; }
.nav__pill { display: flex; align-items: center; gap: 4px; height: 52px; padding: 6px; border-radius: 99px; background: rgba(22, 22, 24, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); }
.nav__logo { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 10px; font-family: var(--display); font-weight: 600; font-size: 14px; }
.logo-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--lime); position: relative; overflow: hidden; }
.logo-mark::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ink); animation: blink 4s var(--ease) infinite; }
@keyframes blink { 0%, 86%, 100% { transform: scaleY(1); } 90% { transform: scaleY(.1); } }
.nav__links a { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .3s, color .3s; }
.nav__links a:hover { background: rgba(242, 241, 236, .07); color: var(--fg); }
.lang { display: flex; padding: 3px; border-radius: 99px; background: rgba(242, 241, 236, .06); }
.lang button { height: 34px; padding: 0 12px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--muted); transition: background .3s, color .3s; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--ink); }
.nav .btn { height: 40px; padding: 0 18px; font-size: 14px; }
@media (max-width: 760px) { .nav__links, .nav .btn { display: none; } }

/* ================= Hero bento ================= */
.hero { padding-top: 76px; }
.hero .bento { grid-auto-rows: minmax(120px, auto); }
.h-main { grid-column: span 12; grid-row: span 2; min-height: min(78svh, 760px); padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(120% 90% at 100% 0%, #26262b, var(--tile) 60%); }
.h-title { font-family: var(--display); font-weight: 600; font-size: clamp(48px, 8.4vw, 150px); line-height: 1.1; letter-spacing: -.04em; margin: 0; text-transform: uppercase; }
.h-title .line { display: block; }
.h-title .line-in { display: block; will-change: transform, opacity; }
.h-title .line:nth-child(2) .line-in { color: #5e5d59; }
.h-main > .chip { align-self: flex-start; }
.h-bottom { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.h-lead { max-width: 42ch; color: #c9c8c2; font-size: clamp(15px, 1.2vw, 18px); margin: 0; }
.h-stat { grid-column: span 4; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; min-height: 200px; }
.h-stat--lime { background: var(--paper); color: var(--ink); }
.h-stat--paper { background: var(--tile); color: var(--fg); }
.h-stat b { font-family: var(--display); font-weight: 600; font-size: clamp(56px, 6vw, 96px); line-height: .9; letter-spacing: -.05em; }
.h-stat small { font-size: 15px; font-weight: 600; }
.h-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.h-tools .chip { background: rgba(242, 241, 236, .07); color: var(--fg); }

/* ================= Section heads ================= */
.sec { padding-top: clamp(80px, 12vh, 140px); }
.sec__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 32px); padding: 0 4px; }
.sec__title { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5.4vw, 88px); line-height: .95; letter-spacing: -.045em; margin: 0; text-transform: uppercase; }
.sec__sub { color: var(--muted); max-width: 34ch; margin: 0; }

/* ================= Work cards (v1 layout) ================= */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 88px) var(--gap); }
.work { display: block; }
.work:nth-child(even) { margin-top: clamp(0px, 9vw, 140px); }
.work__stage { position: relative; aspect-ratio: 1 / 1.02; display: grid; place-items: center; background: var(--tile); }
.work__stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 50% 62%, var(--c), transparent 72%); opacity: .16; transition: opacity .8s var(--ease); }
.work:hover .work__stage::before { opacity: .3; }
.fan { position: relative; height: 80%; aspect-ratio: .462; }
.fan > .device { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .9s var(--ease), opacity .9s var(--ease); }
.fan > .device.is-back { opacity: .5; }
.fan > .device.is-l { transform: translateX(-34%) scale(.84) rotate(-5deg); }
.fan > .device.is-r { transform: translateX(34%) scale(.84) rotate(5deg); }
.work:hover .fan > .device.is-l { transform: translateX(-56%) scale(.86) rotate(-8deg); opacity: .8; }
.work:hover .fan > .device.is-r { transform: translateX(56%) scale(.86) rotate(8deg); opacity: .8; }
.work:hover .fan > .device.is-front { transform: translateY(-2%) scale(1.02); }
.work__info { display: grid; grid-template-columns: auto 1fr auto; column-gap: 16px; align-items: baseline; padding: 18px 4px 16px; border-bottom: 1px solid var(--line); }
.work__num { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--muted); }
.work__name { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -.04em; line-height: 1.05; margin: 0; }
.work__meta { grid-column: 2; color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 8px; }
.work .arrow { grid-row: 1 / span 2; grid-column: 3; align-self: center; background: rgba(242, 241, 236, .08); }
.work:hover .arrow { transform: rotate(-45deg); background: var(--lime); color: var(--ink); }
/* ================= Device ================= */
.device { position: relative; aspect-ratio: var(--ar); overflow: hidden; background: #0b0b0b; }
.device--phone { border-radius: var(--rx) / var(--ry); box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 28px 60px -24px rgba(0,0,0,.55); }
.device--free { border-radius: calc(var(--r) - 8px); }
.device > img, .device > video, .device > .lot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.device > video, .device > .lot { opacity: 0; transition: opacity .5s; }
.device > video.is-ready, .device > .lot.is-ready { opacity: 1; }
.device > .lot svg { display: block; }

/* ================= About / services ================= */
.about { grid-column: span 6; grid-row: span 2; padding: clamp(24px, 3vw, 40px); background: var(--paper); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 420px; }
.about p { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.about .big { font-family: var(--display); font-weight: 600; font-size: clamp(64px, 7vw, 120px); line-height: .85; letter-spacing: -.06em; }
.about small { display: block; font-size: 15px; font-weight: 600; margin-top: 8px; color: #55544f; }
.svc { grid-column: span 2; padding: 18px; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.svc span { font-weight: 700; font-size: 15px; line-height: 1.25; }
.glyph { width: 56px; height: 56px; position: relative; }
.glyph i { position: absolute; display: block; }
/* 1 logo: square that spins and rounds */
.g1 i { inset: 12px; background: var(--fg); animation: g1 3.2s var(--ease) infinite; }
@keyframes g1 { 0% { transform: rotate(0); border-radius: 4px; } 50% { transform: rotate(180deg); border-radius: 50%; } 100% { transform: rotate(360deg); border-radius: 4px; } }
/* 2 UI: toggle */
.g2 i:first-child { left: 4px; right: 4px; top: 16px; height: 24px; border-radius: 99px; background: #2a2a2e; }
.g2 i:last-child { top: 19px; left: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg); animation: g2 2.4s var(--ease) infinite; }
@keyframes g2 { 0%, 20% { transform: translateX(0); } 50%, 70% { transform: translateX(24px); } 100% { transform: translateX(0); } }
/* 3 web: browser bars loading */
.g3 i { left: 6px; height: 6px; border-radius: 3px; background: #2a2a2e; transform-origin: left; animation: g3 2.6s var(--ease) infinite; }
.g3 i:nth-child(1) { top: 12px; width: 44px; background: var(--fg); }
.g3 i:nth-child(2) { top: 25px; width: 34px; animation-delay: .15s; }
.g3 i:nth-child(3) { top: 38px; width: 40px; animation-delay: .3s; }
@keyframes g3 { 0% { transform: scaleX(0); } 40%, 80% { transform: scaleX(1); } 100% { transform: scaleX(0); opacity: 0; } }
/* 4 character: bouncing blob with eyes */
.g4 i { left: 10px; bottom: 6px; width: 36px; height: 36px; border-radius: 50% 50% 46% 46%; background: var(--fg); animation: g4 1.6s var(--ease) infinite; }
.g4 i::before, .g4 i::after { content: ""; position: absolute; top: 13px; width: 5px; height: 7px; border-radius: 3px; background: var(--ink); }
.g4 i::before { left: 10px; } .g4 i::after { right: 10px; }
@keyframes g4 { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-12px) scale(.94, 1.06); } 60% { transform: translateY(0) scale(1.08, .92); } }
/* 5 lottie: morphing circle/square */
.g5 i { inset: 10px; border: 3px solid var(--fg); animation: g5 2.8s var(--ease) infinite; }
@keyframes g5 { 0%, 100% { border-radius: 50%; transform: scale(1); } 50% { border-radius: 10px; transform: scale(.8) rotate(45deg); } }
/* 6 promo: play pulse */
.g6 i { left: 18px; top: 14px; width: 0; height: 0; border-left: 24px solid var(--fg); border-top: 14px solid transparent; border-bottom: 14px solid transparent; animation: g6 1.8s var(--ease) infinite; }
@keyframes g6 { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }

/* ================= Contact ================= */
.contact { grid-column: span 12; padding: clamp(28px, 5vw, 72px); background: var(--paper); color: var(--ink); min-height: 480px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.contact h2 { font-family: var(--display); font-weight: 600; font-size: clamp(44px, 8vw, 140px); line-height: .9; letter-spacing: -.05em; margin: 0; text-transform: uppercase; }
.contact__row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.contact__note { max-width: 32ch; margin: 0; font-weight: 600; }
.contact__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 4px 32px; color: var(--muted); font-size: 14px; }
.footer a:hover { color: var(--fg); }

/* ================= Project page ================= */
.p-hero { margin-top: 76px; padding: clamp(28px, 6vh, 64px) 4px clamp(20px, 4vh, 40px); display: flex; flex-direction: column; gap: clamp(24px, 4vh, 48px); }

.p-top { display: flex; justify-content: space-between; align-items: center; }
.p-title { font-family: var(--display); font-weight: 600; font-size: clamp(64px, 13vw, 240px); line-height: .95; letter-spacing: -.06em; margin: 0; text-transform: uppercase; }
.p-title .ch { display: inline-block; }
.p-bottom { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.p-intro { max-width: 46ch; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.35; font-weight: 600; margin: 0; color: #c9c8c2; }
.group { padding-top: clamp(48px, 8vh, 96px); }
#project, body[data-page="project"] .footer { max-width: calc(1400px + 2 * var(--pad)); margin-inline: auto; }
.group__head { display: flex; align-items: baseline; gap: 14px; margin: 0 4px 16px; }
.group__title { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.6vw, 40px); letter-spacing: -.04em; margin: 0; text-transform: uppercase; }
.group__count { color: var(--muted); font-weight: 700; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 28px); }
.shots.is-square { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shots.is-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.shot .device { width: 100%; }
.shot .device--phone { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 30px 70px -30px rgba(0,0,0,.8); }
.shot figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); padding: 0 4px; }
.shot figcaption b { color: var(--fg); font-weight: 700; }
.row-panel { background: var(--paper); padding: clamp(28px, 5vw, 64px) clamp(16px, 3vw, 48px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.row-panel figure { margin: 0; text-align: center; }
.row-panel .device { background: transparent; box-shadow: none; border-radius: 0; max-width: 150px; margin: 0 auto 12px; }
.row-panel figcaption { color: #6b6a66; font-size: 14px; font-weight: 600; }
.next { display: flex; margin-top: clamp(48px, 8vh, 96px); padding: clamp(24px, 4vw, 48px); min-height: 300px; flex-direction: column; justify-content: space-between; color: var(--fg); background: var(--tile); }
.next__row { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.next__name { font-family: var(--display); font-weight: 600; font-size: clamp(48px, 10vw, 180px); line-height: .85; letter-spacing: -.06em; text-transform: uppercase; transition: transform .7s var(--ease); }
.next:hover .next__name { transform: translateX(12px); }
.next:hover .arrow { transform: rotate(-45deg); }

/* ================= Responsive ================= */
@media (max-width: 1000px) {
  .h-main { grid-column: span 12; }
  .h-main { min-height: 0; gap: 48px; }
  .h-stat { grid-column: span 6; }
  .h-stat:last-child { grid-column: span 12; }
  .works { grid-template-columns: 1fr; }
  .work:nth-child(even) { margin-top: 0; }
  .about { grid-column: span 12; }
  .svc { grid-column: span 4; }
}
@media (max-width: 1000px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shots.is-square { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots.is-wide { grid-template-columns: 1fr; }
  .h-title { font-size: 10.6vw; }
  .sec__title { font-size: 9vw; }
  .p-title { font-size: 15vw; }
  .contact h2 { font-size: 10vw; }
  .h-stat { grid-column: span 12; }
  .svc { grid-column: span 6; min-height: 160px; }
  .row-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
