/* ==========================================================================
   Version B — "Keep the identity, modernise the layout"
   Same DNA (lime, dark hero, light uppercase titles, slants, particle footer),
   with a fluid type scale, a consistent case-study template and a sharper story.
   ========================================================================== */

:root {
  --lime: #99cc00;
  --lime-hover: #a8df03;
  --lime-ink: #5f7f00;          /* lime dark enough for text on light grounds */
  --ink: #1f2830;
  --ink-soft: #323c46;
  --body: #5d6d7e;
  --muted: #8a97a5;
  --band: #eeeeee;
  --band-deep: #e2e2e2;
  --line: #dde1e5;
  --white: #ffffff;
  --black: #000000;

  --font: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-label: "Raleway", var(--font);

  /* Fluid scale: grows smoothly from phone to desktop, no breakpoints needed */
  --step--1: clamp(.75rem, .72rem + .15vw, .8125rem);
  --step-0:  clamp(.9375rem, .9rem + .2vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.05rem + .35vw, 1.3125rem);
  --step-3:  clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --step-hero: clamp(3.1rem, 1.6rem + 7vw, 7.25rem);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lime-ink); text-decoration: none; transition: color .25s, background-color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
p, li, dd, dt, figcaption, blockquote, td { text-wrap: pretty; }
h1, h2, h3, h4, figcaption { text-wrap: balance; }
h1, h2, h3 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; background: var(--lime); color: var(--black); font-weight: 700; }
.skip-link:focus { top: 16px; }

/* Signature heading pair: lime Raleway eyebrow + light uppercase title */
.label {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 12px;
  font-family: var(--font-label); font-weight: 700;
  font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase;
  color: var(--lime-ink);
}
.label__num { color: var(--muted); font-variant-numeric: tabular-nums; }
.label__num::after { content: ""; display: inline-block; width: 28px; height: 1px; margin: 0 0 .3em 12px; background: currentColor; vertical-align: middle; }
.title {
  font-size: var(--step-3); line-height: 1.1;
  font-weight: 300; letter-spacing: -.01em; text-transform: uppercase;
  color: var(--ink-soft);
}
/* Long single words (e.g. "RECOMMENDATIONS") must never push a page wider than the phone */
.title, h1, h2, h3 { overflow-wrap: break-word; }
@media (max-width: 480px) { .title { font-size: clamp(1.25rem, 6.2vw, 1.75rem); } }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 26px;
  border: 1px solid var(--lime); border-radius: 999px;
  background: var(--lime); color: var(--black);
  font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.btn:hover, .btn:focus-visible { background: var(--lime-hover); border-color: var(--lime-hover); color: var(--black); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgb(153 204 0 / .7); }
.btn--ghost { background: transparent; border-color: rgb(255 255 255 / .55); color: var(--white); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--white); border-color: var(--white); color: var(--black); box-shadow: none; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--dark:hover, .btn--dark:focus-visible { background: #3a4651; border-color: #3a4651; color: var(--white); box-shadow: none; }
.btn--locked::before {
  content: ""; width: 12px; height: 12px;
  background: url("../img/lock24.svg") center / contain no-repeat;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-note { margin: 10px 0 0; font-size: var(--step--1); color: var(--muted); }
.btn-note strong { color: var(--lime-ink); }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover { color: var(--lime-ink); }
.link-arrow:hover::after { transform: translateX(4px); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--step--1); color: var(--ink-soft); background: rgb(255 255 255 / .6); }

/* ---------- Angled dividers: the original layered trapezoids ----------
   Two wedges in the neighbouring row's colour (--slant-color): a taller one behind at half
   strength and a shorter solid one in front, so the angle reads in two tones. */
.slant-top, .slant-bottom { position: relative; isolation: isolate; }
.slant-top::before, .slant-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; z-index: -1; height: clamp(40px, 6vw, 88px); pointer-events: none;
  background: var(--slant-color, var(--band));
  -webkit-mask: var(--wedge) 0 0 / 100% 100% no-repeat; mask: var(--wedge) 0 0 / 100% 100% no-repeat;
}
/* Hangs from the top edge, deepest on the right */
.slant-top::before {
  top: -1px;
  --wedge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 100,0 100,100' fill-opacity='.5'/%3E%3Cpolygon points='0,0 100,0 100,58'/%3E%3C/svg%3E");
}
/* Rises from the bottom edge, deepest on the left */
.slant-bottom::after {
  bottom: -1px;
  --wedge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 0,100 100,100' fill-opacity='.5'/%3E%3Cpolygon points='0,42 0,100 100,100'/%3E%3C/svg%3E");
}

