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

/* overflow-x:hidden on body alone doesn't hold on mobile - the browser widens
   the layout viewport to fit overflowing content and the page pans anyway.
   `clip` on both makes the overflow non-scrollable, so nothing widens. */
html {
  overflow-x: clip;
}

body {
  background-color: #111111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;        /* stack sections one below the other */
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: clip;
  position: relative;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 4vw, 2.5rem);
  color: #f0f0f0;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

/* Frosted scrim behind the header so text underneath doesn't clash when the
   bar reappears. Blur + gradient fade to transparent (masked) - no hard edge. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(17, 17, 17, 0.6), rgba(17, 17, 17, 0));
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  pointer-events: none;
}

.site-header.is-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

.site-header__name {
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

.site-header__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #f0f0f0;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-header__link::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #01e2fd;
  box-shadow: 0 0 12px rgba(1, 226, 253, 0.55);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover is pointer-gated: on touch, :hover latches after a tap and stays lit
   until you tap elsewhere. Touch gets .is-tapped instead - the same lit state,
   flashed once by header.js and then released. */
@media (hover: hover) and (pointer: fine) {
  .site-header__link:hover {
    color: #01e2fd;
  }

  .site-header__link:hover::before {
    transform: scaleX(1);
  }
}

.site-header__link.is-tapped {
  color: #01e2fd;
}

.site-header__link.is-tapped::before {
  transform: scaleX(1);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 3vw, 2rem);
}

/* Connect + LinkedIn "in" mark */
.site-header__link--in {
  gap: 0.4rem;
}

.site-header__in {
  display: block;
  flex: none;
}

/* Email copy button - flips to "Copied!!!" on click */
.site-header__copy {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  perspective: 500px;
}

.site-header__flip {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header__face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  white-space: nowrap;
}

.site-header__face--back {
  transform: rotateX(180deg);
  color: #01e2fd;
}

.site-header__copy.is-copied .site-header__flip {
  transform: rotateX(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .site-header__flip {
    transition: none;
  }
}

/* The copy button's own underline would sit under the flipping text - hide it
   while the "Copied!!!" face is showing. */
.site-header__copy.is-copied::before {
  transform: scaleX(0);
}

/* Tight screens keep the same items as desktop - "Connect" included - so the
   gaps scale with the viewport to make all four fit at one flat type size.
   Scoped to `.site-header`, since the case pages reuse these link classes
   inside `.case-nav`, which is sized separately further down. */
@media (max-width: 640px) {
  .site-header {
    padding-left: clamp(0.6rem, 3vw, 1rem);
    padding-right: clamp(0.6rem, 3vw, 1rem);
    gap: clamp(0.4rem, 2vw, 0.75rem);
  }

  .site-header__name {
    font-size: 0.72rem;
  }

  .site-header__nav {
    gap: clamp(0.45rem, 2.4vw, 0.75rem);
  }

  .site-header .site-header__link {
    font-size: 0.72rem;
  }

  .site-header__link--in {
    gap: 0.3rem;
  }

  .site-header__in {
    width: clamp(12px, 3.6vw, 16px);
    height: clamp(12px, 3.6vw, 16px);
  }
}

/* Fixed header would otherwise cover the Work heading on anchor jump. */
#work {
  scroll-margin-top: 5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#bg-canvas.visible {
  opacity: 1;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;              /* own full-height centered block, now that body no longer centers it */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 100%;
  max-width: 1295px;
  padding: 0 1rem;
}

.hero__line {
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 6rem);
  color: #f0f0f0;
  text-align: center;
  line-height: 1.0;
  margin: 0;
  margin-bottom: 16px;
}

.hero__box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0;
}

.hero__brand {
  font-weight: 700;
  font-size: clamp(2.5rem, 10vw, 7.5rem);
  text-align: center;
  line-height: 1.1;
}

.hero__brand-link {
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
}

@media (hover: hover) and (pointer: fine) {
  body:not(.case-page) {
    cursor: none;
  }

  a,
  button {
    cursor: pointer;
  }
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-100px, -100px); /* off-screen until the first mousemove */
  will-change: transform;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  #custom-cursor {
    display: block;
  }
}

#custom-cursor svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* Hover bubble (disabled - hover now uses normal pointer cursor)
#custom-cursor__bubble {
  position: absolute;
  left: 14px;
  top: 20px;
  white-space: nowrap;
  background: #01e2fd;
  color: #111111;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 4px 14px 14px 14px;
  opacity: 0;
  transform: translate(-4px, 2px) scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#custom-cursor.is-hover #custom-cursor__bubble {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}
*/

.hero__brand-word {
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px #f0f0f0;
  text-decoration: none;
  transition: -webkit-text-stroke-color 0.6s ease;
}

