/*
Theme Name: Orbit Ledger
Author: Production Operations
Description: A cartographic video archive with a dark observatory shell, luminous catalog cards, and a distinct orbital identity for S10.
Version: 1.0.0
Text Domain: orbit-ledger
*/

:root {
  color-scheme: dark;
  --night: #0b2225;
  --forest: #123337;
  --forest-2: #1b4549;
  --mint: #b9dfc4;
  --coral: #ff9b76;
  --paper: #f2f1e8;
  --ink: #1a3236;
  --muted: #9db8b5;
  --rule: rgba(185, 223, 196, .24);
  --width: 1520px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--night);
  color: var(--paper);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-image: radial-gradient(circle at 85% 8%, #32625c88, transparent 26rem), linear-gradient(145deg, #0b2225, #102b2e 64%, #0a1e22);
}
a { color: inherit; }
img, video { max-width: 100%; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus { position: fixed; width: auto; height: auto; clip: auto; left: 1rem; top: 1rem; z-index: 50; margin: 0; padding: .8rem 1rem; background: var(--paper); color: var(--night); }
.atlas-skip { position: absolute; left: -9999px; }
.atlas-skip:focus { left: 1rem; top: 1rem; z-index: 50; padding: .8rem 1rem; background: var(--paper); color: var(--night); }

.atlas-head {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--rule);
  background: #0b2225ed;
  backdrop-filter: blur(18px);
}
body.admin-bar .atlas-head { top: 32px; }
.atlas-head-inner {
  width: min(100% - 3rem, var(--width));
  min-height: 92px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 2rem;
}
.atlas-brand { display: inline-flex; align-items: center; gap: .85rem; width: fit-content; min-width: 0; text-decoration: none; }
.atlas-brand-icon { display: block; width: 48px; height: 48px; flex: 0 0 48px; }
.atlas-brand-copy { display: block; min-width: 0; }
.atlas-brand-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 780; font-size: 1.05rem; letter-spacing: -.04em; }
.atlas-brand-kicker { display: block; color: var(--mint); font-size: .63rem; font-weight: 750; letter-spacing: .22em; text-transform: uppercase; }
.atlas-nav { display: flex; align-items: center; gap: 1.9rem; }
.atlas-nav a { color: #d9e5da; text-decoration: none; font-size: .78rem; font-weight: 720; text-transform: uppercase; letter-spacing: .13em; }
.atlas-nav a:hover, .atlas-nav a[aria-current="page"] { color: var(--coral); }
.atlas-search { display: flex; justify-self: end; width: min(100%, 260px); border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; background: #ffffff0b; }
.atlas-search input { min-width: 0; width: 100%; padding: .55rem 0 .55rem 1rem; color: var(--paper); border: 0; outline: 0; background: transparent; font-size: .82rem; }
.atlas-search input::placeholder { color: #a6c3bd; opacity: 1; }
.atlas-search button { flex: 0 0 auto; border: 0; padding: .55rem .9rem; background: transparent; color: var(--coral); cursor: pointer; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.atlas-search:focus-within { outline: 2px solid var(--coral); outline-offset: 2px; }

.atlas-main, .atlas-watch, .atlas-not-found { width: min(100% - 3rem, var(--width)); margin-inline: auto; }
.atlas-hero { position: relative; isolation: isolate; min-height: 355px; display: flex; flex-direction: column; justify-content: center; padding: 4.2rem min(7vw, 6rem) 4.5rem 0; border-bottom: 1px solid var(--rule); overflow: hidden; }
.atlas-hero::after { content: ""; position: absolute; z-index: -1; width: 440px; height: 440px; right: 7%; top: -75px; border: 1px solid #c7e5cb30; border-radius: 50%; box-shadow: 0 0 0 62px #c7e5cb0b, 0 0 0 124px #c7e5cb0a; }
.atlas-hero-orbit { position: absolute; z-index: -1; right: calc(7% + 150px); top: 2.5rem; width: 26px; height: 26px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 36px #ff9b7680; }
.atlas-eyebrow, .atlas-section-label { display: flex; align-items: center; gap: .75rem; color: var(--mint); font-size: .68rem; font-weight: 820; letter-spacing: .22em; text-transform: uppercase; }
.atlas-eyebrow::before, .atlas-section-label::before { content: ""; width: 22px; height: 1px; background: var(--coral); }
.atlas-hero h1 { max-width: 900px; margin: 1.2rem 0 .8rem; font-size: clamp(3rem, 7.2vw, 7.5rem); font-weight: 770; line-height: .92; letter-spacing: -.075em; text-wrap: balance; }
.atlas-hero p { max-width: 500px; margin: 1rem 0 0; color: #c2d6cc; font-size: 1rem; }
.atlas-hero-stats { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: 2rem; color: var(--mint); font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .11em; }
.atlas-hero-stats span + span::before { content: "✳"; margin-right: 1.5rem; color: var(--coral); }

.atlas-catalog { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2rem, 4vw, 5rem); padding: 3.5rem 0 7rem; }
.atlas-rail { align-self: start; position: sticky; top: 130px; border-top: 1px solid var(--rule); }
body.admin-bar .atlas-rail { top: 162px; }
.atlas-rail h2 { margin: 1.6rem 0 1.3rem; color: var(--muted); font-size: .68rem; letter-spacing: .23em; text-transform: uppercase; }
.atlas-rail ul { list-style: none; margin: 0; padding: 0; }
.atlas-rail li { border-top: 1px solid var(--rule); }
.atlas-rail li:last-child { border-bottom: 1px solid var(--rule); }
.atlas-rail a { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .9rem 0; text-decoration: none; color: var(--paper); font-size: .87rem; }
.atlas-rail a:hover { color: var(--coral); }
.atlas-rail a::after { content: "↗"; color: var(--coral); }
.atlas-rail-note { margin-top: 2rem; padding: 1.3rem; border: 1px solid var(--rule); border-radius: 12px; color: #cadcd3; font-size: .75rem; }
.atlas-rail-note strong { display: block; margin-bottom: .35rem; color: var(--coral); font-size: 2rem; line-height: 1; }
.atlas-feed { min-width: 0; }
.atlas-feed-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.atlas-feed-header h2 { margin: .4rem 0 0; font-size: clamp(1.5rem, 3vw, 2.6rem); letter-spacing: -.055em; line-height: 1.1; }
.atlas-feed-count { color: var(--muted); white-space: nowrap; font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; }
.atlas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 1.7vw, 1.6rem); }
.atlas-card { min-width: 0; overflow: hidden; border-radius: 12px; background: var(--paper); color: var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
.atlas-card:hover { transform: translateY(-4px); box-shadow: 0 22px 38px #03141666; }
.atlas-card a { display: block; height: 100%; text-decoration: none; }
.atlas-card-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(circle at 65% 35%, #b9dfc4 0 10%, transparent 10.2%), repeating-radial-gradient(circle at 65% 35%, #ffffff33 0 1px, transparent 1px 28px), var(--forest-2); }
.atlas-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.atlas-card:hover .atlas-card-cover img { transform: scale(1.04); }
.atlas-card-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mint); font-size: 4rem; font-weight: 200; }
.atlas-card-duration { position: absolute; right: .65rem; bottom: .65rem; z-index: 1; border-radius: 5px; padding: .22rem .48rem; background: #0b2225ec; color: #fff; font-size: .68rem; font-variant-numeric: tabular-nums; font-weight: 750; }
.atlas-card-body { min-height: 142px; display: flex; flex-direction: column; padding: 1rem 1.1rem 1.2rem; }
.atlas-card-index { color: #57746e; font-size: .66rem; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.atlas-card h3 { margin: .42rem 0 .9rem; font-size: 1.1rem; line-height: 1.26; letter-spacing: -.026em; overflow-wrap: anywhere; }
.atlas-card-meta { display: flex; align-items: center; gap: .65rem; margin-top: auto; color: #55716e; font-size: .68rem; font-weight: 720; text-transform: uppercase; letter-spacing: .07em; }
.atlas-card-meta span + span::before { content: "/"; margin-right: .65rem; color: #a0b0a7; }
.atlas-empty { padding: 4rem 2rem; border: 1px dashed var(--rule); border-radius: 12px; text-align: center; }
.atlas-empty b { display: block; color: var(--coral); font-size: 5rem; line-height: 1; }
.atlas-empty h2 { font-size: 2rem; letter-spacing: -.05em; }
.atlas-empty a, .atlas-text-link { color: var(--coral); text-underline-offset: .25em; }
.fg-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 3rem 0 0; }
.fg-pagination a, .fg-pagination span { min-width: 2.5rem; min-height: 2.5rem; display: inline-grid; place-items: center; border: 1px solid var(--rule); border-radius: 6px; padding: .35rem .7rem; color: var(--paper); text-decoration: none; font-size: .8rem; font-weight: 700; }
.fg-pagination a:hover, .fg-pagination .current { border-color: var(--coral); background: var(--coral); color: var(--night); }

.atlas-watch { padding-top: 3.5rem; padding-bottom: 7rem; }
.atlas-breadcrumb { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; color: var(--muted); font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.atlas-breadcrumb a { color: var(--mint); text-decoration: none; }
.atlas-breadcrumb a:hover { color: var(--coral); }
.atlas-watch-header { max-width: 1040px; margin-bottom: 2.5rem; }
.atlas-watch-header h1 { margin: .85rem 0; font-size: clamp(2.5rem, 5.8vw, 6rem); line-height: 1; letter-spacing: -.065em; overflow-wrap: anywhere; text-wrap: balance; }
.atlas-watch-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.atlas-screen { max-width: 1180px; padding: clamp(.35rem, 1.2vw, .9rem); border: 1px solid #8bb4a689; border-radius: 16px; background: linear-gradient(135deg, #295f5d, #19373c 55%, #be7863); box-shadow: 0 25px 65px #03141688; }
.atlas-player { position: relative; overflow: hidden; border-radius: 9px; background: #050b0d; }
.atlas-player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #050b0d; }
.fg-player-status { margin: 0; padding: .55rem 1rem; color: #dae6df; font-size: .75rem; }
.fg-unavailable { padding: 3rem 1rem; text-align: center; }
.atlas-watch-detail { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 3rem; max-width: 1180px; margin: 3rem 0 5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.atlas-watch-detail h2, .atlas-related h2 { margin: .7rem 0 1rem; font-size: clamp(1.7rem, 3vw, 2.7rem); letter-spacing: -.045em; }
.atlas-watch-detail p { max-width: 780px; color: #c2d6cc; overflow-wrap: anywhere; }
.atlas-watch-detail aside { padding: 1.2rem; border: 1px solid var(--rule); border-radius: 10px; align-self: start; }
.atlas-watch-detail aside span { display: block; margin-bottom: .6rem; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .15em; }
.atlas-watch-detail aside a { display: block; color: var(--coral); text-underline-offset: .2em; }
.atlas-watch-detail aside a + a { margin-top: .55rem; }
.atlas-related { padding-top: 2rem; border-top: 1px solid var(--rule); }
.atlas-related-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.atlas-related-head a { color: var(--coral); font-size: .78rem; font-weight: 750; white-space: nowrap; }
.atlas-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.atlas-not-found { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 5rem; }
.atlas-not-found strong { color: var(--coral); font-size: clamp(6rem, 17vw, 14rem); line-height: .9; letter-spacing: -.08em; }
.atlas-not-found h1 { margin: 1rem 0 0; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.06em; }
.atlas-not-found p { color: var(--muted); }
.atlas-not-found a { margin-top: 1rem; color: var(--coral); font-weight: 800; }
.atlas-foot { border-top: 1px solid var(--rule); }
.atlas-foot-inner { width: min(100% - 3rem, var(--width)); margin-inline: auto; padding: 2.5rem 0; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; color: var(--muted); font-size: .75rem; }
.atlas-foot strong { color: var(--paper); }
.atlas-foot a { color: var(--mint); text-decoration: none; }
.atlas-foot a:hover { color: var(--coral); }

@media (max-width: 1120px) {
  .atlas-head-inner { grid-template-columns: 1fr auto; gap: .8rem 2rem; padding-block: .85rem; }
  .atlas-nav { justify-self: end; }
  .atlas-search { grid-column: 1 / -1; width: 100%; max-width: none; }
  .atlas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body.admin-bar .atlas-head { top: 46px; }
  .atlas-main, .atlas-watch, .atlas-not-found, .atlas-head-inner, .atlas-foot-inner { width: min(100% - 2rem, var(--width)); }
  .atlas-head-inner { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; }
  .atlas-brand-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .atlas-nav { gap: 1rem; }
  .atlas-nav a { font-size: .68rem; }
  .atlas-nav a:last-child { display: none; }
  .atlas-hero { min-height: 320px; padding: 3.2rem 0 3.3rem; }
  .atlas-hero::after { right: -230px; opacity: .7; }
  .atlas-hero-orbit { right: 12px; top: 3rem; }
  .atlas-catalog { display: block; padding-top: 2.2rem; }
  .atlas-rail { position: static; margin-bottom: 2.6rem; }
  .atlas-rail h2 { margin: 1rem 0 .7rem; }
  .atlas-rail ul { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
  .atlas-rail li, .atlas-rail li:last-child { border: 0; }
  .atlas-rail a { white-space: nowrap; border: 1px solid var(--rule); border-radius: 999px; padding: .45rem .75rem; }
  .atlas-rail a::after, .atlas-rail-note { display: none; }
  .atlas-watch-detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .atlas-related-grid { gap: .8rem; }
  .atlas-foot-inner { flex-wrap: wrap; }
}
@media (max-width: 470px) {
  .atlas-brand-title { max-width: 145px; font-size: .9rem; }
  .atlas-brand-kicker { font-size: .55rem; }
  .atlas-nav a { font-size: .62rem; }
  .atlas-grid { grid-template-columns: 1fr; }
  .atlas-card-cover { aspect-ratio: 16 / 9; }
  .atlas-card-body { min-height: 0; }
  .atlas-feed-header { align-items: start; }
  .atlas-feed-count { margin-top: .3rem; }
  .atlas-related-grid { grid-template-columns: 1fr; }
  .atlas-related-head { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .atlas-card, .atlas-card-cover img { transition: none; }
}
