/* ---------- Cubicle brand fonts (hosted by Framer) ---------- */
@font-face { font-family: "PP Right Grotesk"; font-weight: 500; font-display: swap; src: url(https://framerusercontent.com/assets/2U88UW5HhR6M2A12LG6GPpDMMQI.woff2) format("woff2"); }
@font-face { font-family: "PP Mori"; font-weight: 400; font-display: swap; src: url(https://framerusercontent.com/assets/AE9QGl3EikgcPbta4IZVlvWEZZo.woff2) format("woff2"); }
@font-face { font-family: "PP NeueBit"; font-weight: 700; font-display: swap; src: url(https://framerusercontent.com/assets/LhlnRGZ9aD8mHk26ghaljbgKEcs.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #000000;
  --ink: #ffffff;
  --soft: #d4d4d4;          /* body copy on black, as on the original site */
  --muted: #7c7c7c;
  --line: #222222;
  --tile: #111111;
  --btn-dark: #171717;
  --accent: #e2f86b;        /* Cubicle lime */
  --accent-2: #edff66;
  --on-accent: #000000;
  --text: "PP Mori", "Helvetica Neue", Arial, sans-serif;
  --display: "PP Right Grotesk", "Helvetica Neue", Arial, sans-serif;
  --pixel: "PP NeueBit", "Courier New", monospace;
  --side: 32px;
  --gap: 12px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* smooth scrolling is handled by Lenis (motion.js); native smooth-scroll would fight it */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/21px var(--text); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ul { margin: 0; padding: 0; list-style: none; font-weight: inherit; }

/* Pixel font for small UI labels */
.pixel, .nav, .pill, .up, .section-label, .label, .table th, .panel__close, .panel__meta {
  font-family: var(--pixel); font-weight: 700; font-size: 16px; line-height: 19px; letter-spacing: .02em; text-transform: uppercase;
}
.lime { color: var(--accent-2); }

/* SVG assets as masks so they take the current text colour */
.mask { display: inline-block; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.mask--wordmark { --src: url(assets/cubicle-wordmark.svg); width: 120px; height: 14px; }
.mask--aviator  { --src: url(assets/aviator-mark.svg); width: 76px; height: 68px; }
.mask--ortak    { --src: url(assets/award-ortak.svg); width: 184px; height: 81px; }
.mask--egr      { --src: url(assets/award-egr.svg); width: 160px; height: 89px; }

/* Letter roll on hover (split by main.js) */
.roll { display: inline-flex; white-space: pre; }
.roll .ch { display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden; vertical-align: top; }
.roll .ch > span { display: block; transition: transform .45s var(--ease); transition-delay: calc(var(--i) * 14ms); }
.roll:hover .ch > span { transform: translateY(-100%); }

.pill { display: inline-flex; align-items: center; background: var(--ink); color: var(--bg); padding: 4px 8px; border-radius: 4px; transition: background .2s, color .2s; }
.pill:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- Nav (holographik) ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap);
  align-items: center; padding: 14px 16px;
  color: #fff;
  background: linear-gradient(to bottom, rgba(0,0,0,.75), rgba(0,0,0,0));
}
.nav__logo { grid-column: 1 / 3; display: flex; }
.nav__links { grid-column: 4 / 7; display: flex; gap: 12px; }
.nav__right { grid-column: 9 / 13; display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.nav .pill { background: #fff; color: #000; }

/* ---------- Hero (original Cubicle) ---------- */
.hero { position: relative; min-height: 100svh; padding: 120px var(--side) 54px; display: flex; flex-direction: column; justify-content: flex-end; }
/* hero 3D logo: still image shows until the video is actually playing */
.hero__media { position: absolute; left: var(--side); top: 16%; width: clamp(260px, 22.1vw, 429px); aspect-ratio: 888 / 500; }
.hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero__video { opacity: 0; transition: opacity .6s ease; }
.hero__media.is-playing .hero__video { opacity: 1; }
.hero__partner { display: flex; justify-content: flex-end; margin-bottom: 16px; color: #fff; }
.hero__row { display: flex; justify-content: space-between; gap: 40px; }
.hero__row--labels { margin-bottom: 30px; }
.hero__title { font: 500 clamp(40px, 4.9vw, 72px)/1.1 var(--display); letter-spacing: -0.04em; text-transform: uppercase; max-width: 76%; }
.hero__side { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.hero__lead { color: var(--soft); text-align: right; font-size: 15px; line-height: 23px; }
.hero__ctas { display: flex; gap: 13px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; height: 52px; padding: 0 24px; border-radius: 7px; transition: transform .3s var(--ease), background .2s; }
.btn--lime { background: var(--accent-2); color: #000; }
.btn--lime:hover { background: #fff; }
.btn--dark { background: var(--btn-dark); color: #fff; border: 1px solid #262626; }
.btn--dark:hover { background: #262626; }

.divider { height: 1px; background: var(--line); margin: 0 var(--side); }

/* ---------- Our story (original) ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; padding: 90px var(--side) 90px; border-bottom: 1px solid var(--line); }
.story__title { font: 500 30px/39px var(--display); letter-spacing: -0.04em; text-transform: uppercase; }
.story__body { display: grid; gap: 34px; font: 500 clamp(19px, 1.65vw, 24px)/1.42 var(--display); letter-spacing: -0.04em; color: var(--soft); }
.awards { display: flex; gap: 56px; align-items: center; margin-top: 30px; color: #fff; }

/* ---------- Cases (original) ---------- */
.cases { padding: 64px var(--side) 140px; display: grid; gap: 68px; }
.case { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 32px; cursor: pointer; } /* image column 30% smaller than half */
.case__media { overflow: hidden; border-radius: 8px; aspect-ratio: 664 / 376; background: var(--tile); }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.case:hover .case__media img { transform: scale(1.04); }
.case__info { display: flex; flex-direction: column; }
.case__meta { display: flex; gap: 10px; }
.case__title { font: 500 clamp(24px, 2.1vw, 34px)/1.3 var(--display); letter-spacing: -0.04em; text-transform: uppercase; max-width: 760px; transition: color .25s; }
.case:hover .case__title { color: var(--accent-2); }
.case__text { margin-top: auto; padding-top: 24px; color: var(--soft); max-width: 760px; }

/* ---------- Index (holographik) ---------- */
.index { padding: 40px 16px 160px; border-top: 1px solid var(--line); }
.section-label { margin-bottom: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); padding: 0 0 8px; }
.table td { padding: 8px 0; border-top: 1px solid var(--line); }
.table th:first-child, .table td:first-child { width: 8%; }
.table th:nth-child(2), .table td:nth-child(2) { width: 34%; }
.table tbody tr { cursor: pointer; transition: background .15s, color .15s; }
.table tbody tr:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- Footer (holographik) ---------- */
.footer { padding: 40px 16px 0; border-top: 1px solid var(--line); overflow: hidden; }
.footer__title { font: 500 64px/60px var(--display); letter-spacing: -0.04em; text-transform: uppercase; margin-bottom: 18px; }
.footer__info { margin-top: 80px; display: grid; grid-template-columns: repeat(6, max-content); gap: 18px 64px; font-size: 13px; line-height: 18px; }
.footer__info > div { display: flex; flex-direction: column; }
.footer__info > div > :not(.label) { padding-left: 10px; color: var(--soft); }
.footer__info a:hover { background: var(--accent); color: var(--on-accent); }
.footer__legal { margin-top: 60px; font-size: 13px; color: var(--muted); }
.footer__mark { display: block; width: 100%; margin-top: 18px; touch-action: pan-y; }

/* ---------- Project panel ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 30; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 40; background: #0a0a0a; border-left: 1px solid var(--line); transform: translateX(102%); transition: transform .6s var(--ease); overflow-y: auto; }
.panel__inner { padding: 14px 16px 40px; display: grid; gap: 14px; justify-items: start; }
.panel__close { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; justify-self: end; }
.panel__meta { color: var(--accent-2); margin-top: 30px; }
.panel__title { font: 500 34px/38px var(--display); letter-spacing: -0.04em; text-transform: uppercase; }
.panel__media { width: 100%; border-radius: 8px; overflow: hidden; aspect-ratio: 664 / 376; background: var(--tile); }
.panel__media img { width: 100%; height: 100%; object-fit: cover; }
.panel__text { color: var(--soft); font-size: 15px; line-height: 23px; }
body.panel-open .panel { transform: none; }
body.panel-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- Intro loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--accent-2); color: #000; display: grid; grid-template-rows: auto 1fr auto; padding: 16px; }
.loader__mark { width: 220px; height: 26px; }
.loader__label { align-self: end; }
.loader__count { justify-self: end; font: 500 clamp(110px, 18vw, 280px)/0.8 var(--display); letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.intro-seen .loader { display: none; }
.intro-active { overflow: hidden; }

/* ---------- Motion (see motion.js) ---------- */
.js-motion [data-anim="lines"], .js-motion [data-anim="fade"] { visibility: hidden; }
[data-anim="lines"] .line { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
[data-anim="lines"] .line > span { display: block; }
.pv { position: fixed; left: 0; top: 0; width: 260px; aspect-ratio: 664 / 376; border-radius: 6px; overflow: hidden; pointer-events: none; opacity: 0; transform: scale(.8) rotate(-4deg); z-index: 15; }
.pv img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Journal (blog) ---------- */
.page-head { padding: 140px var(--side) 60px; border-bottom: 1px solid var(--line); display: grid; gap: 22px; }
.page-head h1 { font: 500 clamp(48px, 8vw, 132px)/0.95 var(--display); letter-spacing: -0.05em; text-transform: uppercase; }
.page-head p { color: var(--soft); max-width: 560px; font-size: 15px; line-height: 23px; }
.posts { padding: 0 var(--side) 120px; }
.post-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.post-row__media { border-radius: 8px; overflow: hidden; aspect-ratio: 664 / 376; background: var(--tile); }
.post-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.post-row:hover .post-row__media img { transform: scale(1.04); }
.post-row__info { display: flex; flex-direction: column; gap: 14px; }
.post-row__title { font: 500 clamp(26px, 2.6vw, 42px)/1.12 var(--display); letter-spacing: -0.04em; text-transform: uppercase; transition: color .25s; }
.post-row:hover .post-row__title { color: var(--accent-2); }
.post-row__excerpt { color: var(--soft); max-width: 560px; margin-top: auto; }
.post-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.empty { padding: 80px 0; color: var(--soft); }

.post-hero { padding: 140px var(--side) 40px; display: grid; gap: 22px; }
.post-hero h1 { font: 500 clamp(38px, 5.4vw, 84px)/1.02 var(--display); letter-spacing: -0.045em; text-transform: uppercase; max-width: 1200px; }
.post-cover { margin: 0 var(--side); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 8; background: var(--tile); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 70px var(--side) 100px; border-bottom: 1px solid var(--line); }
.post-aside { display: grid; gap: 18px; align-content: start; position: sticky; top: 80px; }
.post-aside a:hover { color: var(--accent-2); }
.prose { max-width: 680px; font-size: 17px; line-height: 28px; color: var(--soft); }
.prose > * + * { margin-top: 22px; }
.prose .lead { font: 500 clamp(21px, 1.9vw, 26px)/1.4 var(--display); letter-spacing: -0.035em; color: var(--ink); }
.prose h2 { font: 500 28px/1.15 var(--display); letter-spacing: -0.04em; text-transform: uppercase; color: var(--ink); margin-top: 48px; }
.prose h3 { font: 500 21px/1.2 var(--display); letter-spacing: -0.03em; color: var(--ink); margin-top: 34px; }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 400; }
.prose ul { padding-left: 0; display: grid; gap: 8px; }
.prose li { padding-left: 20px; position: relative; }
.prose li::before { content: "↳"; position: absolute; left: 0; color: var(--accent-2); }
.prose blockquote { margin: 34px 0; padding-left: 20px; border-left: 2px solid var(--accent-2); font: 500 24px/1.35 var(--display); letter-spacing: -0.035em; color: var(--ink); }
.prose figure img { border-radius: 8px; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.post-next { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 50px var(--side) 120px; }
.post-next a:hover .post-row__title { color: var(--accent-2); }

.notfound { min-height: 80svh; display: grid; place-content: center; gap: 22px; padding: 120px var(--side); text-align: center; justify-items: center; }
.notfound h1 { font: 500 clamp(80px, 16vw, 220px)/0.9 var(--display); letter-spacing: -0.06em; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  :root { --side: 16px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__logo { grid-column: 1; }
  .nav__links, .nav__ext { display: none; }
  .nav__right { grid-column: 2; }
  .hero { padding-top: 90px; }
  .hero__media { position: relative; left: auto; top: auto; width: 260px; margin-bottom: auto; }
  .hero__partner { margin-top: 30px; }
  .hero__partner .mask { width: 52px; height: 47px; }
  .hero__row--labels { font-size: 14px; }
  .hero__row--main { flex-direction: column; gap: 24px; }
  .hero__title { max-width: none; font-size: 36px; }
  .hero__side { width: auto; align-items: flex-start; }
  .hero__lead { text-align: left; }
  .hero__ctas { margin-top: 24px; }
  .story { grid-template-columns: 1fr; gap: 24px; padding: 56px 16px; }
  .story__body { gap: 22px; }
  .awards { gap: 24px; flex-wrap: wrap; }
  .awards .mask--ortak { width: 150px; height: 66px; }
  .awards .mask--egr { width: 130px; height: 72px; }
  .cases { padding: 40px 16px 90px; gap: 48px; }
  .case { grid-template-columns: 1fr; gap: 14px; }
  .case__text { padding-top: 12px; }
  .index { padding-bottom: 100px; }
  .hide-sm { display: none; }
  .footer__title { font-size: 40px; line-height: 38px; }
  .footer__info { grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
  .post-row, .post-body, .post-next { grid-template-columns: 1fr; gap: 18px; }
  .post-aside { position: static; }
  .post-hero, .page-head { padding-top: 100px; }
  .post-cover { aspect-ratio: 664 / 376; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .js-motion [data-anim] { visibility: visible; }
}