.hero__brand-word::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 125%;
  background-image: linear-gradient(to right, #01e2fd 0%, #ffffff 97.6%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0px transparent;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

/* Reveal gradient fill on mobile/tablet after delay */
@media (max-width: 1023px) {
  .hero__brand.fill .hero__brand-word {
    -webkit-text-stroke-color: transparent;
  }

  .hero__brand.fill .hero__brand-word::after {
    opacity: 1;
  }
}

/* Reveal gradient fill on hover (desktop/tablet pointer) */
@media (hover: hover) and (min-width: 1024px) {
  .hero__brand:hover .hero__brand-word,
  .hero__brand:focus-within .hero__brand-word {
    -webkit-text-stroke-color: transparent;
  }

  .hero__brand:hover .hero__brand-word::after,
  .hero__brand:focus-within .hero__brand-word::after {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bg-canvas {
    transition: none;
  }

  .hero__brand .hero__brand-word {
    -webkit-text-stroke-color: transparent;
  }

  .hero__brand .hero__brand-word::after {
    opacity: 1;
  }
}

/* ==========================================================================
   Shared tokens for the new sections
   ========================================================================== */
:root {
  --accent: #01e2fd;
  --ink: #f0f0f0;
  --ink-dim: #9a9a9a;
  --ink-faint: #6b6b6b;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --edge: rgba(255, 255, 255, 0.08);
  --edge-strong: rgba(255, 255, 255, 0.16);
  --danger: #BA0A00;
  /* Same amber the Parentalview case study already uses for its accents */
  --warn: #ffb24d;
}

::selection {
  background: var(--accent);
  color: #111;
}

/* Big outlined section headings (same treatment as the hero brand idle state) */
.section-title {
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section-title__dot {
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
}

/* Scroll hint on the hero */
.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-faint);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.hero__scroll-hint-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  display: block;
}

/* ==========================================================================
   Work / case studies
   ========================================================================== */
.work {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.work__inner,
.hobby__inner,
.cta__inner {
  width: 100%;
  max-width: 1295px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.work__layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Switcher tabs */
.work__switch {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cs-tab {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 72px;
  padding: 1rem 1.1rem;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

/* Bottom stroke that grows out from the centre on hover / active */
.cs-tab::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(1, 226, 253, 0.55);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-tab:hover::before,
.cs-tab.is-active::before {
  transform: scaleX(1);
}

.cs-tab__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--edge);
}

.cs-tab__icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.cs-tab__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.cs-tab__meta strong {
  font-size: 1rem;
  font-weight: 700;
}

.cs-tab__meta small {
  font-size: 0.8rem;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-tab__arrow {
  margin-left: auto;
  color: var(--ink-faint);
  transition: transform 0.3s ease, color 0.3s ease;
}

.cs-tab:hover .cs-tab__arrow,
.cs-tab.is-active .cs-tab__arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* Detail panels */
.work__detail {
  min-width: 0;
}

.cs-panel {
  display: none;
}

.cs-panel.is-active {
  display: block;
}

.cs-panel__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cs-panel__title {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
}

.cs-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.cs-badge--shipped {
  color: #7ef29a;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
}

.cs-badge--live {
  color: #ffc46b;
  background: rgba(255, 178, 77, 0.1);
  border: 1px solid rgba(255, 178, 77, 0.35);
}

.cs-panel__desc {
  color: var(--ink-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.65;
  max-width: 62ch;
  margin-bottom: 1.6rem;
}

/* Meta cards */
.cs-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.cs-meta__card {  
  border-radius: 12px;
  padding: 0.9rem 0rem; 
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cs-meta__card small {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

.cs-meta__card strong {
  font-size: 1.05rem;
  color: var(--ink);
}

/* Carousel */
.cs-carousel {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 1rem;
  margin-bottom: 1.6rem;
}

.cs-carousel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.3rem 0.9rem;
}

.cs-carousel__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

.cs-carousel__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cs-carousel__count {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-right: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.cs-carousel__count b {
  color: var(--ink);
}

.cs-carousel__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--edge-strong);
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.cs-carousel__btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

.cs-carousel__window {
  overflow: hidden;
  border-radius: 12px;
}

.cs-carousel__track {
  display: flex;
  will-change: transform;
}

.cs-slide {
  flex: 0 0 100%;
  min-width: 0;
  align-self: flex-start;
}

.cs-slide img {
  display: block;
  width: 100%;
  height: auto;
}

/* Named screen slide - caption sits under the image, never over the UI */
.cs-slide__name {
  padding: 0.7rem 0.2rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Carousel used as a full-width case-study figure.
   Screens ship at mixed aspect ratios (2-up composites and single views), so every
   image is contained in one shared frame - equal slide height, no cropping.
   Set --frame per carousel to the widest screen's ratio. */
.cs-carousel--figure {
  --frame: 2920 / 1024;
  margin: clamp(2rem, 5vw, 3rem) 0;
}

.cs-carousel--figure .cs-slide img {
  aspect-ratio: var(--frame-mobile, var(--frame));
  object-fit: contain;
}

/* The window's own radius clips the image corners - square screens, square clip. */
.cs-carousel--figure .cs-carousel__window {
  border-radius: 0;
}

@media (min-width: 768px) {
  .cs-carousel--figure .cs-slide img {
    aspect-ratio: var(--frame);
  }
}

.cs-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  padding-top: 0.8rem;
}

.cs-carousel__dot {
  width: 44px;
  height: 44px;
  margin: -14px 0;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
}

.cs-carousel__dot::after {
  content: '';
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--edge-strong);
  transition: background 0.3s ease, width 0.3s ease;
}

.cs-carousel__dot.is-active::after {
  background: var(--accent);
  width: 34px;
}

/* ==========================================================================
   Product stage - real surfaces layered at their true form factor.
   Placement is per variant/role below; --ar is each asset's own ratio, so
   nothing is ever letterboxed or cropped.
   ========================================================================== */
.cs-stage {
  position: relative;
  aspect-ratio: var(--sar, 16 / 10);
  margin-bottom: 1.6rem;
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: clamp(0.8rem, 3vw, 1.8rem);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% 8%, var(--glow, rgba(1, 226, 253, 0.16)), transparent 55%),
    linear-gradient(150deg, #202020 0%, #161616 60%, #131313 100%);
}

.cs-stage--si { --sar: 16 / 9.5; }
.cs-stage--pv { --glow: rgba(255, 178, 77, 0.16); }

/* Faint grid so the surfaces read as sitting on something, not floating */
.cs-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.cs-stage__layer {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: var(--ar);
  border: 1px solid var(--edge-strong);
  border-radius: var(--r, 10px);
  overflow: hidden;
  background: #0d0d0d;
  box-shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.85);
  transition: opacity 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

.cs-stage__layer--desk { z-index: 1; }
.cs-stage__layer--tab { z-index: 2; }
.cs-stage__layer--phone { z-index: 3; --r: 14px; }

/* Placement - mobile first (two surfaces, big enough to read) */
.cs-stage--si { --sar: 4 / 3.1; }
.cs-stage--pv { --sar: 4 / 3; }

.cs-stage--si .cs-stage__layer--desk { --w: 96%; --x: 0%; --y: 4%; --ar: 1440 / 784; }
.cs-stage--si .cs-stage__layer--phone { --w: 30%; --x: 66%; --y: 14%; --ar: 328 / 720; }

.cs-stage--pv .cs-stage__layer--desk { --w: 94%; --x: 0%; --y: 4%; --ar: 1448 / 1032; }
.cs-stage--pv .cs-stage__layer--phone { --w: 30%; --x: 68%; --y: 10%; --ar: 360 / 800; }
/* The bus tablet is the one that goes unreadable on a phone - it returns at 768. */
.cs-stage--pv .cs-stage__layer--tab { display: none; }

@media (min-width: 768px) {
  .cs-stage--si { --sar: 16 / 9.5; }
  .cs-stage--pv { --sar: 16 / 10; }

  .cs-stage--si .cs-stage__layer--desk { --w: 88%; --x: 0%; --y: 4%; }
  .cs-stage--si .cs-stage__layer--phone { --w: 22%; --x: 76%; --y: 16%; }

  .cs-stage--pv .cs-stage__layer--desk { --w: 78%; --x: 0%; --y: 3%; }
  .cs-stage--pv .cs-stage__layer--tab { display: block; --w: 46%; --x: 30%; --y: 47%; --ar: 1133 / 744; }
  .cs-stage--pv .cs-stage__layer--phone { --w: 19%; --x: 79%; --y: 22%; }
}

.cs-stage__layer img,
.cs-stage__layer video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Name chip - always readable on touch, hover-gated on pointer devices */
.cs-stage__tag {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(17, 17, 17, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--edge-strong);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

@media (max-width: 640px) {
  .cs-stage__tag {
    font-size: 0.6rem;
    padding: 0.22rem 0.45rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .cs-stage__tag {
    opacity: 0;
    transform: translateY(6px);
  }

  .cs-stage__layer:hover .cs-stage__tag {
    opacity: 1;
    transform: translateY(0);
  }

  /* Singling out one surface dims the rest of the system behind it */
  .cs-stage.is-focused .cs-stage__layer { opacity: 0.4; }

  .cs-stage.is-focused .cs-stage__layer.is-focus {
    opacity: 1;
    border-color: var(--accent);
    z-index: 4;
  }

  .cs-stage--pv.is-focused .cs-stage__layer.is-focus { border-color: var(--warn); }
}

/* Read more */
.cs-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--edge-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.cs-readmore:hover {
  border-color: var(--accent);
  background: rgba(1, 226, 253, 0.08);
}

.cs-readmore__arrow {
  transition: transform 0.3s ease;
}

.cs-readmore:hover .cs-readmore__arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Hobby projects
   ========================================================================== */
.hobby {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.hobby__sub {
  color: var(--ink-dim);
  margin: -1.5rem 0 2.5rem;
  font-size: 1rem;
}

.hobby__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.hobby-card {
  position: relative;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--edge);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  min-height: 320px;
  transition: border-color 0.35s ease;
}

.hobby-card:hover {
  border-color: rgba(1, 226, 253, 0.4);
}

.hobby-card--soon:hover {
  border-color: var(--edge-strong);
}

/* 3D globe embed - anchored to the card's bottom-right corner, only its
   top-left quarter peeks in (the rest overflows and is clipped by the card). */
.hobby-card__globe {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(600px, 150%, 850px);
  aspect-ratio: 1 / 1;
  transform: translate(50%, 50%);
  pointer-events: auto; /* engine needs pointer events to fire the supernova on hover */
  cursor: pointer !important; /* hand pointer over the model; beats engine's inline 'grab' */
  z-index: 0;
}

.hobby-card__globe canvas {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
}

/* Dim the globe on tablet/mobile so it reads as a subtle backdrop.
   pointer:coarse catches touch devices even in landscape (wide tablets). */
@media (max-width: 1023px), (pointer: coarse) {
  .hobby-card__globe {
    opacity: 0.3;
  }
}

.hobby-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: clamp(1.4rem, 3.5vw, 2.2rem);
  height: 100%;
  min-height: 320px;
  /* Let hover pass through to the globe canvas beneath; links opt back in below */
  pointer-events: none;
}

.hobby-card__body a,
.hobby-card__body button {
  pointer-events: auto;
}

.hobby-card__index {
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
}

.hobby-card__title {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hobby-card__desc {
  color: var(--ink-dim);
  line-height: 1.65;
  font-size: 0.93rem;
  max-width: 46ch;
}

.hobby-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.hobby-card__tags span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--edge-strong);
  color: var(--ink-dim);
}

.hobby-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 0.9rem;
}

.hobby-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  transition: opacity 0.2s ease;
}

.hobby-card__actions .hobby-card__link:last-child {
  color: var(--ink-dim);
}

.hobby-card__link:hover {
  opacity: 0.7;
}

.hobby-card__link--soon {
  color: var(--ink-faint);
}

.hobby-card--soon {
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 255, 255, 0.018) 14px 28px),
    var(--surface);
}

/* ==========================================================================
   OpenFlow teaser card
   The right half is a looping mock of the product itself, assembled from the
   OpenFlow Design System's own components (KeyCap, DictationHUD, WaveBars,
   TranscriptCard). Class names + token values are kept from that system so the
   card is recognisably OpenFlow; only surfaces are retuned for this dark page.
   ========================================================================== */
:root {
  --of-coral: #ff5a32;
  --of-coral-600: #e5431e;
  --of-mint-200: #a8e9ce;
  --of-butter: #f5c21b;
  --of-ink-900: #1b1917;
  --of-ink-800: #2a2622;
}

.hobby-card__title-accent {
  color: var(--of-coral-600);
}

/* This card has two flow children (body + demo stage), so it can't inherit the
   single-child assumption baked into .hobby-card__body (height:100%). */
.hobby-card--openflow {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hobby-card--openflow .of-body {
  height: auto;
  min-height: 0;
}

.hobby-card--openflow .hobby-card__tags {
  margin-top: 1rem;
}

.of-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0 clamp(1.4rem, 3.5vw, 2.2rem) clamp(1.4rem, 3.5vw, 2.2rem);
  pointer-events: none;
}

.of-stage__step--key {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.of-stage__caption {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- KeyCap (of-keycap) ---------- */
.of-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.of-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: none;
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  background: var(--of-ink-800);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2px 0 #000;
  animation: of-key-press 4s ease-in-out infinite;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

@keyframes of-key-press {
  0%, 8%, 100% { transform: translateY(0); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2px 0 #000; }
  14%, 62% { transform: translateY(2px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 #000; }
  70% { transform: translateY(0); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2px 0 #000; }
}

/* Lit state: hover/focus the cap, or hold any key while the card is on screen.
   The ambient loop is switched off so it can't fight the glow's box-shadow. */
.of-keycap:hover,
.of-keycap:focus-visible,
.of-stage.is-held .of-keycap {
  animation: none;
  transform: translateY(2px);
  background: var(--of-coral-600);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 4px rgba(229, 67, 30, 0.22),
    0 0 22px 4px rgba(255, 90, 50, 0.55);
}

.of-keycap:focus-visible {
  outline: none;
}

/* Keep the cap visually 30px but give it a 44px touch target. */
.of-keycap {
  position: relative;
}

.of-keycap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: 44px;
  transform: translate(-50%, -50%);
}

/* The "hold" caption lights up only while a key is actually down - never on
   hover - so the label reads as a live state, not a hover affordance. */
.of-stage__caption {
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.of-stage.is-held .of-stage__caption {
  color: var(--of-coral);
  text-shadow: 0 0 12px rgba(255, 90, 50, 0.75);
}

.of-stage.is-held .of-wave--active .of-wave__bar {
  background: var(--of-coral);
}

/* Don't let a press-and-hold turn into a text selection or a long-press menu. */
.of-keycap {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* ---------- DictationHUD (of-hud) ---------- */
.of-hud {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--of-ink-900);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  white-space: nowrap;
}

.of-hud__label {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.of-hud__meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* ---------- WaveBars (of-wave) ---------- */
.of-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.of-wave__bar {
  width: 3px;
  height: 40%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

/* Varied base heights, mirroring the seeded heights() in the DS WaveBars component. */
.of-wave__bar:nth-child(6n+1) { height: 35%; }
.of-wave__bar:nth-child(6n+2) { height: 72%; }
.of-wave__bar:nth-child(6n+3) { height: 48%; }
.of-wave__bar:nth-child(6n+4) { height: 95%; }
.of-wave__bar:nth-child(6n+5) { height: 58%; }
.of-wave__bar:nth-child(6n)   { height: 30%; }

.of-wave--active .of-wave__bar {
  background: var(--of-mint-200);
  animation: of-wave 900ms ease-in-out infinite;
}

/* Stagger the bars so the waveform ripples instead of pulsing as one block. */
.of-wave__bar:nth-child(3n)   { animation-delay: 120ms; }
.of-wave__bar:nth-child(3n+1) { animation-delay: 260ms; }
.of-wave__bar:nth-child(4n)   { animation-delay: 400ms; }
.of-wave__bar:nth-child(5n)   { animation-delay: 60ms; }

@keyframes of-wave {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

/* ---------- TranscriptCard (of-transcript) ----------
   Two stacked lines crossfade: the raw dictation gets struck through and the
   cleaned-up sentence takes its place - the product's whole promise in one loop. */
.of-transcript {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-width: 340px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.of-transcript__head {
  display: flex;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.of-transcript__app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.of-transcript__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--of-coral);
}

.of-transcript__text {
  position: relative;
  display: block;
  min-height: 2.6em;
  font-size: 0.88rem;
  line-height: 1.45;
}

.of-transcript__raw,
.of-transcript__clean {
  display: block;
}

.of-transcript__raw {
  color: var(--ink-faint);
  animation: of-raw 4s ease-in-out infinite;
}

.of-transcript__clean {
  position: absolute;
  inset: 0;
  color: var(--ink);
  font-weight: 600;
  animation: of-clean 4s ease-in-out infinite;
}

@keyframes of-raw {
  0%, 55% { opacity: 1; text-decoration: none; }
  70%, 92% { opacity: 0; text-decoration: line-through; }
  100% { opacity: 1; }
}

@keyframes of-clean {
  0%, 60% { opacity: 0; transform: translateY(4px); }
  75%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .of-keycap,
  .of-wave--active .of-wave__bar,
  .of-transcript__raw,
  .of-transcript__clean,
  .hobby-card__soon-dot {
    animation: none;
  }

  .of-transcript__raw { opacity: 0; }
  .of-transcript__clean { opacity: 1; transform: none; }
}

.hobby-card__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hobby-card__soon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(245, 194, 27, 0.14);
  color: #f5c21b; /* OpenFlow butter - "paused" status token */
}

.hobby-card__soon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5c21b;
  animation: hobby-soon-pulse 2.4s ease-in-out infinite;
}

@keyframes hobby-soon-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

@media (min-width: 768px) {
  .hobby-card--openflow {
    grid-column: 1 / -1;
    min-height: 220px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }

  .hobby-card--openflow .of-body {
    min-height: 0;
  }

  .of-stage {
    padding: clamp(1.4rem, 3.5vw, 2.2rem);
    padding-left: 0;
  }
}

/* ==========================================================================
   CTA footer
   ========================================================================== */
.cta {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta__line {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--edge-strong) 20%, var(--accent) 50%, var(--edge-strong) 80%, transparent);
  transform-origin: center;
  margin-bottom: clamp(2.5rem, 7vw, 5rem);
}

.cta__kicker {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  margin-bottom: 1.2rem;
}

.cta__email {
  font-size: clamp(1.9rem, 7.5vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  position: relative;
  display: inline-block;
  transition: -webkit-text-stroke-color 0.5s ease;
  word-break: break-all;
  cursor: pointer;
}

.cta__email::after {
  content: attr(href);
  content: 'hi@uxaniket.me';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  background-image: linear-gradient(to right, #01e2fd 0%, #ffffff 97.6%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0px transparent;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.cta__email:hover {
  -webkit-text-stroke-color: transparent;
}

.cta__email:hover::after {
  opacity: 1;
}

/* Gradient fill state - mobile/tablet auto-reveal + pill-hover on desktop */
.cta__email.fill {
  -webkit-text-stroke-color: transparent;
}

.cta__email.fill::after {
  opacity: 1;
}

/* Copy-to-clipboard feedback - slides idle → hover → copied (mirrors mdw-email-copy) */
.cta__copy {
  display: inline-block;
  margin: 1.4rem 0;
  padding: 0.35rem 1rem;
  border: 1px solid var(--ink-faint, rgba(255, 255, 255, 0.2));
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cta__copy,
.cta__copy * {
  cursor: pointer;
}

.cta__copy-window {
  height: 22px;
  overflow: hidden;
}

.cta__copy-line {
  display: block;
  height: 22px;
  line-height: 22px;
  transition: transform 0.2s ease-in-out;
}

.cta__copy.copy .cta__copy-line {
  transform: translateY(-100%);
}

.cta__copy.copied .cta__copy-line {
  transform: translateY(-200%);
}

.cta__foot {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

.cta__made {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.4rem;
}

.cta__made-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  border-radius: 4px;
}

.cta__made-icon--claude {
  width: 32px;
  height: 32px;
}

.cta__made-icon--jump {
  animation: cta-jump 1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes cta-jump {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  30% { transform: translateY(0) scale(1.08, 0.9); }
  55% { transform: translateY(-9px) scale(0.95, 1.05); }
  80% { transform: translateY(0) scale(1.05, 0.95); }
}

.cta__made-run {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  animation: cta-run 0.5s steps(1) infinite;
}

@keyframes cta-run {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 768px) {
  .cs-meta {
    grid-template-columns: repeat(3, 1fr);
  }

  .hobby__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .work__layout {
    flex-direction: row;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: flex-start;
  }

  .work__switch {
    flex: 0 0 320px;
    position: sticky;
    top: 6rem;
  }

  .work__detail {
    flex: 1;
    border-left: 1px solid var(--edge);
    padding-left: clamp(2.5rem, 4vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-hint-line {
    animation: none;
  }
}

/* ==========================================================================
   Full case-study pages (pages/*.html)
   ========================================================================== */
.case-page {
  display: block;
}

/* Pre-hide everything the intro animation is about to hide, before first paint.
   GSAP loads from a CDN at the end of <body>, so hiding these in JS only happens
   after the browser has already painted them - the flash. `.reveal-init` is set
   by an inline head script and cleared by initReveals (or a 3s timeout), so the
   page still shows if JS is off, GSAP fails, or reduced motion is on. */
.reveal-init .case-page [data-reveal],
.reveal-init .case-page [data-reveal-stagger],
.reveal-init .case-page .case-hero > *:not([data-title]),
.reveal-init .case-page .cs-badge {
  visibility: hidden;
}

.case-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--edge);
}

.case-nav__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.case-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  transition: color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .case-nav a:hover {
    color: var(--accent);
  }
}

/* The copy button is a <button>, so `.case-nav a` doesn't dim it - match it to
   the links it sits beside. Font-size too, since `.case-nav a` sets its own. */
.case-nav .site-header__copy {
  color: var(--ink-dim);
  font-size: 0.88rem;
}

/* ...but that dimming also outranks `.site-header__link:hover`, so restate the
   lit state here or the button is the only thing in the nav that never lights up. */
@media (hover: hover) and (pointer: fine) {
  .case-nav .site-header__copy:hover {
    color: var(--accent);
  }
}

.case-nav .site-header__copy.is-tapped,
.case-nav a.is-tapped {
  color: var(--accent);
}

/* Tight screens: shrink the case-page bar the way the home header shrinks, so
   "Back to work" stays on one line beside the email and Connect. Declared here
   rather than in the header's own @640 block because it shares the specificity
   of the base sizes above and has to come after them to win. */
@media (max-width: 640px) {
  .case-nav__inner {
    padding-left: clamp(0.6rem, 3vw, 1rem);
    padding-right: clamp(0.6rem, 3vw, 1rem);
    gap: clamp(0.5rem, 2.5vw, 1rem);
  }

  /* `.case-nav a` already covers the Connect link; the copy button is a
     <button>, so it needs naming separately. */
  .case-nav a,
  .case-nav .site-header__copy {
    font-size: clamp(0.62rem, 2.7vw, 0.88rem);
  }
}

.case-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem);
}

.case-hero__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.case-hero__head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.case-hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.case-hero__lede {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 2.2rem;
}

.case-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem);
}

.case-body section {
  margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
}

.case-body h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.case-body p {
  color: var(--ink-dim);
  line-height: 1.75;
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.case-body strong {
  color: var(--ink);
}

.case-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.25s ease;
}

.case-body a:hover {
  opacity: 0.75;
}

.case-body ul {
  list-style: none;
  margin: 0.4rem 0 0.9rem;
}

.case-body li {
  color: var(--ink-dim);
  line-height: 1.7;
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.case-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 2px;
  background: var(--accent);
}

/* Full-width placeholder figures - swap for real imagery */
.case-figure {
  aspect-ratio: 16 / 8;
  border-radius: 16px;
  border: 1px solid var(--edge);
  margin: clamp(2rem, 5vw, 3rem) 0;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(1, 226, 253, 0.12), transparent 55%),
    linear-gradient(150deg, #1e1e1e 0%, #151515 100%);
}

/* Figure holding real media - box sizes to the video, 24px inset all round */
.case-figure--media {
  display: block;
  aspect-ratio: auto;
  padding: 24px;
  overflow: hidden;
}

.case-figure--media video,
.case-figure--media img {
  display: block;
  width: 100%;
  height: auto;
}

.case-figure--media video {
  border-radius: 12px;
}

/* Dense diagram: too small to read at phone width, so it draws wider and pans
   sideways inside its own scroller. Full width from tablet up. */
.case-figure__pan {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.case-figure__pan img {
  min-width: 620px;
}

@media (min-width: 768px) {
  .case-figure__pan {
    overflow-x: visible;
  }

  .case-figure__pan img {
    min-width: 0;
    max-width: 70%;
    margin-inline: auto;
  }
}

.case-figure__cap {
  padding: 0.9rem 0.2rem 0;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.case-figure--media-portrait {
  display: flex;
  justify-content: center;
}

.case-figure--media-portrait video {
  width: auto;
  height: auto;
  max-height: 348px;
  max-width: 100%;
}

.case-figure--pv {
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(255, 178, 77, 0.12), transparent 55%),
    linear-gradient(150deg, #1e1e1e 0%, #151515 100%);
}

/* Figure whose screens can't be shown publicly - reads as withheld, not missing */
.case-figure--nda {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 5;
  gap: 0.85rem;
  padding: clamp(1.4rem, 4vw, 2rem);
  text-align: center;
}

.case-figure--nda svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.case-figure--nda b {
  display: block;
  max-width: 50ch;
  font-size: clamp(0.68rem, 2.2vw, 0.8rem);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.case-figure--nda small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.case-next {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
}

.case-next a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.case-next a:hover {
  border-color: rgba(1, 226, 253, 0.4);
  transform: translateY(-3px);
}

.case-next small {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 0.3rem;
}

.case-next strong {
  font-size: 1.2rem;
}

.case-next .arrow {
  color: var(--accent);
  font-size: 1.4rem;
}

/* ==========================================================================
   Case-study notice (discontinued product disclaimer)
   ========================================================================== */
.notice {
  margin: clamp(1.4rem, 3vw, 2rem) 0 0;
  padding: clamp(0.95rem, 2.5vw, 1.25rem) clamp(1rem, 3vw, 1.4rem);
  border: 1px dotted rgba(255, 178, 77, 0.55);
  border-radius: 14px;
  background: rgba(255, 178, 77, 0.06);
}

.notice p {
  margin: 0;
  max-width: 70ch;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 178, 77, 0.72);
}

.notice p + p {
  margin-top: 0.3rem;
}

.notice strong {
  font-weight: 700;
  color: var(--warn);
}

/* ==========================================================================
   Section-level lock on case-study pages
   The page is public. Locked blocks keep their heading and hide their body;
   one bar at the top of the page unlocks every block on both case studies.
   ========================================================================== */
.unlockbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem 1.1rem;
  margin: clamp(1.4rem, 3vw, 2rem) 0 0;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  border: 1px solid var(--edge);
  border-radius: 16px;
  /* body sets no base color, so inherited text would fall back to UA black */
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(1, 226, 253, 0.09), transparent 55%),
    var(--surface);
  overflow: hidden;
}

/* Wrong password: the bar turns dark red - gradient, chip, glyph, field, button.
   The title and subtitle keep their normal colors so the copy stays readable. */
.unlockbar.is-error {
  border-color: rgba(186, 10, 0, 0.55);
  animation: unlockbar-shake 0.45s ease;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(186, 10, 0, 0.18), transparent 55%),
    var(--surface);
}

.unlockbar.is-error .unlockbar__ico {
  border-color: rgba(186, 10, 0, 0.5);
  color: var(--danger);
}

.unlockbar.is-error .unlockbar__input {
  border-color: rgba(186, 10, 0, 0.55);
  color: var(--danger);
  caret-color: var(--danger);
}

.unlockbar.is-error .unlockbar__input:focus {
  border-color: var(--danger);
}

.unlockbar.is-error .unlockbar__input::placeholder {
  color: rgba(186, 10, 0, 0.7);
}

/* fail() selects the field, and the global ::selection is cyan */
.unlockbar.is-error .unlockbar__input::selection {
  background: var(--danger);
  color: var(--ink);
}

.unlockbar.is-error .unlockbar__btn {
  border-color: rgba(186, 10, 0, 0.55);
  color: var(--danger);
  background: transparent;
}

/* Beats the cyan filled/hover states, which share this specificity.
   Light arrow, not the cyan state's dark one - dark red needs the contrast. */
.unlockbar.is-error .unlockbar__input:not(:placeholder-shown) + .unlockbar__btn,
.unlockbar.is-error .unlockbar__btn:hover {
  color: var(--ink);
  background: var(--danger);
  border-color: var(--danger);
}

.unlockbar__ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--edge);
  color: var(--accent);
}

.unlockbar__ico svg {
  width: 20px;
  height: 20px;
}

.unlockbar__meta {
  min-width: 0;
}

.unlockbar__meta strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.unlockbar__meta small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.unlockbar__form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.unlockbar__input {
  width: 150px;
  /* 16px so iOS Safari does not zoom the page on focus */
  font: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--edge);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.25s ease;
}

.unlockbar__input:focus {
  border-color: rgba(1, 226, 253, 0.5);
}

.unlockbar__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.unlockbar__input:not(:placeholder-shown) + .unlockbar__btn,
.unlockbar__btn:hover {
  color: #0d0d0d;
  background: var(--accent);
  border-color: var(--accent);
}

/* display:none keeps it out of the grid entirely, so the bar stays one row tall */
.unlockbar__error {
  /* column 2 so it lines up with the label, not under the icon */
  grid-column: 2 / -1;
  margin: 0;
  font-size: 0.8rem;
  color: var(--danger);
  display: none;
}

.unlockbar.is-error .unlockbar__error {
  display: block;
}

@keyframes unlockbar-shake {
  10% { transform: translateX(-7px); }
  30% { transform: translateX(6px); }
  55% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* A locked section shows a lock chip, its heading, and a prompt to unlock.
   Sizes come from the Figma design (node 151:65). */
.lockhead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.9rem;
}

.lockhead__ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--edge);
  border-radius: 11px;
  color: var(--accent);
}

