/* Shared device tokens and legacy route layout; public-unity.css owns public headers. */
:root {
  --ds-page-max: var(--max, 1180px);
  --ds-page-wide: var(--wide-max, 1440px);
  --ds-page-ultra: 1680px;
  --ds-page-gutter: var(--page-gutter, clamp(14px, 3vw, 40px));
  --ds-section-gap: var(--section-gap, clamp(56px, 8vw, 140px));
  --ds-card-gap: clamp(14px, 2vw, 28px);
  --ds-title-size: clamp(32px, 5vw, 78px);
  --ds-subtitle-size: clamp(16px, 1.5vw, 22px);
  --ds-body-size: clamp(15px, 1vw, 18px);
  --ds-touch-target: 44px;
}

.ds-container {
  width: min(var(--ds-page-max), calc(100% - var(--ds-page-gutter) * 2));
  margin-inline: auto;
}

.ds-container--narrow {
  width: min(920px, calc(100% - var(--ds-page-gutter) * 2));
}

.ds-container--wide {
  width: min(var(--ds-page-wide), calc(100% - var(--ds-page-gutter) * 2));
}

.ds-container--screen {
  width: min(var(--ds-page-ultra), calc(100% - var(--ds-page-gutter) * 2));
}

.ds-section {
  padding-block: var(--ds-section-gap);
}

.ds-section--scene {
  min-height: min(920px, max(640px, 88svh));
}

/* Phones */
@media (max-width: 599px) {
  :root {
    --ds-page-gutter: clamp(18px, 6vw, 28px);
    --ds-section-gap: clamp(48px, 12vw, 84px);
    --ds-card-gap: 16px;
    --ds-title-size: clamp(38px, 13vw, 64px);
    --ds-subtitle-size: 17px;
    --ds-body-size: 16px;
    --ds-touch-target: 48px;
  }

  .button,
.feed-filter,
.project-card__open,
.anime-card__play,
.latest-menu__item,
.latest-live {
    min-height: var(--ds-touch-target);
  }

  .latest-feed,
.projects-grid,
.anime-grid,
.contact-grid,
.partner-rail {
    gap: var(--ds-card-gap);
  }
}

/* Phones landscape / low-height screens */
@media (max-height: 700px) and (orientation: landscape) {
  :root {
    --ds-section-gap: clamp(32px, 8vh, 64px);
    --header-safe-offset: 92px;
  }

  .hero,
.anime-hero,
.projects-library {
    min-height: auto;
  }

  .hero__actions,
.anime-hero__actions {
    gap: 10px;
  }
}

/* Tablets */
@media (min-width: 600px) and (max-width: 1023px) {
  :root {
    --ds-page-gutter: clamp(24px, 4vw, 44px);
    --ds-section-gap: clamp(64px, 9vw, 116px);
    --ds-title-size: clamp(52px, 8vw, 82px);
  }

  .projects-grid,
.anime-grid,
.contact-grid {
    gap: var(--ds-card-gap);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .ds-container,
.ds-container--wide,
.ds-container--screen {
    margin-inline: auto;
  }
}

/* Large desktop / 2K / 4K */
@media (min-width: 1800px) {
  :root {
    --ds-page-max: 1240px;
    --ds-page-wide: 1520px;
    --ds-section-gap: clamp(76px, 6vw, 150px);
  }
}

@media (min-width: 2400px) {
  :root {
    --ds-page-ultra: 1760px;
    --ds-section-gap: clamp(84px, 5vw, 168px);
  }

  
}

/* Ultrawide */
@media (min-aspect-ratio: 21/9) {
  :root {
    --ds-page-ultra: 1720px;
  }

  .hero,
.projects-library,
.anime-hero {
    max-width: var(--ds-page-ultra);
    margin-inline: auto;
  }
}

/* TV / couch screens */
@media (min-width: 1920px) and (min-height: 1080px) {
  :root {
    --ds-body-size: clamp(17px, .85vw, 20px);
    --ds-subtitle-size: clamp(18px, 1vw, 24px);
    --ds-touch-target: 52px;
  }

  .nav a,
.header-action,
.language-switcher button {
    min-height: 42px;
  }
}

/* Touch/pointer behavior */
@media (hover: none), (pointer: coarse) {
  .hero__sigil:hover .hero__logo,
.latest-card:hover,
.work-embed:hover,
.project-card:hover,
.anime-card:hover {
    transform: none;
  }
}

/* Mobile scroll/header audit fix: keep top navigation compact and let vertical
   gestures pass through decorative header space instead of trapping page scroll. */
@media (max-width: 900px) {
  :root {
    --header-safe-offset: 120px;
    --mobile-header-hit-gap: 8px;
  }

  

  

  

  

  

  

  

  

  

  

  

  .hero,
.anime-hero,
.projects-library {
    padding-top: clamp(30px, 8svh, 52px);
  }

  .hero h1,
.page-hero h1,
.projects-library__head h1,
.projects-section__head h2,
.anime-hero--catalog h1,
.anime-title-info h1,
.anime-episodes .section__intro h2 {
    letter-spacing: 0 !important;
    line-height: 1.04 !important;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  .hero__lead,
.page-hero p,
.projects-library__head p,
.projects-showcase__caption p,
.project-card__text,
.anime-hero--catalog .hero__lead,
.anime-title-info .hero__lead,
.anime-card__text {
    font-size: 1rem !important;
    line-height: 1.52 !important;
    letter-spacing: 0 !important;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .eyebrow,
.project-status,
.anime-card__status,
.anime-title-meta dt {
    line-height: 1.14 !important;
    letter-spacing: .08em !important;
  }
}

@media (max-width: 430px) {
  :root {
    --header-safe-offset: 112px;
  }

  

  

  

  

  

  

  

  

  .hero h1,
.projects-library__head h1,
.anime-hero--catalog h1,
.anime-title-info h1 {
    font-size: 2.05rem !important;
  }
}

@media (hover: none), (pointer: coarse) {
  html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-y: auto;
  }

  ::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
  }

  

  .anime-settings-options,
.anime-playlist-menu,
.anime-episode-list,
.anime-episodes {
    scrollbar-width: none;
  }
}