/* ---------- Reveal-on-scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40;
  padding-block: 24px;
  background: linear-gradient(to bottom, rgb(0 0 0 / .7), rgb(0 0 0 / 0));
  transition: padding .35s var(--ease), background-color .35s, backdrop-filter .35s;
}
.nav.is-solid { padding-block: 14px; background-color: rgb(0 0 0 / .78); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__name { color: var(--white); font-size: clamp(14px, 1.2vw + 10px, 19px); font-weight: 300; letter-spacing: .3em; }
.nav__name:hover { color: var(--white); }
.nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav__links a { color: rgb(255 255 255 / .8); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav__links a:hover { color: var(--lime); }
@media (max-width: 800px) { .nav__links { display: none; } }

.menu-btn { position: relative; z-index: 60; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--white); }
.menu-btn__icon { position: relative; width: 25px; height: 18px; }
.menu-btn__icon span { position: absolute; right: 0; height: 2px; background: currentColor; transition: transform .4s var(--ease), width .4s var(--ease), top .4s var(--ease), opacity .3s; }
.menu-btn__icon span:nth-child(1) { top: 0; width: 25px; }
.menu-btn__icon span:nth-child(2) { top: 8px; width: 20px; }
.menu-btn__icon span:nth-child(3) { top: 16px; width: 15px; }
.menu-open .menu-btn { color: var(--black); }
.menu-open .menu-btn__icon span:nth-child(1) { top: 8px; width: 22px; transform: rotate(45deg); }
.menu-open .menu-btn__icon span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn__icon span:nth-child(3) { top: 8px; width: 22px; transform: rotate(-45deg); }

/* Lift the nav above the drawer while open so the close (X) button stays reachable */
.menu-open .nav { z-index: 55; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu-open .nav__name, .menu-open .nav__links { visibility: hidden; }
.scrim { position: fixed; inset: 0; z-index: 45; background: rgb(15 15 15 / .9); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.drawer {
  position: fixed; inset: 0; z-index: 50;
  display: flex; justify-content: flex-end; align-items: center;
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  background: var(--white);
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 0 100%);
  transform: translateX(100%); visibility: hidden;
  transition: transform .55s var(--ease), visibility .55s;
}
.menu-open .scrim { opacity: 1; visibility: visible; }
.menu-open .drawer { transform: none; visibility: visible; transition: transform .55s var(--ease), visibility 0s; }
.drawer ul { text-align: right; }
.drawer li { padding-bottom: 6px; }
.drawer a { color: var(--black); font-size: clamp(28px, 4vw, 40px); font-weight: 300; text-transform: lowercase; }
.drawer a:hover, .drawer a:focus-visible { color: var(--lime-ink); }
.drawer .drawer__label { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--font-label); font-size: var(--step--1); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .drawer, .scrim { transition: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid; align-items: center;
  min-height: min(100svh, 920px);
  padding: 140px 0 120px;
  color: var(--white);
  background:
    linear-gradient(100deg, rgb(0 0 0 / .85) 0%, rgb(0 0 0 / .55) 55%, rgb(0 0 0 / .35) 100%),
    #111 url("../img/home/hero-1128.webp") center / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: conic-gradient(rgb(0 0 0 / .22) 25%, transparent 0) 0 0 / 2px 2px; }
.hero > * { position: relative; }
.headline { margin-bottom: 28px; font-size: var(--step-hero); line-height: .95; letter-spacing: -.025em; color: var(--white); }
.headline span { display: block; }
.headline__driving { color: var(--lime); font-weight: 800; }
.headline__innovation { font-style: italic; font-weight: 300; }
.headline__design { margin-top: .35em; font-size: .34em; font-weight: 300; letter-spacing: .28em; color: rgb(255 255 255 / .85); }
.hero__intro { max-width: 44ch; font-size: var(--step-1); line-height: 1.55; color: rgb(255 255 255 / .78); }
.hero__intro strong { color: var(--white); font-weight: 600; }
.award {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 40px; padding: 8px 18px 8px 10px;
  border: 1px solid rgb(255 255 255 / .18); border-radius: 999px;
  background: rgb(255 255 255 / .06); backdrop-filter: blur(6px);
  color: rgb(255 255 255 / .85); font-size: var(--step--1); line-height: 1.35;
}
.award:hover { border-color: var(--lime); color: var(--white); }
.award__icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--black); }
.award__icon svg { width: 15px; height: 15px; }
.award b { color: var(--white); font-weight: 600; }

