/* ---------- Colours (dark is default; light below) ---------- */
:root, [data-theme="dark"] {
  --bg: #0c0c0c; --fg: #f2efea; --muted: #c9c5bd; --muted2: #a8a39b;
  --line: #2e2c29; --accent: #D85A30; --seg: #2e2c29; --seg2: #3c3a36; --wave: #3c3a36;
  --glass: rgba(26, 24, 22, 0.55); --glass-edge: rgba(255, 255, 255, 0.10);
  --g1: rgba(216, 90, 48, 0.28); --g2: rgba(232, 176, 74, 0.14); --g3: rgba(127, 119, 221, 0.16);
  --screen: #1c1b19; --screen-raw: #2a2826; --screen-fg: #a8a39b;
  --shadow: 0 0 0 rgba(0, 0, 0, 0);
  --foot-bg: rgba(26, 24, 22, 0.55); --foot-fg: #f2efea; --foot-muted: #a8a39b;
  --on-bg: #f2efea; --on-fg: #0c0c0c;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f3ee; --fg: #141413; --muted: #4a4741; --muted2: #5f5b55;
  --line: #d0cbc2; --accent: #B8461F; --seg: #dcd8d0; --seg2: #cbc6bd; --wave: #c3bdb3;
  --glass: rgba(255, 255, 255, 0.52); --glass-edge: rgba(255, 255, 255, 0.7);
  --g1: rgba(222, 96, 50, 0.32); --g2: rgba(240, 165, 80, 0.32); --g3: rgba(135, 115, 230, 0.24);
  --screen: #161514; --screen-raw: #2a2826; --screen-fg: #a8a39b;
  --shadow: 0 24px 60px -28px rgba(70, 40, 20, 0.30);
  --foot-bg: #141413; --foot-fg: #f2efea; --foot-muted: #a8a39b;
  --on-bg: #141413; --on-fg: #f2efea;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: 'Inter Tight', system-ui, sans-serif; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.accent { color: var(--accent); }
.mono { font-family: 'JetBrains Mono', monospace; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.page { position: relative; overflow: hidden; }
.wrap { padding-inline: clamp(20px, 4vw, 48px); }
main, .site-header, .contact { position: relative; z-index: 1; }

/* ---------- Glows + glass ---------- */
.glows { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.glow { position: absolute; width: 950px; height: 950px; border-radius: 50%; }
.glow.g1 { background: radial-gradient(circle, var(--g1) 0%, transparent 65%); }
.glow.g2 { background: radial-gradient(circle, var(--g2) 0%, transparent 65%); }
.glow.g3 { background: radial-gradient(circle, var(--g3) 0%, transparent 65%); }
.glass { background: var(--glass); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
.card { box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px clamp(20px, 4vw, 48px); border-width: 0 0 1px; border-radius: 0; }
.logo { display: flex; }
.logo { align-items: center; }
.logo-mark { display: block; height: 28px; width: auto; }
.logo-k { fill: var(--fg); }
.logo-dot { fill: var(--accent); }
.nav { display: flex; gap: 28px; font-size: 15px; flex-wrap: wrap; align-items: center; }
.theme-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); display: flex; align-items: center; justify-content: center; cursor: pointer; }
[data-theme="dark"] .icon-moon, [data-theme="light"] .icon-sun { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: 32px; padding-bottom: 56px; }
.ruler { opacity: .6; height: 10px; border-top: 1px solid var(--line); background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 2.5%); background-size: 100% 6px; background-repeat: no-repeat; margin-bottom: 28px; }
.name { font-weight: 700; font-size: clamp(64px, 15vw, 220px); line-height: .85; letter-spacing: -.055em; }
.layer-bar { position: relative; opacity: .6; margin-top: 22px; height: 14px; border-radius: 4px; }
.kf { position: absolute; top: 2px; width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }
.kf-l { left: -5px; } .kf-r { right: -5px; }
.intro { margin-top: 40px; font-size: 22px; line-height: 1.4; max-width: 560px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 16px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #3fbf7f; box-shadow: 0 0 0 4px rgba(63, 191, 127, .18); }

/* ---------- Section cut line ---------- */
.cut { display: flex; align-items: center; gap: 12px; padding-top: 120px; padding-bottom: 56px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted2); }
.cut:first-of-type { padding-top: 0; }
.razor { stroke: var(--accent); opacity: .7; flex: none; }
.pill { padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.cut .line { flex: 1; height: 1px; background: var(--line); }
.cut .diamond { width: 8px; height: 8px; background: var(--muted2); transform: rotate(45deg); opacity: .7; flex: none; }

/* ---------- Screens (video areas) ---------- */
.screen { position: relative; background: var(--screen); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.placeholder { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--screen-fg); }
.screen-wide { aspect-ratio: 16 / 9; width: 100%; max-height: 80vh; border-radius: 16px; border: 1px solid var(--glass-edge); }
.screen-tall { aspect-ratio: 9 / 16; }
.safe { position: absolute; border: 1px dashed var(--line); border-radius: 4px; pointer-events: none; }
.safe.s1 { inset: 5%; opacity: .5; } .safe.s2 { inset: 10%; opacity: .3; }
.cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); background: linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat, linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat; opacity: .6; }