.lockhead__ico svg {
  width: 20px;
  height: 20px;
}

.lockhead__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Locked headings drop the uppercase section treatment for the design's title case */
.lockhead h2,
.lockhead h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: var(--accent);
}

.lockhead__hint {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: left;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.25s ease;
}

/* The label is only ~19px tall, so grow the hit area to 44px on touch devices
   without moving the text. Desktop is left alone so text stays selectable. */
@media (pointer: coarse) {
  .lockhead__hint::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
  }
}

.lockhead__hint span {
  text-decoration: underline;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
}

.lockhead__hint:hover {
  color: var(--ink-dim);
}

@media (max-width: 640px) {
  .unlockbar {
    grid-template-columns: auto 1fr;
  }

  .unlockbar__form {
    grid-column: 1 / -1;
  }

  .unlockbar__input {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .unlockbar.is-error {
    animation: none;
  }
}

/* Small lock glyph on "Read more" - signals protected, not disabled */
.lock-ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--accent);
}

.cs-readmore:hover .lock-ico {
  color: inherit;
}

/* ==========================================================================
   Mobile polish
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
}

body,
a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* Small-viewport units: hero fills the visible screen on iOS (no URL-bar jump) */
.hero {
  min-height: 100svh;
}

.hero__scroll-hint {
  bottom: calc(2rem + env(safe-area-inset-bottom));
}

