/* --- Featured "drive into the 3D portfolio" button -------------------------- */
/* Pill shape (same radius as the site buttons) with the cream border + hard
   offset shadow. Inside: the night scene with the car parked on the road.
   Clicking pops the car out and drives it off-screen (see script.js). */
.hero-video {
  display: block;
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin: 1.25rem 0 .25rem;
  aspect-ratio: 2091 / 752;
  border: 3px solid #fff8ee;
  border-radius: 999px;
  overflow: hidden;
  background: #1b1830;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .28);
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow .2s ease;
}
.hero-video:hover,
.hero-video:focus-visible { box-shadow: 14px 14px 0 rgba(0, 0, 0, .28); }

.hero-vid {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  z-index: 0;
}
/* The two still layers sit on top of the video, hidden until the car launches.
   On click they cross-fade in (the video "freezes" into the bg + car images). */
.hero-scene {
  position: absolute; inset: 0; display: block; z-index: 1;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.hero-video.is-launching .hero-scene,
.hero-video.video-fallback .hero-scene { opacity: 1; }
.hero-video.video-fallback .hero-vid { display: none; }
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: filter .5s ease;
}
/* hidden source image for the flying car (cloned + positioned by script.js) */
.hero-car { display: none; }

.hero-video-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: flex-end;
  gap: .6rem; padding: 0 7%;
  background: linear-gradient(to right, rgba(15,12,30,0) 30%, rgba(15,12,30,.5) 100%);
  transition: opacity .25s ease;
}
.hero-video-play {
  display: inline-grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--sun); color: #25242c;
  border: 3px solid #25242c;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .28);
  font-size: 1.05rem; padding-left: 0; flex: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-video:hover .hero-video-play,
.hero-video:focus-visible .hero-video-play {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .28);
}
.hero-video-label {
  font-weight: 950; font-size: 1.05rem; color: #fff8ee;
  letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); line-height: 1.05;
}

/* launch state: fade the label, dim the empty scene the car left behind */
.hero-video.is-launching .hero-video-overlay { opacity: 0; pointer-events: none; }
.hero-video.is-launching .hero-bg { filter: brightness(.72); }

/* the flying clone (top-level, so it isn't clipped by the pill) */
.hero-car-fly {
  position: fixed;
  z-index: 9999;
  margin: 0;
  pointer-events: none;
  transform-origin: 62% 100%;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .5));
  will-change: transform, opacity;
}
.hero-car-fly.go { animation: heroCarDrive 1.25s cubic-bezier(.4, 0, .7, .35) forwards; }
@keyframes heroCarDrive {
  0%   { transform: translate(0, 0)        scale(1, 1)      rotate(0deg); }
  10%  { transform: translate(-1.5%, 3%)   scale(1.05, .94) rotate(1.5deg); }   /* crouch / anticipate */
  24%  { transform: translate(3%, -16%)    scale(.97, 1.07) rotate(-5deg); }    /* leap up */
  38%  { transform: translate(8%, -5%)     scale(1.02, 1)   rotate(-1.5deg); }  /* land into the drive */
  100% { transform: translate(140vw, -8%)  scale(1.02, 1)   rotate(0deg); }     /* drive off-screen */
}

@media (max-width: 720px) {
  .hero-video { max-width: 100%; }
  .hero-video-play { width: 2.6rem; height: 2.6rem; }
  .hero-car { width: 42%; }
  .hero-video-label { font-size: .92rem; }
  .hero-video-overlay { padding: 0 5%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-car { animation: none; }
}

/* --- Cinematic button click transition: black iris closes around the CTA --- */
.iris-transition {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: #020205;
  opacity: 0;
  --iris-x: 50vw;
  --iris-y: 50vh;
  --iris-radius: 160vmax;
  -webkit-mask-image: radial-gradient(
    circle at var(--iris-x) var(--iris-y),
    transparent 0 var(--iris-radius),
    #000 calc(var(--iris-radius) + 1px)
  );
  mask-image: radial-gradient(
    circle at var(--iris-x) var(--iris-y),
    transparent 0 var(--iris-radius),
    #000 calc(var(--iris-radius) + 1px)
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  will-change: opacity, -webkit-mask-image, mask-image;
}

.iris-transition.active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .iris-transition {
    display: none !important;
  }
}



.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem;
  margin-top: .7rem;
}
.compact-button {
  min-height: auto;
  padding: .65rem 1rem;
  font-size: .9rem;
}
.disabled-button {
  cursor: not-allowed;
  opacity: .72;
}
.disabled-link {
  cursor: not-allowed;
  opacity: .86;
}


/* --- Intro pull restoration ---
   Keep the intended lamp-pull intro: the real lamp/cord remains visible in a
   small dark cutout, then the light spreads when pulled. The previous broad
   oval fix made the whole intro a flat dark layer and hid the readable lamp.
   The original top-right oval issue is handled by hiding header controls during
   intro, not by removing the lamp spotlight. */
body.intro-active:not(.light-has-switched) .hero-illustration .lamp,
body.intro-active:not(.light-has-switched) .hero-pull {
  opacity: 1 !important;
  visibility: visible !important;
}

