:root {
    --paper: #ffffff;
    --paper-2: #f5f5f4;
    --ink: #141414;
    --mute: #6f6f6f;
    --line: rgba(20,20,20,0.12);
    /* brand gradient sampled from the logo */
    --g1: #FB981B;  /* orange */
    --g2: #F05A2A;  /* red-orange */
    --g3: #B62E8C;  /* magenta */
    --g4: #682E8A;  /* purple */
    --g5: #0B30B0;  /* blue */
    --brand-grad: linear-gradient(90deg, var(--g1), var(--g2), var(--g3), var(--g4), var(--g5));
    --max: 1160px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

  body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 16.5px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

  /* ---- brand gradient bar ---- */
  .grade-bar { height: 4px; background: var(--brand-grad); }

  /* ---- nav ---- */
  header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0;
  }
  .brand {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--ink);
  }
  .brand img { height: 34px; width: auto; display: block; }
  .brand span {
    font-weight: 700; font-size: 16px; letter-spacing: 0.22em;
  }
  nav ul { display: flex; gap: 28px; list-style: none; }
  nav ul a {
    color: var(--mute); text-decoration: none;
    font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
  }
  nav ul a:hover, nav ul a:focus-visible { color: var(--ink); }
  a:focus-visible { outline: 2px solid var(--g5); outline-offset: 3px; }

  /* ---- hero ---- */
  .hero { padding: 96px 0 80px; border-bottom: 1px solid var(--line); }
  .hero .mark { height: 96px; width: auto; margin-bottom: 36px; }
  .tc {
    font-family: 'Space Mono', monospace;
    font-size: 12px; letter-spacing: 0.12em;
    color: var(--mute); text-transform: uppercase;
    display: block; margin-bottom: 20px;
  }
  .tc b { color: var(--g2); font-weight: 700; }
  .hero h1 {
    font-weight: 800;
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    max-width: 16ch;
  }
  .hero h1 em {
    font-style: normal;
    background: var(--brand-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
  .hero p {
    margin-top: 28px; max-width: 52ch; color: var(--mute); font-size: 18px;
  }
  .hero .cta {
    display: inline-block; margin-top: 36px;
    font-family: 'Space Mono', monospace; font-size: 14px;
    color: #fff; background: var(--ink);
    text-decoration: none; padding: 13px 24px;
    position: relative;
    transition: transform 0.15s;
  }
  .hero .cta::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
    background: var(--brand-grad);
  }
  .hero .cta:hover { transform: translateY(-2px); }

  /* ---- section headers ---- */
  section { padding: 84px 0; }
  .sec-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 44px; gap: 16px; flex-wrap: wrap;
  }
  .sec-head h2 {
    font-weight: 800; font-size: 26px; letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  /* ---- selected work grid ---- */
  .work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
  }
  .work-card { text-decoration: none; color: inherit; display: block; }
  .still {
    aspect-ratio: 16 / 9;
    background: var(--paper-2);
    border: 1px solid var(--line);
    position: relative; overflow: hidden;
    display: grid; place-items: center;
  }
  .still::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--brand-grad);
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.3s;
  }
  .work-card:hover .still::before { transform: scaleX(1); }
  .still .placeholder {
    font-family: 'Space Mono', monospace; font-size: 12px;
    color: var(--mute); letter-spacing: 0.08em;
  }
  .work-meta { padding-top: 14px; }
  .work-meta h3 { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
  .work-meta .role {
    font-family: 'Space Mono', monospace; font-size: 11.5px;
    color: var(--mute); margin-top: 5px; letter-spacing: 0.06em;
  }
  .work-meta .role i { font-style: normal; color: var(--g5); font-weight: 700; }

  /* ---- case studies: "selects" ---- */
  .cases { background: var(--paper-2); border-top: 1px solid var(--line); }
  .case {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
    padding: 56px 0; border-bottom: 1px solid var(--line);
    align-items: center;
  }
  .case:last-child { border-bottom: none; }
  .case:nth-child(even) .case-media { order: 2; }
  .case-media .still { background: #fff; }
  .in-out {
    display: flex; justify-content: space-between;
    font-family: 'Space Mono', monospace; font-size: 11px;
    color: var(--mute); letter-spacing: 0.08em; margin-top: 8px;
  }
  .in-out .in { color: var(--g2); font-weight: 700; }
  .in-out .out { color: var(--g5); font-weight: 700; }
  .case-body h3 {
    font-weight: 800; font-size: 28px; letter-spacing: -0.015em;
    line-height: 1.15;
  }
  .case-body .client {
    font-family: 'Space Mono', monospace; font-size: 12px;
    color: var(--mute); letter-spacing: 0.1em; text-transform: uppercase;
    display: block; margin-bottom: 12px;
  }
  .case-body p { color: var(--mute); margin-top: 16px; }
  .case-body .facts {
    margin-top: 22px; display: flex; gap: 28px; flex-wrap: wrap;
    font-family: 'Space Mono', monospace; font-size: 12.5px;
  }
  .facts div span { display: block; color: var(--mute); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }

  /* ---- about ---- */
  .about { border-top: 1px solid var(--line); }
  .about-copy { max-width: 760px; }
  .about h2 {
    font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    line-height: 1.18; letter-spacing: -0.015em;
  }
  .about p { color: var(--mute); margin-top: 20px; max-width: 58ch; }
  .services { position: relative; padding-left: 26px; }
  .services::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--g1), var(--g3), var(--g5));
  }
  .services li {
    list-style: none; padding: 11px 0;
    font-family: 'Space Mono', monospace; font-size: 13.5px;
    border-bottom: 1px solid var(--line);
  }
  .services li:last-child { border-bottom: none; }

  /* ---- contact / footer ---- */
  footer { background: var(--ink); color: #fff; padding: 80px 0 48px; }
  footer .tc { color: rgba(255,255,255,0.55); }
  footer h2 {
    font-weight: 800; font-size: clamp(1.9rem, 4.5vw, 3.2rem);
    letter-spacing: -0.02em;
  }
  footer .email {
    display: inline-block; margin-top: 22px;
    font-family: 'Space Mono', monospace; font-size: 18px;
    color: var(--g1); text-decoration: none;
    border-bottom: 1px solid var(--g1);
  }
  footer .email:hover { color: #fff; border-color: #fff; }
  .foot-meta {
    margin-top: 56px; display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    font-family: 'Space Mono', monospace; font-size: 12px;
    color: rgba(255,255,255,0.55); letter-spacing: 0.06em;
  }
  .foot-meta a { color: inherit; }
  .foot-meta a:hover { color: #fff; }

  @media (max-width: 800px) {
    nav ul { gap: 18px; }
    .brand span { font-size: 14px; letter-spacing: 0.16em; }
    .brand img { height: 30px; }
    .hero { padding: 64px 0 56px; }
    .hero .mark { height: 72px; }
    .case { grid-template-columns: 1fr; gap: 24px; }
    .case:nth-child(even) .case-media { order: 0; }
    .about-grid { grid-template-columns: 1fr; gap: 36px; }
    section { padding: 60px 0; }
  }
  @media (max-width: 620px) {
    nav { flex-direction: column; align-items: flex-start; gap: 14px; }
    nav ul { gap: 16px; flex-wrap: wrap; }
    nav ul a { font-size: 12px; letter-spacing: 0.04em; }
  }

/* ---- subpage hero (smaller than home hero) ---- */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 {
  font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em; line-height: 1.08; margin-top: 8px;
}
.page-head p { color: var(--mute); margin-top: 18px; max-width: 56ch; }

/* ---- coming soon block ---- */
.coming { padding: 96px 0; }
.coming-inner {
  border: 1px solid var(--line); background: var(--paper-2);
  padding: 72px 40px; text-align: center;
  position: relative; overflow: hidden;
}
.coming-inner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--brand-grad);
}
.coming-inner .tc { justify-content: center; }
.coming-inner h2 {
  font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.015em; margin-top: 6px;
}
.coming-inner p { color: var(--mute); margin: 16px auto 0; max-width: 46ch; }
.coming-inner .back {
  display: inline-block; margin-top: 28px;
  font-family: 'Space Mono', monospace; font-size: 14px;
  color: #fff; background: var(--ink); text-decoration: none; padding: 12px 24px;
}
.coming-inner .back:hover { background: var(--g5); }

/* ---- tools page ---- */
.tool-slot { padding: 64px 0 96px; }
.tool-card {
  border: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr; overflow: hidden;
}
.tool-card .tool-info { padding: 36px 40px; border-bottom: 1px solid var(--line); }
.tool-card h2 { font-weight: 800; font-size: 24px; letter-spacing: -0.01em; }
.tool-card .tool-info p { color: var(--mute); margin-top: 12px; max-width: 60ch; }
.tool-tags { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.tool-tags span {
  font-family: 'Space Mono', monospace; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mute); border: 1px solid var(--line); padding: 5px 10px;
}
.tool-embed {
  min-height: 420px; display: grid; place-items: center;
  background: var(--paper-2);
  background-image:
    linear-gradient(rgba(20,20,20,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,20,20,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.tool-embed .placeholder {
  font-family: 'Space Mono', monospace; font-size: 13px;
  color: var(--mute); letter-spacing: 0.08em; text-align: center; padding: 24px;
}
.tool-embed .placeholder b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 8px; }

/* ---- work card as button (lightbox trigger) ---- */
button.work-card {
  background: none; border: none; padding: 0; margin: 0;
  width: 100%; text-align: left; font: inherit; cursor: pointer;
}

/* ---- play badge on playable stills ---- */
.play-badge {
  position: absolute; z-index: 2; top: 50%; left: 50%;
  width: 60px; height: 60px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(20,20,20,0.82);
  display: grid; place-items: center;
  transition: transform 0.2s, background 0.2s;
}
.play-badge::after {
  content: ""; margin-left: 4px;
  border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.work-card:hover .play-badge { transform: translate(-50%, -50%) scale(1.08); background: var(--g5); }

/* ---- video lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,12,16,0.92);
  display: grid; place-items: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-inner { width: 100%; max-width: 1040px; }
.lightbox-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none; color: #fff;
  font-size: 40px; line-height: 1; cursor: pointer;
  width: 48px; height: 48px;
}
.lightbox-close:hover { color: var(--g1); }

/* ---- Gumlet poster thumbnail on card ---- */
.still .poster-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; pointer-events: none; z-index: 1;
}
.still.has-poster { background-size: cover; background-position: center; }
.still.has-poster .placeholder { display: none; }
.still.has-poster .play-badge { z-index: 3; }

/* ---- tool install note ---- */
.tool-install { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.tool-install a {
  font-family: 'Space Mono', monospace; font-size: 14px; font-weight: 700;
  color: var(--g5); text-decoration: none; border-bottom: 1px solid var(--g5);
  align-self: flex-start;
}
.tool-install a:hover { color: var(--ink); border-color: var(--ink); }
.tool-install span { font-family: 'Space Mono', monospace; font-size: 11.5px; color: var(--mute); letter-spacing: 0.04em; }