/* ==========================================================================
   Custom scrollbar
   ========================================================================== */
/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(1, 226, 253, 0.35) transparent;
}

/* WebKit (Chrome/Safari/Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0d0d0d;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, rgba(1, 226, 253, 0.55), rgba(1, 226, 253, 0.28));
  border: 2px solid #0d0d0d;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #01e2fd, rgba(1, 226, 253, 0.55));
}

::-webkit-scrollbar-corner {
  background: #0d0d0d;
}

/* ==========================================================================
   Case-study deep-dive additions - lens dividers, chart, decisions, moat,
   callout, GLB device-state stage (pages/safeignite.html)
   ========================================================================== */

/* Four meta cards on the case hero (base grid is 1 col, 3 col at desktop) */
@media (min-width: 640px) {
  .case-hero .cs-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .case-hero .cs-meta {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Product Lens / Design Lens tab toggle --- */
.lens-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0;
  border: none;
  border-bottom: 1.5px solid var(--edge);
  border-radius: 0;
  background: transparent;
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 3rem);
}

.lens-tabs__thumb {
  position: absolute;
  left: 0;
  bottom: -1.5px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .lens-tabs__thumb { transition: none; }
}

.lens-tab {
  position: relative;
  z-index: 1;
  min-height: 56px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-dim);
  cursor: pointer;
  text-align: center;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.lens-tab span {
  display: block;
  margin-top: 0.2rem;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.lens-tab:hover {
  color: var(--ink);
}

.lens-tab.is-active {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
}

.lens-tab.is-active span {
  color: var(--accent);
}

@media (max-width: 640px) {
  .lens-tab span { display: none; }
  .lens-tab { min-height: 44px; }
}

.lens-panel {
  display: none;
}

.lens-panel.is-active {
  display: block;
}

/* --- Podcast card ("feeling lazy?" audio playback) --- */
.podcast-card {
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--surface);
  padding: 1.6rem 1.3rem 1.5rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.podcast-card__title {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.podcast-card__sub {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-dim);
}

.pod-player {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.pod-player__timeline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pod-player__bar {
  position: relative;
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  /* ponytail: 4px visual bar, padding via ::before keeps the hit area 24px */
}

.pod-player__bar::before {
  content: '';
  position: absolute;
  inset: -10px 0;
}

.pod-player__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: var(--ink);
  pointer-events: none;
}

.pod-player__knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.pod-player__bar:hover .pod-player__fill,
.pod-player__bar:focus-visible .pod-player__fill {
  background: var(--accent);
}

.pod-player__bar:hover .pod-player__knob,
.pod-player__bar:focus-visible .pod-player__knob {
  transform: translate(-50%, -50%) scale(1);
}

.pod-player__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.pod-player__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 44px;
  height: 44px;
  border: 1px solid var(--edge-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pod-player__btn svg {
  width: 18px;
  height: 18px;
}

.pod-player__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pod-player__btn--play {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.pod-player__btn--play:hover {
  color: #000;
  filter: brightness(1.15);
}

.pod-player__btn--back span,
.pod-player__btn--fwd span {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pod-player__btn--back svg,
.pod-player__btn--fwd svg {
  width: 15px;
  height: 15px;
}

.pod-player__icon-pause,
.pod-player.is-playing .pod-player__icon-play {
  display: none;
}

.pod-player.is-playing .pod-player__icon-pause {
  display: block;
}

.pod-player__icon-muted,
.pod-player.is-muted .pod-player__icon-vol {
  display: none;
}

.pod-player.is-muted .pod-player__icon-muted {
  display: block;
}

.pod-player__time {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.podcast-card__credit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.podcast-card__credit img {
  height: 1rem;
  width: auto;
}

/* --- Market stat card (shadcn-style card: hero ratio + three tiles) --- */
.stat-card {
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--surface);
  margin: clamp(2rem, 5vw, 3rem) 0;
  overflow: hidden;
}

.stat-card__foot {
  padding: 0.95rem 1.3rem;
  border-top: 1px solid var(--edge);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

.stat-card__foot::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.55rem;
  vertical-align: 1px;
}

/* --- Stat card (hero ratio + three tiles) --- */
.stat-card__hero {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.6rem 1.3rem 1.5rem;
}

.stat-card__src {
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  margin-bottom: 0.4rem;
}

.stat-card__big {
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-card__sub {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 42ch;
}

.stat-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--edge);
}

.stat-card__cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.05rem 1.3rem;
}

.stat-card__cell + .stat-card__cell {
  border-left: 1px solid var(--edge);
}

.stat-card__cell small {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.stat-card__cell strong {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-card__cell span {
  font-size: 0.72rem;
  color: var(--ink-faint);
}

@media (max-width: 640px) {
  .stat-card__grid {
    grid-template-columns: 1fr;
  }

  .stat-card__cell + .stat-card__cell {
    border-left: none;
    border-top: 1px solid var(--edge);
  }
}

/* --- Numbered decisions / next-steps list --- */
.decisions {
  list-style: none;
  counter-reset: dec;
  margin-top: 0.4rem;
}

.case-body .decisions > li {
  counter-increment: dec;
  position: relative;
  padding: 1.4rem 0 1.4rem 3.2rem;
  margin-bottom: 0;
  border-top: 1px solid var(--edge);
}

.case-body .decisions > li::before {
  content: counter(dec, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.55rem;
  width: auto;
  height: auto;
  background: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.decisions h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.decisions p {
  margin-bottom: 0.45rem;
}

.decisions p:last-child {
  margin-bottom: 0;
}

.decisions__trade {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-faint);
}

.case-body .decisions--compact > li {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.decisions--compact p {
  font-size: 0.95rem;
}

/* --- Competitive moat table --- */
.moat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--edge);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 0.6rem;
}

.moat > div {
  padding: 1rem 1.2rem;
  font-size: 0.92rem;
  line-height: 1.65;
  border-top: 1px solid var(--edge);
}

.moat__head {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  border-top: none;
  background: var(--surface);
}

/* Second header is the "<product>'s answer" column - accent it to match the
   mobile data-label, which already uses --accent. */
.moat__head + .moat__head {
  color: var(--accent);
}

.moat__gap {
  color: var(--ink-dim);
}

.moat__ans {
  color: var(--ink);
  background: rgba(1, 226, 253, 0.04);
  border-left: 1px solid var(--edge);
}

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

  .moat__head {
    display: none;
  }

  .moat__gap::before,
  .moat__ans::before {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ink-faint);
    margin-bottom: 0.35rem;
  }

  .moat__gap::before {
    content: 'Gap in existing options';
  }

  .moat__ans::before {
    content: attr(data-label);
    color: var(--accent);
  }

  .moat__gap {
    border-top: 1px solid var(--edge-strong);
  }

  .moat__gap:first-of-type {
    border-top: none;
  }

  .moat__ans {
    border-left: none;
    border-top: none;
    padding-top: 0;
  }
}

/* --- Info callout --- */
.case-callout {
  border-left: 2px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  padding: 1rem 1.2rem;
  margin-top: 1.2rem;
}

.case-callout p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* --- GLB device-state stage --- */
.glb-stage {
  margin: clamp(2rem, 5vw, 3rem) 0;
}

.glb-stage__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  border: 1px solid var(--edge);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(1, 226, 253, 0.12), transparent 55%),
    linear-gradient(150deg, #1e1e1e 0%, #151515 100%);
  transition: opacity 0.26s ease;
}

.glb-stage__frame.is-fading {
  opacity: 0;
}

.glb-stage model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: grab;
}

