:root{
  --bg: #0b0c0f;
  --panel: #101218;
  --text: #e8e9ee;
  --muted: #a8acba;
  --line: rgba(255,255,255,.10);
  --accent: rgba(255,255,255,.92);

  --max: 1080px;
  --r: 18px;

  /* sticky header height offset for anchors + layout */
  --header-h: 72px; /* adjust if you change header height */
}

*{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  /* helps anchor jumps respect sticky header in general */
  scroll-padding-top: var(--header-h);
}

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% -10%, rgba(255,255,255,.06), transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(255,255,255,.04), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.5;
}

body.no-scroll{ overflow: hidden; }

a{ color: inherit; text-decoration: none; }
a:hover{ opacity: .9; }

/* subtle "alive" background drift */
body::before{
  content:"";
  position: fixed;
  inset: -20%;
  background: radial-gradient(600px 300px at 20% 20%, rgba(255,255,255,.06), transparent 60%),
              radial-gradient(700px 350px at 80% 30%, rgba(255,255,255,.045), transparent 60%),
              radial-gradient(650px 320px at 50% 80%, rgba(255,255,255,.035), transparent 60%);
  filter: blur(10px);
  opacity: .9;
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift{
  from{ transform: translate3d(-1.2%, -0.8%, 0) scale(1.02); }
  to{ transform: translate3d(1.2%, 0.8%, 0) scale(1.02); }
}

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

/* push content below sticky header */
main.wrap{
  padding-top: var(--header-h);
}

/* ============ Header ============ */
.header{
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  background:
    radial-gradient(
      760px 260px at 32% 45%,
      rgba(35, 120, 255, .92) 0%,
      rgba(20, 105, 255, .90) 28%,
      rgba(10, 85, 235, .86) 52%,
      rgba(8, 70, 210, .82) 72%,
      rgba(6, 55, 185, .84) 100%
    ),
    radial-gradient(
      140% 120% at 50% 50%,
      rgba(0,0,0,0) 50%,
      rgba(0,0,0,.22) 100%
    );

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid rgba(255,255,255,.12);
}

.header::before{
  content:"";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.10);
  pointer-events: none;
}

.header__inner{
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
}

.header .wrap{
  padding-top: 0;
  padding-bottom: 0;
  height: var(--header-h);
  display: grid;
  align-items: center;
}

.header__left{
  justify-self: start;
}

