@import url(fonts.css);
@import url(plex.css);

:root {
  --bg: #0b0b0d; --ink: #f3f3f4; --mute: #8d8d96; --dim: #5d5d66;
  --panel: #131316; --panel2: #18181c; --line: #232329; --line2: #2e2e35;
  --pink: #FF2E88; --yel: #FFE600; --lime: #B8FF1F; --cyan: #00E0FF; --vio: #A779FF;
  --side: clamp(16px, 2.2vw, 32px); --gap: 6px; --r: 16px;
  --max: 1480px;
  --edge: max(var(--side), calc((100vw - var(--max)) / 2 + var(--side)));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.5 "Inter Display", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
::selection { background: var(--pink); color: #000; }

/* header */
.hd { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 32px; padding: 22px var(--edge); }
.brand img { height: 46px; width: auto; margin: -8px 0 -8px -8px; }
.hd nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.hd nav a, .hd-mail { color: var(--mute); transition: color .2s; }
.hd nav a:hover, .hd-mail:hover { color: var(--ink); }
.hd-mail { font-size: 15px; }

/* hero */
.hero { position: relative; min-height: clamp(520px, 74vh, 760px); display: flex; align-items: flex-end; overflow: hidden; }
.px { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; z-index: 2; padding: 120px var(--side) clamp(36px, 6vh, 64px) var(--edge); max-width: calc(1100px + var(--edge)); pointer-events: none; }
.hero-in > * { pointer-events: auto; }
.hero h1 { font-weight: 400; font-size: clamp(46px, 6.6vw, 112px); line-height: .98; letter-spacing: -.04em; }
.hero p { margin-top: 22px; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.45; color: #c4c4ca; }

/* the pill with the two buttons */
.pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 30px; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.mk { display: grid; grid-template-columns: 7px 7px; gap: 0; width: 14px; margin: 0 10px 0 8px; }
.mk b { width: 7px; height: 7px; }
.mk b:nth-child(1) { background: var(--pink); } .mk b:nth-child(2) { background: var(--yel); }
.mk b:nth-child(3) { background: var(--lime); } .mk b:nth-child(4) { background: var(--cyan); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 22px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line2); font-size: 15px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--ink); color: #000; border-color: var(--ink); }

/* work */
.work { display: flex; flex-direction: column; gap: var(--gap); padding: 0 var(--side); max-width: var(--max); margin: 0 auto; }
.row { display: flex; gap: var(--gap); }
.card { position: relative; flex: var(--a, 1) 1 0; min-width: 0; aspect-ratio: var(--a, 1); border-radius: var(--r); overflow: hidden; background: var(--c, var(--panel)); isolation: isolate; }
.card > video, .card > img { width: 100%; height: 100%; object-fit: contain; }
.card figcaption { position: absolute; left: 12px; bottom: 12px; padding: 5px 9px; border-radius: 6px; background: rgba(11, 11, 13, .82); color: var(--ink); font-size: 12px; letter-spacing: .02em; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; pointer-events: none; }
.card:hover figcaption { opacity: 1; transform: none; }

/* trays: a set shown together on a dark panel */
.tray { flex: 1 1 100%; aspect-ratio: auto; background: var(--panel); border: 1px solid var(--line); }
.tin { display: flex; justify-content: center; align-items: center; }
.ti { position: relative; border-radius: 12px; overflow: hidden; background: var(--c); }
.ti video, .ti img { width: 100%; height: 100%; object-fit: contain; }
.tray-faces .tin { gap: 2%; padding: 3.6% 4%; }
.tray-faces .ti { width: 19%; aspect-ratio: 1; }
.tray-proc .tin { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4%; padding: 2.6% 2.6% 2%; align-items: start; }
.tray-proc .ti { overflow: visible; background: none; border-radius: 0; }
.tray-proc .ti video, .tray-proc .ti img { aspect-ratio: .8; height: auto; border-radius: 12px; background: var(--c); }
.tray-proc .ti span { display: block; margin-top: 12px; font-size: 12.5px; color: var(--mute); white-space: pre; }
.tray-icons .tin { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6%; padding: 3.4% 9%; }
.tray-icons .ti { aspect-ratio: 1; }
.tray-cards { background: #120e19; border-color: #221a2e; }
.tray-cards .tin { gap: 2.4%; padding: 4.6% 4%; }
.tray-cards .ti { width: 13.4%; background: none; border-radius: 0; overflow: visible; animation: hover 5s ease-in-out var(--d) infinite; }
.tray-cards .ti img { height: auto; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .55)); }
.tray-cards .ti:nth-child(odd) { margin-top: 3%; }
@keyframes hover { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-4%) rotate(.6deg); } }