.glb-stage model-viewer:active {
  cursor: grabbing;
}

/* "Drag to rotate" affordance - the models read as flat images without it.
   Hidden once the visitor actually drags (see .is-touched in sections.js). */
.glb-stage__hint {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  pointer-events: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: rgba(13, 13, 13, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, #01e2fd 32%, transparent);
  border-radius: 999px;
  transition: opacity 0.3s ease;
}

.glb-stage__hint svg {
  width: 14px;
  height: 14px;
  color: #01e2fd;
  animation: glb-hint-turn 2.6s ease-in-out infinite;
}

@keyframes glb-hint-turn {
  0%, 55%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-40deg); }
  40% { transform: rotate(40deg); }
}

.glb-stage.is-touched .glb-stage__hint,
.glb-stage.is-missing .glb-stage__hint {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .glb-stage__hint svg { animation: none; }
}

.glb-stage.is-missing model-viewer {
  visibility: hidden;
}

.glb-stage__ph {
  position: absolute;
  inset: 0;
  display: none;
  align-content: center;
  justify-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.5rem;
}

.glb-stage.is-missing .glb-stage__ph {
  display: grid;
}

.glb-stage__ph span {
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.glb-stage__ph small {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Pill row sits inside the frame, scrolls sideways when it outgrows the width */
.glb-stage__pills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: safe center;
  gap: 0.35rem;
  padding: 0.9rem;
  overflow-x: auto;
  scrollbar-width: none;
}

@media (min-width: 768px) {
  .glb-stage__frame {
    aspect-ratio: 16 / 10;
  }
}

.glb-stage__pills::-webkit-scrollbar {
  display: none;
}

.glb-pill {
  flex: none;
  /* 44px tap height kept on phones; only the width/type shrink */
  min-height: 44px;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.68rem;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(13, 13, 13, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  /* border matches the dot */
  border: 1px solid color-mix(in srgb, var(--pill) 40%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.glb-pill:hover,
.glb-pill:focus-visible {
  border-color: color-mix(in srgb, var(--pill) 70%, transparent);
}

.glb-pill.is-active {
  border-color: var(--pill);
  background: color-mix(in srgb, var(--pill) 12%, rgba(13, 13, 13, 0.72));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pill) 35%, transparent),
    0 0 18px color-mix(in srgb, var(--pill) 30%, transparent);
}

.glb-pill__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--pill);
}