/* ---------- Reel controls ---------- */
.controls { display: flex; align-items: center; gap: 16px; padding: 14px 18px; flex-wrap: wrap; margin-top: 14px; border-radius: 16px; box-shadow: inset 0 1px 0 var(--glass-edge), var(--shadow); }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.tc { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scrub-wrap { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.chapters { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted2); }
.wave { height: 26px; background-image: repeating-linear-gradient(90deg, var(--wave) 0 2px, transparent 2px 5px); -webkit-mask-image: linear-gradient(180deg, transparent 0 20%, #000 20% 80%, transparent 80%); mask-image: linear-gradient(180deg, transparent 0 20%, #000 20% 80%, transparent 80%); }
.scrub { position: relative; height: 4px; background: var(--line); border-radius: 2px; }
.scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: var(--accent); border-radius: 2px; }
.scrub .m { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--muted2); }

/* ---------- Projects ---------- */
.work { display: flex; flex-direction: column; gap: 120px; }
.project { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 72px); align-items: center; }
.frame-col { flex: 0 1 340px; display: flex; flex-direction: column; gap: 14px; }
.frame { position: relative; padding: 14px; }
.cm { position: absolute; width: 14px; height: 14px; opacity: .5; border: 0 solid var(--muted2); }
.cm.tl { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.cm.tr { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.cm.bl { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.cm.br { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.project .show-raw { display: none; }
.project.is-raw .show-raw { display: inline; }
.project.is-raw .show-final { display: none; }
.project.is-raw .screen { background: var(--screen-raw); }
.rawfinal { display: flex; border-radius: 999px; padding: 4px; align-self: center; }
.rawfinal button { border: 0; border-radius: 999px; padding: 10px 22px; font-size: 15px; cursor: pointer; min-height: 44px; background: transparent; color: var(--muted2); }
.rawfinal button[aria-pressed="true"] { background: var(--on-bg); color: var(--on-fg); }
.story { flex: 1 1 360px; display: flex; flex-direction: column; gap: 18px; padding: clamp(24px, 3vw, 40px); border-radius: 22px; }
.num { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted2); }
.story h2 { font-weight: 600; font-size: clamp(32px, 4vw, 56px); letter-spacing: -.035em; line-height: 1.02; }
.brief { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 520px; }
.role { font-size: 15px; color: var(--muted2); }
.hbc { display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin-top: 6px; }
.segs { display: flex; gap: 3px; height: 34px; }
.seg { border: 0; border-radius: 3px; text-align: left; padding: 0 10px; font-size: 12px; font-weight: 500; letter-spacing: .5px; color: var(--fg); cursor: pointer; }
.seg.hook { flex: 1; background: var(--accent); color: #fff; }
.seg.body { flex: 3.2; background: var(--seg); }
.seg.cta { flex: 1; background: var(--seg2); }
.marks { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted2); }

/* ---------- More ads slider ---------- */
.more-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.more h2, .process h2 { font-weight: 600; font-size: clamp(28px, 3.5vw, 44px); letter-spacing: -.03em; }
.arrows { display: flex; gap: 10px; }
.arrow { width: 48px; height: 48px; border-radius: 50%; color: var(--fg); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: calc(-1 * clamp(20px, 4vw, 48px)); padding-right: clamp(20px, 4vw, 48px); padding-bottom: 4px; }
.track::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 240px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; }
.tile .screen { border-radius: 14px; border: 1px solid var(--glass-edge); }
.len { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #f2efea; background: rgba(12, 12, 12, 0.55); border-color: rgba(255, 255, 255, 0.12); }
.t-brand { font-weight: 500; font-size: 16px; }
.t-kind { margin-top: 2px; font-size: 14px; color: var(--muted2); }
.dots { display: flex; gap: 6px; margin-top: 22px; }
.dots span { height: 4px; width: 10px; border-radius: 2px; background: var(--line); transition: all .3s; }
.dots span.on { width: 28px; background: var(--accent); }

/* ---------- About ---------- */
.about { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.about-lead { flex: 1 1 340px; display: flex; flex-direction: column; gap: 28px; }
.big { font-weight: 600; font-size: clamp(28px, 3.5vw, 44px); line-height: 1.15; letter-spacing: -.03em; }
.scope { opacity: .55; stroke: var(--line); }
.scope-line { stroke: var(--accent); stroke-width: 1.4; }
.scope-blob { fill: var(--accent); stroke: none; opacity: .28; }
.about-body { flex: 1.3 1 420px; display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 3vw, 40px); border-radius: 22px; font-size: 18px; line-height: 1.65; color: var(--muted); }
.chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--fg); }

/* ---------- Process ---------- */
.process h2 { margin-bottom: 28px; }
.process ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.process li { padding: 28px; border-radius: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.process .n { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); }
.process .pt { font-weight: 600; font-size: 20px; letter-spacing: -.01em; color: var(--fg); }

/* ---------- Contact ---------- */
.contact { margin: 0 clamp(20px, 4vw, 48px) 40px; padding: clamp(32px, 5vw, 64px); border-radius: 28px; background: var(--foot-bg); color: var(--foot-fg); border: 1px solid var(--glass-edge); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.contact .lead { font-size: 18px; color: var(--foot-muted); margin-bottom: 12px; }
.email { display: inline-block; font-weight: 700; font-size: clamp(30px, 6vw, 84px); letter-spacing: -.045em; line-height: 1; overflow-wrap: anywhere; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 64px; font-size: 14px; color: var(--foot-muted); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .nav { gap: 18px; }
  .cut { padding-top: 88px; padding-bottom: 40px; }
  .work { gap: 88px; }
  .frame-col { flex-basis: 100%; }
  .tile { flex-basis: 70%; }
  .chapters span:nth-child(n+3) { display: none; }
  .contact { padding: 32px 20px; }
  .email { font-size: 5.6vw; letter-spacing: -.03em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