/* services */
.svc { max-width: var(--max); margin: clamp(64px, 9vw, 128px) auto 0; padding: 0 var(--side); }
.svc-hd { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.svc h2, .contact h2 { font-weight: 400; font-size: clamp(34px, 3.6vw, 60px); line-height: 1.02; letter-spacing: -.035em; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.tabs button { height: 38px; padding: 0 20px; border-radius: 8px; color: var(--mute); font-size: 15px; transition: background .2s, color .2s; }
.tabs button[aria-selected="true"] { background: var(--panel2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.pane { display: none; }
.pane.on { display: grid; }
.pane[data-pane="services"] { grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.pane article { padding: 18px 18px 26px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.ill { border-radius: 10px; background: #0e0e11; border: 1px solid var(--line); aspect-ratio: 16 / 9; display: grid; place-items: center; margin-bottom: 22px; overflow: hidden; }
.ill svg { width: 100%; height: 100%; }
.pane h3 { font-weight: 500; font-size: 19px; letter-spacing: -.01em; }
.pane p { margin-top: 6px; color: var(--mute); font-size: 15px; line-height: 1.5; max-width: 34em; }

/* line art in the illustrations */
.ill .ln { fill: none; stroke: #3a3a43; stroke-width: 1.3; }
.ill .lb { font: 400 10.5px "IBM Plex Mono", monospace; fill: var(--ink); }
.ill .lb.dim { fill: #6c6c76; }
.ill .tag rect { fill: #0e0e11; stroke: var(--pink); stroke-width: 1.2; }
.ill .tag text { font: 500 11px "IBM Plex Mono", monospace; fill: var(--pink); text-anchor: middle; }
.ill .lay { animation: lay 3.2s ease-in-out infinite; }
.ill .cur { fill: var(--ink); stroke: #0e0e11; stroke-width: 1; }
@keyframes lay { 0%, 18% { transform: translate(0, 0); } 50%, 68% { transform: translate(34px, -10px); } 100% { transform: translate(0, 0); } }
.ill .bn { fill: none; stroke: #c9c9d0; stroke-width: 1.4; stroke-linejoin: round; }
.ill .bn.sel { fill: var(--cyan); stroke: var(--cyan); }
.ill .jt { fill: #0e0e11; stroke: #c9c9d0; stroke-width: 1.4; }
.ill .jt.root { stroke: var(--yel); }
.ill .kf path { fill: var(--yel); }
.ill .ph { stroke: var(--pink); stroke-width: 1.4; }
.ill .cl { fill: none; stroke: #3a3a43; stroke-width: 1.3; }
.ill .wn { opacity: 0; animation: win 3s ease-out var(--d) infinite; }
.ill .wl { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 3 4; opacity: 0; animation: wl 3s ease-out infinite; }
@keyframes win { 0% { opacity: 0; } 8%, 72% { opacity: 1; } 86%, 100% { opacity: 0; } }
@keyframes wl { 0%, 30% { opacity: 0; } 40%, 72% { opacity: .9; } 86%, 100% { opacity: 0; } }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.steps li { padding: 20px 18px 26px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); min-height: 210px; display: flex; flex-direction: column; }
.steps b { font-weight: 500; font-size: 12px; color: var(--pink); margin-bottom: auto; padding-bottom: 40px; }
.steps li:nth-child(2) b { color: var(--yel); } .steps li:nth-child(3) b { color: var(--lime); } .steps li:nth-child(4) b { color: var(--cyan); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--gap); }
.tools span { padding: 9px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: var(--mute); }

/* contact */
.contact { max-width: var(--max); margin: clamp(64px, 9vw, 128px) auto 0; padding: 0 var(--side); }
.contact-in { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) clamp(22px, 3vw, 48px); border-radius: var(--r); border: 1px solid var(--line); background: #0d0d10; }
.contact-in > :not(.px) { position: relative; z-index: 1; }
.contact p { margin-top: 18px; color: #c4c4ca; font-size: clamp(16px, 1.2vw, 18px); max-width: 30em; }

/* footer */
.ft { display: flex; align-items: center; gap: 24px; max-width: var(--max); margin: 0 auto; padding: 36px var(--side) 40px; color: var(--dim); font-size: 12.5px; }
.ft img { height: 38px; width: auto; margin: -6px auto -6px -6px; opacity: .9; }
.ft a:hover { color: var(--ink); }

@media (max-width: 1100px) {
  .pane[data-pane="services"] { grid-template-columns: 1fr 1fr; }
  .pane[data-pane="services"] article:last-child { grid-column: 1 / -1; }
  .pane[data-pane="services"] article:last-child .ill { aspect-ratio: 32 / 11; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  :root { --gap: 4px; --r: 11px; }
  .hd { gap: 12px; padding: 16px var(--side); }
  .hero-in { padding-left: var(--side); }
  .brand img { height: 38px; }
  .hd nav { display: none; }
  .hd-mail { margin-left: auto; font-size: 13px; }
  .hero { min-height: 560px; }
  .hero-in { padding-bottom: 30px; }
  .hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .hero p { font-size: 15.5px; margin-top: 16px; }
  .pill { margin-top: 24px; max-width: 100%; }
  .mk { margin: 0 6px 0 6px; }
  .btn { height: 40px; padding: 0 14px; font-size: 14px; }

  .row { flex-wrap: wrap; }
  .card { flex: 1 1 100%; }
  .card.h { flex: 1 1 calc(50% - var(--gap)); aspect-ratio: .86; }
  .card figcaption { display: none; }
  .ti { border-radius: 8px; }
  .tray-faces .tin { gap: 3%; padding: 6% 4%; }
  .tray-faces .ti { width: 30%; }
  .tray-proc .tin { grid-template-columns: 1fr 1fr; gap: 14px 4%; padding: 5% 5% 4%; }
  .tray-proc .ti video, .tray-proc .ti img { border-radius: 8px; }
  .tray-proc .ti span { font-size: 11px; margin-top: 8px; }
  .tray-icons .tin { grid-template-columns: 1fr 1fr; gap: 8px; padding: 5% 5%; }
  .tray-cards .tin { flex-wrap: wrap; gap: 14px 4%; padding: 8% 6%; }
  .tray-cards .ti { width: 27%; }
  .tray-cards .ti:nth-child(odd) { margin-top: 0; }

  .svc-hd { flex-direction: column; align-items: flex-start; gap: 16px; }
  .pane[data-pane="services"], .steps { grid-template-columns: 1fr; }
  .pane[data-pane="services"] article:last-child .ill { aspect-ratio: 16 / 9; }
  .steps li { min-height: 0; }
  .steps b { padding-bottom: 18px; }
  .ft { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ft img { margin: 0 0 8px -6px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tray-cards .ti, .ill .lay, .ill .wn, .ill .wl { animation: none; }
  .ill .wn, .ill .wl { opacity: 1; }
}

/* project form */
.fm { margin: auto; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line2); border-radius: 18px; background: var(--panel); color: var(--ink); overflow: auto; }
.fm::backdrop { background: rgba(5, 5, 7, .78); backdrop-filter: blur(3px); }
.fm-in, .fm-ok { padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.fm-hd { display: flex; align-items: center; justify-content: space-between; }
.fm h2 { font-weight: 400; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.03em; line-height: 1.05; }
.fm-x { width: 40px; height: 40px; border-radius: 10px; font-size: 26px; line-height: 1; color: var(--mute); background: var(--panel2); border: 1px solid var(--line2); }
.fm-x:hover { color: var(--ink); }
.fm-sub { color: var(--mute); margin-top: -6px; }
.fm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fm label { display: grid; gap: 6px; }
.fm label > span, .fm legend { font: 400 12px "IBM Plex Mono", monospace; color: var(--mute); letter-spacing: .02em; }
.fm input, .fm select, .fm textarea { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #0e0e11; border: 1px solid var(--line2); border-radius: 10px; padding: 11px 13px; outline: none; transition: border-color .2s; }
.fm textarea { resize: vertical; min-height: 120px; }
.fm select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.fm input:focus, .fm select:focus, .fm textarea:focus { border-color: var(--ink); }
.fm .bad { border-color: var(--pink); }
.fm fieldset { border: 0; display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { display: block; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.chips i { display: inline-block; font-style: normal; font-size: 14px; padding: 8px 13px; border-radius: 8px; background: #0e0e11; border: 1px solid var(--line2); color: #c4c4ca; transition: background .15s, color .15s, border-color .15s; }
.chips input:checked + i { background: var(--ink); color: #000; border-color: var(--ink); }
.chips input:focus-visible + i { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fm-ft { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.btn-go { background: var(--ink); color: #000; border-color: var(--ink); padding: 0 28px; }
.btn-go:hover { background: var(--lime); border-color: var(--lime); }
.btn-go[disabled] { opacity: .5; cursor: wait; }
.fm-msg { color: var(--pink); font-size: 14px; }
.fm-ok { justify-items: start; padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); }
.fm-ok .mk { margin: 0 0 6px; transform: scale(2); transform-origin: left top; height: 28px; }
.fm-ok p { color: #c4c4ca; }
@media (max-width: 560px) { .fm-row { grid-template-columns: 1fr; } }
.fm [hidden] { display: none !important; }
.fm-ok .mk { transform: none; grid-template-columns: 14px 14px; width: 28px; height: 28px; margin: 0 0 8px; }
.fm-ok .mk b { width: 14px; height: 14px; }