/* full-size pills only once all six fit the column without scrolling */
@media (min-width: 900px) {
  .glb-stage__pills {
    gap: 0.45rem;
  }

  .glb-pill {
    padding: 0 0.8rem;
    gap: 0.45rem;
    font-size: 0.78rem;
  }

  .glb-pill__dot {
    width: 9px;
    height: 9px;
  }
}

.glb-pill.is-active .glb-pill__dot {
  box-shadow: 0 0 12px var(--pill);
}

.glb-stage__cap {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.glb-stage__note {
  margin-top: 0.6rem;
  max-width: 62ch;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-faint);
}

@media (prefers-reduced-motion: reduce) {
  .glb-stage__frame,
  .glb-pill {
    transition: none;
  }
}

/* ==========================================================================
   Hero 2 - skills / "products that ship"
   Reuses .hero (100svh, centered flex column) from above; only the extras live
   here. Inert unless the hero-2 markup is in the page.
   ========================================================================== */
.hero--sk {
  text-align: center;
  padding: max(8vh, 5.5rem) clamp(1.25rem, 6vw, 7rem) 8vh;
}

/* Gradient + outline text primitives, same treatment as .hero__brand-word */
.grad {
  background-image: linear-gradient(100deg, var(--accent) 0%, #ffffff 92%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.stroke {
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

/* Emoji is a color font - opt it out of the stroke or it renders blank */
.emoji {
  color: initial;
  -webkit-text-fill-color: initial;
  -webkit-text-stroke: 0;
}

.sk__h {
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-size: clamp(2.1rem, 6.2vw, 5.4rem);
  max-width: 22ch;
  color: var(--ink);
}

/* Words stacked in one grid cell, so the box is as wide as the longest */
.swap {
  display: inline-grid;
  vertical-align: bottom;
  text-align: center;
}

.swap > span {
  grid-area: 1 / 1;
  will-change: opacity, transform;
  /* Opacity makes its own layer clipped to the box, and line-height 0.96 leaves
     no room for g/p descenders - pad it back, cancel the pad with margin */
  padding-bottom: 0.18em;
  margin-bottom: -0.18em;
}

/* `both` matters: without it a delayed word sits at opacity 1 until its delay
   elapses, so every word stacks on the others on first paint */
.swap--3 > span {
  animation: swap3 6s infinite both;
}

.swap--3 > span:nth-child(2) {
  animation-delay: 2s;
}

.swap--3 > span:nth-child(3) {
  animation-delay: 4s;
}

@keyframes swap3 {
  0%, 3%    { opacity: 0; transform: translateY(0.22em); }
  6%, 28%   { opacity: 1; transform: none; }
  33%, 100% { opacity: 0; transform: translateY(-0.22em); }
}

/* Full-bleed via 100vw + the parent's align-items:center - no negative margins.
   body already has overflow-x:hidden, so the scrollbar width doesn't leak. */
.sk__marquee {
  width: 100vw;
  margin-top: clamp(2rem, 6vh, 3.5rem);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.sk__track {
  display: flex;
  width: max-content;
  animation: slide 34s linear infinite;
}

.sk__marquee:hover .sk__track {
  animation-play-state: paused;
}

@keyframes slide {
  to { transform: translateX(-50%); }
}

.sk__set {
  display: flex;
  flex-shrink: 0;
}

.sk__item {
  /* margin-right on every item (incl. the last) keeps the two sets equal width,
     so translateX(-50%) loops seamlessly - a gap between sets would not */
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.65rem 1.15rem;
  border: 1px solid #232323;
  border-radius: 999px;
  margin-right: 0.6rem;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.sk__item:hover {
  color: var(--accent);
  border-color: #2c4a52;
}

.sk__proof {
  margin-top: clamp(1.8rem, 5vh, 3rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem 3.5rem;
}

.sk__stat b {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.sk__stat span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (max-width: 700px) {
  .hero--sk {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .sk__h {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-inline: auto;
  }

  .stroke {
    -webkit-text-stroke-width: 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk__track {
    animation: none;
  }

  .swap > span {
    animation: none;
  }

  .swap > span:not(:first-child) {
    display: none;
  }
}