.scroll-cue { position: absolute; left: 50%; bottom: 40px; width: 35px; height: 35px; translate: -50% 0; }
.scroll-cue::before, .scroll-cue::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lime); animation: pulse 1.6s infinite; }
.scroll-cue::after { animation-delay: .3s; }
.scroll-cue svg { position: absolute; inset: 0; z-index: 1; width: 35px; height: 35px; padding: 12px 10px 9px; border-radius: 50%; background: var(--lime); fill: var(--black); }
@keyframes pulse { from { opacity: .9; } to { opacity: 0; transform: scale(1.7); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::before, .scroll-cue::after { animation: none; opacity: 0; } }
@media (max-width: 600px) { .scroll-cue { display: none; } .hero { padding-bottom: 80px; } }

/* ---------- Logo strip ---------- */
.logos { padding: 40px 0; border-bottom: 1px solid var(--line); }
.logos .container { display: flex; align-items: center; gap: clamp(20px, 4vw, 56px); }
.logos__label { flex: none; margin: 0; font-family: var(--font-label); font-weight: 700; font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.logos ul { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: clamp(16px, 3vw, 40px); }
.logos img { height: 34px; width: auto; filter: grayscale(1); opacity: .45; mix-blend-mode: multiply; transition: opacity .3s; }
.logos img:hover { opacity: 1; }
@media (max-width: 800px) {
  .logos .container { flex-direction: column; align-items: flex-start; }
  .logos ul { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 20px 28px; }
  .logos img { height: 26px; }
}

/* ---------- Section intro ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p { max-width: 38ch; margin: 0; color: var(--muted); }
@media (max-width: 800px) { .section-head { flex-direction: column; align-items: flex-start; } }

/* ---------- Case study template ---------- */
.work { padding-top: var(--section); }
.work .section-head { margin-bottom: 0; }
.case { padding-block: var(--section); }
.case__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.case--flip .case__copy { order: 2; }
.case__brand { height: 40px; width: auto; margin-bottom: 24px; }
.case__copy .title { margin-bottom: 20px; }
.case--band { background: var(--band); --slant-color: var(--white); }
.case--band .tags li { background: var(--white); }
@media (max-width: 900px) {
  .case__grid { grid-template-columns: minmax(0, 1fr); }
  .case--flip .case__copy { order: 0; }
}

/* Chase: phone breaks out of a soft panel — the original's overlap move, made intentional */
.phone-panel {
  position: relative; display: grid; place-items: end center;
  min-height: 460px; margin-top: 120px;
  border-radius: calc(var(--radius) * 1.5);
  background: radial-gradient(120% 90% at 50% 100%, #dff0a8 0%, #eef6d2 40%, var(--band) 75%);
}
.phone-panel img { width: min(320px, 70%); margin-top: -140px; filter: drop-shadow(0 40px 50px rgb(16 40 80 / .35)); }
@media (max-width: 900px) { .phone-panel { margin-top: 140px; min-height: 0; padding-top: 0; }  }

.case__shot { filter: drop-shadow(0 30px 40px rgb(0 0 0 / .18)); }

/* NBC: wide layout, copy in two columns above the showcase image */
.case--wide .case__grid { grid-template-columns: 5fr 6fr; align-items: end; }
@media (max-width: 900px) { .case--wide .case__grid { grid-template-columns: minmax(0, 1fr); } }
.case__screens { width: min(1100px, 100%); margin: clamp(32px, 5vw, 64px) auto 0; }
.case--wide { padding-bottom: clamp(24px, 4vw, 56px); }
.case--wide .brand-mark { width: 52px; margin-bottom: 24px; }

/* ---------- Previously at NBCUniversal ---------- */
.prev { padding-block: var(--section); background: var(--band); --slant-color: var(--white); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 32px); }
.card {
  display: flex; flex-direction: column;
  border-radius: var(--radius); background: var(--white); overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 20px 40px -28px rgb(0 36 100 / .35);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover, .card:focus-within { transform: translateY(-6px); box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 30px 50px -24px rgb(0 36 100 / .45); }
.card__media { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 24px; background: linear-gradient(180deg, #f6f7f8, #eceef0); }
.card__media img { max-height: 100%; width: auto; object-fit: contain; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 28px; }
.card__body .title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); margin-bottom: 10px; }
.card__body p { font-size: .9375rem; }
.card__body .link-arrow { margin-top: auto; padding-top: 8px; }
.card__body .link-arrow::before { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.card { position: relative; }
@media (max-width: 900px) { .cards { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; } }

/* ---------- Footer / About ---------- */
.footer { position: relative; overflow: hidden; padding: var(--section) 0 40px; background: var(--black); color: #c7cacc; }
.footer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer > .container { position: relative; z-index: 1; }
.footer .title { color: var(--white); margin-bottom: 28px; }
.footer__grid { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(40px, 7vw, 112px); }
.footer p { color: #b9bec3; }
.footer a:not(.btn) { color: var(--lime); }
.footer a:not(.btn):hover { color: var(--lime-hover); }
.about__head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.about__avatar { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 3px var(--black), 0 0 0 5px var(--lime); }
.about__head .title { margin: 0; }
.cv dt { margin-top: 22px; font-family: var(--font-label); font-weight: 700; font-size: var(--step--1); letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.cv dd { margin: 6px 0 0; color: var(--white); line-height: 1.5; }
.cv dd span { display: block; color: #9aa1a8; font-size: .9375rem; }
.footer .btn-row { margin-top: 32px; }
.footer .btn--ghost { border-color: rgb(255 255 255 / .35); }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(56px, 8vw, 96px); padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .12); font-size: var(--step--1); color: #8b9198; }
.legal p { margin: 0; color: inherit; }
.social { display: inline-flex; align-items: center; gap: 8px; }
.social svg { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Related project card: Chase Agentic System (homepage + BCJ page) ---------- */
.cs-related { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 5vw, 64px); border-radius: calc(var(--radius) * 1.5);
  background: radial-gradient(ellipse 38% 75% at 85% 50%, rgb(233 207 143 / .26), rgb(233 207 143 / .08) 55%, transparent 100%), #1b1a16;
  border: 1px solid rgb(233 207 143 / .25); color: #c9ccd0; text-decoration: none; transition: border-color .3s, transform .3s, box-shadow .3s; }
.cs-related:hover { border-color: rgb(233 207 143 / .6); transform: translateY(-3px); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
.cs-related .label, .cs-section--dark .cs-related .label { color: #e9cf8f; }
.cs-related .title { margin: 0 0 14px; color: #fff; }
.cs-related .title b { font-weight: inherit; background: linear-gradient(100deg, #e9cf8f, #b58a32 60%, #e9cf8f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cs-related p { max-width: 52ch; }
.cs-related .btn { margin-top: 10px; }
.cs-related .tags li { background: rgb(255 255 255 / .08); color: #e8e4dc; }
.cs-related__shot { width: 170px; padding: 6px; border-radius: 30px; background: #0b0b0b;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .12), 0 30px 50px -20px rgb(0 0 0 / .7), 0 0 70px -10px rgb(233 207 143 / .4); }
.cs-related__shot img { display: block; width: 100%; height: auto; border-radius: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .cs-related__shot { transition: transform .4s var(--ease, ease); }
  .cs-related:hover .cs-related__shot { transform: rotate(-2deg) scale(1.03); }
}
.case .cs-related { margin-top: clamp(40px, 6vw, 72px); }
@media (max-width: 700px) {
  .cs-related { grid-template-columns: minmax(0, 1fr); }
  .cs-related__shot { justify-self: center; width: 150px; }
}
