/* ==========================================================================
   YOWO AI Official Website — Portfolio & Core Page Stylesheet (v1.1.0 mono-black)
   Swiss Grid Architecture & Movie-Grade Minimalist Aesthetic
   ========================================================================== */

/* ---------- 1. Common Variables & Geometry ---------- */
:root {
  --line: var(--yowo-line, #2E2D2A);
  --surface: var(--yowo-surface, #1A1A18);
  --muted: var(--yowo-muted, #8A867D);
  --page-gutter: clamp(16px, 4vw, 64px);
}

.portfolio-site,
.yowo-site {
  background-color: var(--yowo-bg, #0E0E0D);
  color: var(--yowo-fg, #EDE8DC);
  overflow-x: hidden;
}

.portfolio-site h1,
.portfolio-site h2,
.portfolio-site h3,
.yowo-site h1,
.yowo-site h2,
.yowo-site h3 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
}

/* Sharp 0px cinema media frames; controls & leaf panels follow Open-Plane radii */
.portfolio-site button,
.portfolio-site input,
.yowo-site button,
.yowo-site input {
  border-radius: var(--yowo-button-radius, var(--yowo-radius-xs, 4px));
}

.portfolio-site .floating-work,
.portfolio-site .gallery-card,
.portfolio-site .detail-poster,
.portfolio-site .feature-shell,
.yowo-site .floating-work,
.yowo-site .gallery-card,
.yowo-site .detail-poster,
.yowo-site .feature-shell {
  border-radius: var(--yowo-radius-none, 0px);
}

/* ---------- 2. Homepage Hero & 17-Work Catalog Grid ---------- */
.portfolio-hero {
  --poster-edge-room: calc(var(--page-gutter) - 4px);
  position: relative;
  padding: 48px var(--page-gutter) 40px;
  overflow: clip;
}

.hero-stage {
  position: relative;
  max-width: 1440px;
  /* The desktop posters are positioned out of flow, including the last row. */
  min-height: 1200px;
  margin: auto;
  isolation: isolate;
}

.hero-brand {
  position: absolute;
  z-index: 30;
  inset: 340px 0 auto;
  text-align: center;
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-brand > * {
  pointer-events: none;
}

.hero-brand a {
  pointer-events: auto;
}

.hero-brand h1 {
  margin: 0 0 24px;
}

.hero-logo {
  width: min(100%, clamp(440px, 46vw, 720px));
  height: auto;
  margin-inline: auto;
}

.hero-brand p:not(.scroll-cue) {
  font-size: clamp(16px, 1.4vw, 20px);
  max-width: 540px;
  margin: 0 auto 20px;
  color: var(--yowo-muted, #8A867D);
}

/* Homepage brand accents: original 17.76-degree pattern and quotation glyph.
   Keep the marks out of the logo, poster and video surfaces. */
.brand-quoted {
  display: flex;
  align-items: center;
  gap: var(--yowo-space-4);
}

.brand-quote {
  display: block;
  flex: none;
  width: 0.32em;
  height: 0.5em;
  align-self: flex-start;
  margin-top: 0.12em;
  pointer-events: none;
}

.hero-brand p.hero-overline {
  justify-content: center;
  color: var(--yowo-fg);
}

.hero-overline .brand-quote {
  width: 8px;
  height: 13px;
  align-self: center;
  margin-top: 0;
}

.hero-brand p.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background-color: color-mix(in srgb, var(--yowo-surface, #171715) 85%, transparent);
  color: var(--yowo-fg, #EFECE4);
  border: 1px solid var(--yowo-line-solid, #2B2A27);
  border-radius: var(--yowo-capsule-radius, 9999px);
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 12px;
}

.floating-posters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  isolation: isolate;
}

.floating-work {
  --px: 0px;
  --py: 0px;
  --sx: 0px;
  --sy: 0px;
  position: absolute;
  width: clamp(128px, 12.2vw, 202px);
  display: block;
  pointer-events: auto;
  z-index: 2;
  border: 1px solid var(--yowo-line, #2E2D2A);
  background-color: var(--yowo-surface, #1A1A18);
  border-radius: var(--yowo-radius-none, 0px) !important;
  transform: translate3d(
    clamp(calc(-1 * var(--poster-edge-room)), calc(var(--px) + var(--sx)), var(--poster-edge-room)),
    max(-44px, calc(var(--py) + var(--sy))),
    0
  );
  transition: transform 0.45s ease-out, border-color 120ms ease;
}

.floating-work-1 { left: 9%; top: 0; width: clamp(128px, 10.5vw, 174px); }
.floating-work-2 { left: 33%; top: 60px; width: clamp(135px, 12vw, 185px); }
.floating-work-3 { right: 24%; top: 30px; width: clamp(130px, 11.5vw, 180px); }
.floating-work-4 { right: 3%; top: 90px; width: clamp(125px, 10.8vw, 170px); }
.floating-work-5 { left: 14%; top: 780px; width: clamp(120px, 10.5vw, 165px); }
.floating-work-6 { right: 14%; top: 780px; width: clamp(115px, 10.2vw, 160px); }
.floating-work-7 { left: 0; top: 465px; width: clamp(78px, 7.4vw, 115px); }
.floating-work-8 { right: 0; top: 480px; width: clamp(78px, 7.4vw, 115px); }
.floating-work-9 { left: 0; top: 70px; width: clamp(60px, 6.2vw, 95px); }
.floating-work-10 { right: 15%; top: 14px; width: clamp(50px, 5vw, 75px); }
.floating-work-11 { left: 4%; top: 680px; width: clamp(60px, 6.2vw, 95px); }
.floating-work-12 { right: 4%; top: 690px; width: clamp(60px, 6.2vw, 95px); }
.floating-work-13 { left: 33%; top: 870px; width: clamp(60px, 6.2vw, 95px); }
.floating-work-14 { right: 33%; top: 910px; width: clamp(55px, 5.7vw, 88px); }
.floating-work-15 { left: 0; top: 980px; width: clamp(55px, 5.7vw, 88px); }
.floating-work-16 { right: 0; top: 1000px; width: clamp(55px, 5.7vw, 88px); }
.floating-work-17 { left: 48%; top: 1040px; width: clamp(55px, 5.7vw, 88px); }

.floating-image {
  display: block;
  position: relative;
  overflow: hidden;
}

.floating-work img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background-color: var(--yowo-surface, #1A1A18);
  display: block;
  border-radius: var(--yowo-radius-none, 0px) !important;
  box-shadow: none !important;
}

.floating-work:hover,
.floating-work:focus-visible {
  border-color: var(--yowo-border-strong, #8A867D);
  z-index: 10;
}

.floating-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  background-color: rgba(14, 14, 13, 0.94);
  border-top: 1px solid var(--yowo-line, #2E2D2A);
  color: var(--yowo-fg, #EDE8DC);
  opacity: 0;
  transition: opacity 120ms ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: var(--yowo-radius-none, 0px) !important;
}

.floating-overlay strong {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.floating-overlay span {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--yowo-muted, #8A867D);
  text-transform: uppercase;
}

.floating-work:hover .floating-overlay,
.floating-work:focus-visible .floating-overlay {
  opacity: 1;
}

@media (max-width: 900px) {
  .portfolio-hero {
    padding-bottom: 60px;
  }
  .hero-stage {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .hero-brand {
    position: relative;
    inset: auto;
    text-align: left;
    padding: 40px 0 32px;
  }
  .hero-logo {
    width: min(100%, 400px);
    margin-inline: 0;
  }
  .hero-brand p.hero-overline {
    justify-content: flex-start;
    margin-inline: 0;
  }
  .floating-posters {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    pointer-events: auto;
  }
  .floating-work {
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    transform: none !important;
  }
  .floating-overlay {
    position: static;
    opacity: 1;
    background-color: transparent;
    padding: 12px 2px 4px;
  }
  .hero-brand p.scroll-cue {
    display: none;
  }
}

/* ---------- 3. Motion Section & Featured Video Player ---------- */
.motion-section {
  padding: var(--yowo-space-16, 64px) var(--page-gutter);
  border-top: 1px solid var(--yowo-line, #2E2D2A);
}

.motion-heading {
  max-width: 1440px;
  margin: 0 auto 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.motion-heading .eyebrow {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yowo-muted, #8A867D);
}

.motion-heading h2 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--yowo-fg, #EDE8DC);
  margin-top: 8px;
}

.motion-heading > div:first-child {
  flex: none;
}

.motion-pattern {
  flex: 0 1 400px;
  height: 112px;
  align-self: stretch;
  background: var(--yowo-bg) url('../assets/brand/elements/pattern-dark.svg') center / 720px 405px;
  border-block: 1px solid var(--yowo-line);
  pointer-events: none;
}

@media (max-width: 640px) {
  .motion-heading {
    flex-direction: column;
    align-items: stretch;
    gap: var(--yowo-space-6);
  }
  .motion-heading h2 {
    gap: var(--yowo-space-2);
    font-size: clamp(32px, 6vw, 40px);
  }
  .motion-pattern {
    flex: none;
    height: var(--yowo-space-8);
    background-size: 480px 270px;
  }
}

.feature-shell {
  /* Leave room for the 73px sticky header and 48px of viewing space. */
  max-width: 1440px;
  max-width: min(1440px, calc((100vh - 121px) * 16 / 9));
  max-width: min(1440px, calc((100svh - 121px) * 16 / 9));
  max-width: min(1440px, calc((100dvh - 121px) * 16 / 9));
  margin: auto;
  border: 1px solid var(--yowo-line, #2E2D2A);
  background-color: var(--yowo-surface, #1A1A18);
}

.feature-media {
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #0E0E0D;
}

.feature-media.has-video .feature-link {
  display: block;
  width: 100%;
  height: 100%;
}

.feature-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background-color: rgba(14, 14, 13, 0.94);
  border-top: 1px solid var(--yowo-line, #2E2D2A);
}

@media (hover: hover) and (pointer: fine) {
  .video-progress {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--yowo-motion-duration-base, 240ms) var(--yowo-motion-ease-standard, ease);
  }

  .feature-media:hover .video-progress,
  .feature-media:focus-within .video-progress {
    opacity: 1;
    pointer-events: auto;
  }
}

.video-playback,
.video-audio {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--yowo-fg, #EDE8DC);
  cursor: pointer;
  border-radius: var(--yowo-radius-none, 0px) !important;
}

.video-playback svg,
.video-audio svg {
  display: block;
  width: 20px;
  height: 20px;
}

.video-audio .audio-waves,
.video-audio.is-audible .audio-muted {
  display: none;
}

.video-audio.is-audible .audio-waves {
  display: block;
}

.video-playback .playback-pause,
.video-playback.is-playing .playback-play {
  display: none;
}

.video-playback.is-playing .playback-pause {
  display: block;
}

.video-progress input[type="range"] {
  --video-progress: 0%;
  --video-track: linear-gradient(to right, var(--yowo-fg) var(--video-progress), var(--yowo-border-strong) var(--video-progress));
  flex: 1;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  box-shadow: none !important;
  border-radius: var(--yowo-radius-none, 0px) !important;
}

.video-progress input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 0;
  background: var(--video-track);
}

.video-progress input[type="range"]::-moz-range-track {
  height: 2px;
  border-radius: 0;
  background: var(--video-track);
}

.video-progress input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border: 0;
  border-radius: 0 !important;
  background-color: var(--yowo-fg, #EDE8DC);
  box-shadow: none !important;
}

.video-progress input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 0 !important;
  background-color: var(--yowo-fg, #EDE8DC);
  box-shadow: none !important;
}

.legacy-links {
  padding: 32px var(--page-gutter);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
}

.legacy-links a {
  color: var(--yowo-muted, #8A867D);
  text-decoration: underline;
}

/* ---------- 4. Studio Gallery (`studio.html`) ---------- */
.studio-intro,
.page-intro {
  padding: var(--yowo-space-16, 64px) var(--page-gutter) var(--yowo-space-12, 48px);
  max-width: 1440px;
  margin: auto;
}

.studio-intro h1,
.page-intro h1 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 16px 0 24px;
  color: var(--yowo-fg, #EDE8DC);
}

.studio-intro h1 em,
.page-intro h1 em {
  font-style: normal;
  font-weight: 700;
  color: var(--yowo-muted, #8A867D);
}

.studio-intro p,
.page-intro p {
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--yowo-muted, #8A867D);
  max-width: 640px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--yowo-space-8, 32px);
  padding: 0 var(--page-gutter) var(--yowo-space-16, 64px);
  max-width: 1440px;
  margin: auto;
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.gallery-card {
  background-color: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  border-radius: var(--yowo-radius-none, 0px) !important;
  scroll-margin-top: 90px;
  transition: border-color 120ms ease;
}

.gallery-card:hover {
  border-color: var(--yowo-border-strong, #8A867D);
}

.gallery-image {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--yowo-surface, #1A1A18);
  border-bottom: 1px solid var(--yowo-line, #2E2D2A);
}

.gallery-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--yowo-radius-none, 0px) !important;
}

.image-action {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: var(--yowo-fg, #EDE8DC);
  color: var(--yowo-bg, #0E0E0D);
  padding: 8px 14px;
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--yowo-radius-none, 0px) !important;
}

.gallery-info {
  padding: var(--yowo-space-6, 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.gallery-stat {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 14px;
  font-weight: 600;
  color: var(--yowo-fg, #EDE8DC);
  letter-spacing: 0.04em;
}

.gallery-stat span {
  font-size: 12px;
  color: var(--yowo-muted, #8A867D);
  font-weight: 400;
}

.gallery-info h2 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  margin: 4px 0 8px;
}

.gallery-info h2 a {
  color: var(--yowo-fg, #EDE8DC);
  text-decoration: none;
}

.gallery-info h2 a:hover {
  text-decoration: underline;
}

.gallery-info > p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--yowo-muted, #8A867D);
}

.data-source {
  padding: var(--yowo-space-6, 24px) var(--page-gutter) var(--yowo-space-12, 48px);
  max-width: 1440px;
  margin: auto;
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  color: var(--yowo-muted, #8A867D);
}

/* ---------- 5. Ecosystem (`ecosystem.html`) ---------- */
.eco-section,
#positioning,
#adaptation,
#contact,
#collaboration,
#follow,
.contact-hero {
  scroll-margin-top: 90px;
}

.eco-section {
  padding: var(--yowo-space-12, 48px) var(--page-gutter);
  max-width: 1440px;
  margin: auto;
  border-top: 1px solid var(--yowo-line, #2E2D2A);
}

.section-lead {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--yowo-space-8, 32px);
  margin-bottom: var(--yowo-space-8, 32px);
}

@media (max-width: 768px) {
  .section-lead {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.section-lead .eyebrow {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yowo-muted, #8A867D);
}

.section-lead h2 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--yowo-fg, #EDE8DC);
  margin-top: 8px;
}

.section-lead h2 em {
  font-style: normal;
  font-weight: 700;
  color: var(--yowo-muted, #8A867D);
}

.section-lead p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--yowo-muted, #8A867D);
  max-width: 540px;
}

.capability-stack {
  display: flex;
  flex-direction: column;
  gap: var(--yowo-space-6, 24px);
}

.capability {
  background-color: var(--yowo-surface, #171715);
  border: 1px solid var(--yowo-line, rgba(239, 236, 228, 0.09));
  border-radius: var(--yowo-card-radius, var(--yowo-radius-md, 10px));
  box-shadow: var(--yowo-shadow-sm);
  padding: var(--yowo-space-8, 32px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--yowo-space-8, 32px);
  border-radius: var(--yowo-radius-none, 0px) !important;
  scroll-margin-top: 90px;
}

@media (max-width: 768px) {
  .capability {
    grid-template-columns: 1fr;
    padding: var(--yowo-space-6, 24px);
  }
}

.capability-kicker {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yowo-muted, #8A867D);
}

.capability-heading h3 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  margin: 12px 0 16px;
  color: var(--yowo-fg, #EDE8DC);
}

.capability-heading h3 em {
  font-style: normal;
  font-weight: 700;
  color: var(--yowo-muted, #8A867D);
}

.capability-heading p {
  color: var(--yowo-muted, #8A867D);
  font-size: 16px;
  line-height: 1.5;
}

.capability-art {
  height: 100px;
  border-bottom: 1px solid var(--yowo-line, #2E2D2A);
  margin-bottom: 20px;
  color: var(--yowo-fg, #EDE8DC);
}

.capability-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.capability-detail dl {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.capability-detail dl > div {
  border-bottom: 1px solid var(--yowo-line, #2E2D2A);
  padding-bottom: 12px;
}

.capability-detail dl > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.capability-detail dt {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--yowo-fg, #EDE8DC);
  margin-bottom: 4px;
}

.capability-detail dd {
  font-size: 14px;
  color: var(--yowo-muted, #8A867D);
  line-height: 1.4;
  margin: 0;
}

.capability-controls {
  display: flex;
  gap: 16px;
  padding: 16px 0 0;
}

.capability-controls[hidden] {
  display: none;
}

.capability-controls button {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--yowo-line, #2E2D2A);
  border-radius: 0;
  background-color: var(--yowo-surface, #1A1A18);
  color: var(--yowo-muted, #8A867D);
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.capability-controls button[aria-current="step"] {
  color: var(--yowo-fg, #EDE8DC);
  border-color: var(--yowo-fg, #EDE8DC);
}

/* The script opts into a sticky stack only on desktop with motion enabled. */
.deck-enhanced {
  height: 360vh;
}

.deck-enhanced .capability-stage {
  position: sticky;
  top: 96px;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.deck-enhanced .capability-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.deck-enhanced .capability {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity var(--yowo-motion-duration-base, 240ms) var(--yowo-motion-ease-standard, ease),
    transform var(--yowo-motion-duration-base, 240ms) var(--yowo-motion-ease-swing, ease);
}

.deck-enhanced .capability.is-before {
  transform: translateY(-12px);
}

.deck-enhanced .capability.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.eco-end {
  text-align: center;
  padding: var(--yowo-space-16, 64px) var(--page-gutter) var(--yowo-space-20, 80px);
  border-top: 1px solid var(--yowo-line, #2E2D2A);
}

.eco-end p {
  font-size: 18px;
  color: var(--yowo-muted, #8A867D);
  margin-bottom: 16px;
}

.eco-end .underlined-link {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--yowo-fg, #EDE8DC);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 6. Works Detail Pages (`works/*.html`) ---------- */
.crumbs {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: var(--yowo-space-8, 32px) var(--page-gutter);
  max-width: 1440px;
  margin: auto;
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--yowo-muted, #8A867D);
}

.crumbs a {
  color: var(--yowo-muted, #8A867D);
  text-decoration: underline;
}

.crumbs a:hover {
  color: var(--yowo-fg, #EDE8DC);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--yowo-space-12, 48px);
  max-width: 1440px;
  margin: auto;
  padding: 0 var(--page-gutter) var(--yowo-space-16, 64px);
}

@media (max-width: 900px) {
  .detail-hero {
    grid-template-columns: 1fr;
  }
}

.detail-poster {
  align-self: start;
  background-color: var(--yowo-surface, #1A1A18);
  border: 1px solid var(--yowo-line, #2E2D2A);
  margin: 0;
}

.detail-poster img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--yowo-radius-none, 0px) !important;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-copy h1 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--yowo-fg, #EDE8DC);
}

.detail-copy .japanese-title {
  font-family: var(--yowo-font-family-cjk, sans-serif);
  font-size: 20px;
  color: var(--yowo-muted, #8A867D);
  margin-top: -8px;
}

.detail-copy .eyebrow {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yowo-muted, #8A867D);
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border-top: 1px solid var(--yowo-line, #2E2D2A);
  border-bottom: 1px solid var(--yowo-line, #2E2D2A);
  padding: 16px 0;
  margin: 8px 0;
}

@media (max-width: 640px) {
  .detail-facts {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.detail-facts dt {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--yowo-muted, #8A867D);
  margin-bottom: 4px;
}

.detail-facts dd {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--yowo-fg, #EDE8DC);
  margin: 0;
}

.story-context {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--yowo-line, #2E2D2A);
  padding-bottom: 16px;
  margin: 0;
}

.story-context > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: baseline;
}

.story-context dt {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--yowo-muted, #8A867D);
}

.story-context dd {
  font-size: 15px;
  color: var(--yowo-fg, #EDE8DC);
  margin: 0;
}

.story-subheading,
.story-section h2 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--yowo-fg, #EDE8DC);
  margin-top: 16px;
}

.detail-story,
.story-section p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--yowo-muted, #8A867D);
}

.story-highlight {
  border-top: 1px solid var(--yowo-line, #2E2D2A);
  padding-top: 14px;
  margin-top: 14px;
}

.story-highlight h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--yowo-fg, #EDE8DC);
  margin-bottom: 6px;
}

.story-highlight p {
  font-size: 14px;
  color: var(--yowo-muted, #8A867D);
}

.next-work {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto var(--yowo-space-16, 64px);
  padding: 24px var(--page-gutter);
  border-top: 1px solid var(--yowo-line, #2E2D2A);
  border-bottom: 1px solid var(--yowo-line, #2E2D2A);
  background-color: var(--yowo-surface, #1A1A18);
  transition: border-color 120ms ease;
}

@media (max-width: 768px) {
  .next-work {
    grid-template-columns: 1fr;
  }
}

.next-work span:first-child {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--yowo-muted, #8A867D);
}

.next-work strong {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 700;
  color: var(--yowo-fg, #EDE8DC);
}

.next-work:hover {
  border-color: var(--yowo-border-strong, #8A867D);
}

#from-home {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

#from-home:target ~ .next-work {
  display: none !important;
}

/* ---------- 7. Exchange & Contact (`exchange.html`) ---------- */
.contact-hero {
  padding: var(--yowo-space-16, 64px) var(--page-gutter) var(--yowo-space-12, 48px);
  max-width: 1440px;
  margin: auto;
}

.contact-hero .eyebrow {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yowo-muted, #8A867D);
}

.contact-hero h1 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 16px 0 24px;
  color: var(--yowo-fg, #EDE8DC);
}

.contact-hero h1 em {
  font-style: normal;
  font-weight: 700;
  color: var(--yowo-muted, #8A867D);
}

.contact-hero p {
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--yowo-muted, #8A867D);
  max-width: 640px;
}

.contact-email {
  display: inline-block;
  margin-top: 36px;
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: clamp(22px, 3vw, 44px);
  font-weight: 700;
  color: var(--yowo-fg, #EDE8DC);
  border-bottom: 2px solid var(--yowo-fg, #EDE8DC);
  padding-bottom: 6px;
  overflow-wrap: anywhere;
}

.contact-email:hover {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.follow-section {
  max-width: 1440px;
  margin: auto;
  padding: var(--yowo-space-12, 48px) var(--page-gutter) var(--yowo-space-16, 64px);
  border-top: 1px solid var(--yowo-line, #2E2D2A);
}

.social-list {
  border-top: 1px solid var(--yowo-line, #2E2D2A);
}

.social-row {
  display: grid;
  grid-template-columns: 160px 1.2fr 1.5fr;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--yowo-line, #2E2D2A);
}

@media (max-width: 768px) {
  .social-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.social-row h3 {
  font-family: var(--yowo-font-family-sans, "Manrope", sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--yowo-fg, #EDE8DC);
}

.social-row .social-handle {
  font-family: var(--yowo-font-family-mono, "Recursive", monospace);
  font-size: 16px;
  font-weight: 600;
  color: var(--yowo-fg, #EDE8DC);
}

.social-row p {
  font-size: 14px;
  color: var(--yowo-muted, #8A867D);
}

/* ==========================================================================
   YOWO UI v2.2 Open-Plane Portfolio Refinements
   ========================================================================== */
.gallery-card,
.gallery-info,
.capability,
.detail-hero,
.detail-copy,
.story-section,
.next-work {
  min-width: 0;
}

.gallery-info {
  padding: 16px 4px 8px;
}

.gallery-card {
  transition: background-color var(--yowo-motion-duration-fast, 120ms) var(--yowo-motion-ease-standard, ease);
}

.gallery-stat,
.detail-facts dd,
.feature-counter,
.video-progress {
  font-variant-numeric: tabular-nums;
}

.scroll-cue {
  transition: background-color var(--yowo-motion-duration-fast, 120ms) var(--yowo-motion-ease-standard, ease),
              border-color var(--yowo-motion-duration-fast, 120ms) var(--yowo-motion-ease-standard, ease);
}

.scroll-cue:hover {
  background-color: var(--yowo-surface-raised, #21201D);
  border-color: var(--yowo-border-strong, rgba(239, 236, 228, 0.22));
}

.capability-controls button {
  border-radius: var(--yowo-button-radius, var(--yowo-radius-xs, 4px));
  min-height: 36px;
}

.detail-facts.yw-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--yowo-space-4, 16px);
  padding: var(--yowo-space-4, 16px) 0;
  border-top: 1px solid var(--yowo-line, rgba(239, 236, 228, 0.09));
  border-bottom: 1px solid var(--yowo-line, rgba(239, 236, 228, 0.09));
  border-left: none;
  border-right: none;
  background-color: transparent;
}

.detail-story,
.story-section p,
.story-highlight p {
  max-width: 70ch;
}

.next-work {
  background-color: transparent;
  border: none;
  border-top: 1px solid var(--yowo-line, rgba(239, 236, 228, 0.09));
  border-radius: var(--yowo-radius-sm, 6px);
  transition: background-color var(--yowo-motion-duration-fast, 120ms) var(--yowo-motion-ease-standard, ease);
}

.next-work:hover {
  background-color: var(--yowo-fill-hover, rgba(239, 236, 228, 0.075));
}

.contact-email {
  transition: color var(--yowo-motion-duration-fast, 120ms) var(--yowo-motion-ease-standard, ease);
}

.contact-email:hover {
  color: var(--yowo-accent-strong, #E47B52);
}

.social-row {
  background-color: transparent;
  border-left: none;
  border-right: none;
  border-radius: var(--yowo-radius-sm, 6px);
  transition: background-color var(--yowo-motion-duration-fast, 120ms) var(--yowo-motion-ease-standard, ease);
}

.social-row:hover {
  background-color: var(--yowo-fill-hover, rgba(239, 236, 228, 0.075));
}

@media (max-width: 768px) {
  .scroll-cue,
  .capability-controls button,
  .social-row {
    min-height: 44px;
  }
}

.video-progress {
  border-radius: var(--yowo-radius-none, 0px);
}