.knife{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.knife img{
  width: 56px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
  transform: translateY(2px);
}

.knife {
  cursor: crosshair;
}

.knife:active {
  cursor: grabbing;
}

/* Knife button reset (prevents white button box) */
button.knife{
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

button.knife:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 4px;
  border-radius: 12px;
}

.nav{
  justify-self: end;
}

.brand{
  display: flex;
  align-items: center;
  height: 56px;
}

.brand--portrait img{
  height: 56px;
  width: auto;
}

.brand--center{
  justify-self: center;
  transform: translateY(1px);
}

.nav{
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
}

.nav a{
  padding: 8px 10px;
  border-radius: 10px;
}

.nav a:hover{
  background: rgba(255,255,255,.04);
  color: var(--text);
}

/* ============ Hero ============ */
.hero{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  padding-top: 0px;
}

h1{
  margin: 0 0 8px 0;
  font-size: 44px;
  letter-spacing: -0.02em;
}

.subhead{
  margin: 0 0 18px 0;
  color: var(--muted);
  font-size: 16px;
}
.tagline{
  margin-top: 6px;
  color: rgba(255,255,255,.82);
  font-weight: 600;
}
.lead{
  margin: 0 0 18px 0;
  color: rgba(232,233,238,.92);
  font-size: 16px;
  max-width: 52ch;
}

.cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

.meta{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.meta a{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.btn--ghost{ background: transparent; }

.btn--small{
  padding: 8px 12px;
  font-size: 13px;
}

.hero__video{
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
}

.video{
  position: relative;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.open-video::after{
  content: "↗";
  margin-left: 6px;
  opacity: .5;
  font-size: .9em;
}

.caption{
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--muted);
}

/* ============ Strip / Logos ============ */
.strip{
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 16px 24px;
  background: rgba(255,255,255,.03);
  display: grid;
  gap: 6px;
}

.strip__label{
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.strip__items{
  margin: 0;
  font-size: 14px;
  color: rgba(232,233,238,.9);
}

.strip--logos{
  display: grid;
  gap: 14px;
}

.logos{
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.logos img{
  height: 30px;
  width: auto;
  margin: 0 auto;          /* centers each logo in its cell */
  opacity: .92;
  filter: invert(1) brightness(1.15);
  transition: opacity .2s ease;
}
/* Mobile logo strip fix */
@media (max-width: 768px) {
  .logos {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 20px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .logos::-webkit-scrollbar {
    display: none; /* hides scrollbar on iOS */
  }

  .logos img {
    flex: 0 0 auto;
  }
}


.logos img:hover{ opacity: 1; }

/* ============ Sections ============ */
.section{
  margin-top: 28px;
  padding-top: 12px;
  scroll-margin-top: var(--header-h);
}

.section__head{
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

h2{
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.section__head p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* top anchor helper */
.top-anchor{
  scroll-margin-top: var(--header-h);
}

/* ============ Work Grid / Cards ============ */
.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--r);
  padding: 14px 14px 16px;
  display: grid;
  gap: 8px;
  min-height: 140px;
}

.card:hover{ background: rgba(255,255,255,.05); }

.card__top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.watch-thumb{
  width: 100%;
  height: 72px;          /* small */
  object-fit: cover;
  border-radius: 10px;
  margin: 10px 0 10px;
  opacity: .9;
}

.tag{
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.03);
}

.card h3{
  margin: 0;
  font-size: 15px;
  line-height: 1.15; /* add */
}

.card p{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35; /* add */
}

/* tighten space between title + description */
.card h3 + p{
  margin-top: 0px;
}

button.card{
  color: var(--text);
  font: inherit;
  text-align: left;
}

button.card p{
  color: var(--muted);
}

.watch-more{
  margin: 48px 0 18px;
  text-align: center;
}

.watch-more__rule{
  border: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,.25),
    transparent
  );
  margin-bottom: 10px;
}

.watch-more__label{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(232,233,238,.6);
}

.watch-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 18px;
}

/* Responsive */
@media (max-width: 900px){
  .watch-grid{
    grid-template-columns: 1fr;
  }
}

/* ============ Flip Cards (in-grid) ============ */
.flip-card{
  perspective: 1200px;
  cursor: pointer;
}

.flip-card__inner{
  position: relative;
  min-height: 160px;
  transform-style: preserve-3d;
  transition: transform .55s ease;
}

.flip-card.is-flipped .flip-card__inner{
  transform: rotateY(180deg);
}

.flip-card__face{
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--r);
  padding: 14px 14px 16px;
  display: grid;
  gap: 8px;
  height: 100%;
}

.flip-card__front{ position: relative; }

.flip-card__back{
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  background: rgba(255,255,255,.04);
}

.flip-hint{
  margin-top: 6px;
  color: rgba(232,233,238,.65);
  font-size: 12px;
}

/* Deep Dives: tighten title → description gap */
.flip-card__front h3 {
  margin-bottom: 10px; /* adjust */
}

.flip-card__front h3 + p {
  margin-top: 0;       /* removes the default p top margin */
}

.back__top{
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.flip-close{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  line-height: 32px;
  font-size: 18px;
  cursor: pointer;
}

.back__body p{
  margin: 0;
  color: rgba(232,233,238,.9);
  font-size: 13px;
}

.back__links{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.back__links a{
  text-decoration: underline;
  text-underline-offset: 3px;
}



.dot{ padding: 0 8px; }




/* ============ Two-column blocks / prose / quote ============ */
.two{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
}

.prose{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--r);
  padding: 16px;
  color: rgba(232,233,238,.92);
}

.prose p{ margin: 0 0 10px; }
.prose p:last-child{ margin-bottom: 0; }

.quote{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  border-radius: var(--r);
  padding: 16px;
}

.quote__text{
  margin: 0 0 10px;
  font-size: 16px;
}

.quote__by{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.quote__hint{
  margin: 10px 0 0;
  color: rgba(168,172,186,.7);
  font-size: 12px;
}

/* ============ Contact ============ */
.section--contact{ padding-bottom: 44px; }

.contact{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.fine{
  margin: 18px 0 0;
  font-size: 12px;
  color: rgba(168,172,186,.8);
}

/* =========================
   Case Study Overlay
   ========================= */
#card-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#card-overlay[hidden]{ display: none; }

.card-overlay__scrim{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  /* removed backdrop-filter for memory stability */
}

.card-overlay__content{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 28px));
  height: min(78vh, 720px);

  border-radius: var(--r);
  overflow: hidden;
  background: rgba(12, 14, 20, .92);
  border: 1px solid rgba(255,255,255,.12);

  will-change: transform, opacity;
}
/* Overlay layout */
.back__grid{
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 860px){
  .back__grid{ grid-template-columns: 1fr; }
}

.video-overlay__content{
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 1200px);
  aspect-ratio: 16 / 9;
}

.video-overlay__content iframe{
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* Media panel */
.back__media{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
}
.back__media img,
.back__media video{
  width: 100%;
  height: auto;
  display: block;
}

/* Facts row */
.facts{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 860px){
  .facts{ grid-template-columns: 1fr; }
}

.fact{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 12px;
  padding: 10px 12px;
}

.fact .k{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(232,233,238,.60);
  margin-bottom: 6px;
}

.fact .v{
  color: rgba(232,233,238,.92);
  line-height: 1.35;
}

/* Content sections */
.back__content .section{
  margin-top: 14px;
}
.back__content h4{
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: rgba(232,233,238,.70);
}
.back__content p{
  margin: 0 0 10px;
  color: rgba(232,233,238,.88);
}

/* Quote styling */
figure.quote{
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 12px 14px;
}
figure.quote blockquote{
  margin: 0;
  color: rgba(232,233,238,.92);
}
figure.quote figcaption{
  margin-top: 10px;
  color: rgba(232,233,238,.65);
  font-size: 13px;
}
/* Reel mode uses the same overlay, different sizing */
#card-overlay.is-reel .card-overlay__content{
  width: min(1100px, calc(100vw - 28px));
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(255,255,255,.12);
}

/* Make iframe fill the panel */
#card-overlay.is-reel iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* When the back face is shown in the overlay, it must not be rotated/hidden */
#card-overlay .flip-card__back{
  position: relative;
  inset: auto;
  transform: none;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  height: 100%;
  overflow: auto;
  border-radius: var(--r);
}

/* ============ Responsive ============ */
@media (max-width: 920px){
  .hero{ grid-template-columns: 1fr; }
  h1{ font-size: 38px; }
  .grid{ grid-template-columns: 1fr; }
  .two{ grid-template-columns: 1fr; }
}

@media (max-width: 540px){
  /* keep the logo truly centered */
  .header__inner{ grid-template-columns: auto 1fr auto; }

  .brand--center{
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(1px);
    z-index: 2;
  }

  /* prevent overlap: simplify nav on mobile */
  .nav{ z-index: 3; gap: 8px; }

  .nav a:not(.btn){
    display: none; /* hides Work / Watch on mobile */
  }

  .nav .btn{
    padding: 8px 10px;
    font-size: 13px;
  }
}