body.intro-active:not(.light-has-switched) .hero-illustration .lamp {
  filter: brightness(1.08) saturate(.92) drop-shadow(0 0 .55rem rgba(255, 209, 102, .08));
}


/* --- Custom featured project cards and case pages --- */
.nosite-art svg {
  width: 8.6rem;
  height: auto;
  display: block;
  filter: drop-shadow(5px 6px 0 rgba(0,0,0,.18));
}
.coming-soon-art {
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(155,44,44,.5), rgba(35,35,41,.42)),
    rgba(255,255,255,.08);
}
.coming-soon-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255,255,255,.14) 2px, transparent 2px);
  background-size: 22px 22px;
  opacity: .58;
  z-index: -1;
}
.art-live-dot {
  position: absolute;
  top: 1.35rem;
  right: 1.35rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 .85rem rgba(255, 214, 102, .12), 0 8px 20px rgba(0,0,0,.18);
}
.securedoc-art .art-panel {
  position: absolute;
  display: block;
  border: 3px solid #fff8ee;
  background: #fff8ee;
  color: var(--ink);
  box-shadow: 6px 8px 0 rgba(0,0,0,.18);
}
.securedoc-art .art-panel {
  width: 4.55rem;
  height: 6.3rem;
  border-radius: .62rem;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.securedoc-art .art-panel.one { left: 50%; top: 2.15rem; transform: translateX(-145%) rotate(-12deg); }
.securedoc-art .art-panel.two { left: 50%; top: 1.8rem; transform: translateX(-50%) rotate(2deg); z-index: 2; }
.securedoc-art .art-panel.three { left: 50%; top: 2.25rem; transform: translateX(45%) rotate(13deg); }
.securedoc-art .art-panel::before {
  content: "";
  position: absolute;
  left: .7rem;
  right: .7rem;
  top: .95rem;
  height: .52rem;
  border-radius: 999px;
  background: #9b2c2c;
  box-shadow:
    0 1.05rem 0 rgba(155,44,44,.38),
    0 2.1rem 0 rgba(155,44,44,.2),
    0 3.15rem 0 rgba(155,44,44,.16);
}
.securedoc-art .art-panel.two::after {
  content: "✓";
  position: absolute;
  right: -.7rem;
  bottom: .72rem;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  border: 3px solid #fff8ee;
  background: #9b2c2c;
  color: #fef3c7;
  font-size: 1.55rem;
  font-weight: 1000;
  box-shadow: 4px 4px 0 rgba(0,0,0,.16);
}
.project-card-soon {
  color: var(--ink);
}
.coming-soon-art {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,248,238,.12), transparent 34%),
    linear-gradient(135deg, rgba(155,44,44,.38), rgba(255,255,255,.08));
}
.soon-card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 6.4rem;
  height: 4.45rem;
  border: 3px solid #fff8ee;
  border-radius: 1rem;
  background: rgba(255,248,238,.08);
  color: #fff8ee;
  font-size: 2rem;
  font-weight: 1000;
  line-height: 4.05rem;
  text-align: center;
  transform: translate(-50%, -50%) rotate(8deg);
  box-shadow: 5px 6px 0 rgba(0,0,0,.16);
}
.project-detail-hero {
  min-height: auto;
  padding: 8rem clamp(1rem, 5vw, 4rem) 4rem;
  background: linear-gradient(90deg, var(--paper) 0 35%, var(--mint) 35% 100%);
}
.case-card {
  background: color-mix(in srgb, var(--plum) 82%, white);
  color: #fff8ee;
  border: 3px solid #fff8ee;
  border-radius: 1.4rem;
  box-shadow: 10px 10px 0 rgba(0,0,0,.18);
  overflow: hidden;
}
.case-card .detail-art { background: rgba(255,255,255,.08); }
.project-detail-wrap {
  max-width: 74rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 2rem;
  align-items: center;
}
.project-detail-copy { padding: clamp(1rem, 3vw, 2rem); }
.project-detail-copy h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: .92;
  margin-bottom: 1rem;
}
.project-detail-copy p:not(.hand-note) { line-height: 1.7; font-weight: 650; font-size: 1.08rem; }
.detail-art { min-height: 18rem; }
.project-detail-section { padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 5vw, 4rem); }
.project-detail-grid {
  max-width: 74rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
}
.project-detail-grid .case-box h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.project-detail-grid .case-box p,
.project-detail-grid .case-box li { line-height: 1.7; font-weight: 650; }
@media (max-width: 800px) {
  .project-detail-hero { background: var(--mint); padding-top: 6.5rem; }
  .project-detail-wrap,
  .project-detail-grid { grid-template-columns: 1fr; }
  .detail-art { min-height: 13rem; }
  .securedoc-art .art-panel { width: 3.75rem; height: 5.25rem; }
  .securedoc-art .art-panel.one { transform: translateX(-142%) rotate(-12deg); }
  .securedoc-art .art-panel.three { transform: translateX(42%) rotate(13deg); }
}

/* --- Project card alignment patch --- */
.project-grid {
  align-items: stretch;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-top: 0 !important;
}

.project-card .window-top,
.project-card .project-art {
  flex: 0 0 auto;
}

.project-card .project-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.project-card .project-actions {
  margin-top: auto;
}
