/*
 * OUTSPACE STUDIOS — "Orbit" hero (v19)
 * The logo is an orbit; the hero is one. Loaded on index.html after polish-v19.css.
 */

.hero .hero-orb, .hero .hero-art-orbit { display: none; }

/* ───────────── Headline ───────────── */
.hero h1 { font-size: clamp(60px, 7.6vw, 112px); max-width: none; }
.hero .rotator {
  position: relative; display: inline-block; vertical-align: bottom;
  overflow: hidden; white-space: nowrap; vertical-align: text-top;
  height: 1.16em; padding: 0 .06em .24em; margin: 0 -.06em -.24em; line-height: .91;
  transition: width .7s var(--os-ease, cubic-bezier(.2,.75,.2,1));
}
.hero .rot-word {
  position: absolute; left: .06em; top: .185em; display: inline-block; /* .185em = half-leading, so the baseline matches the inline “move.” */
  background: linear-gradient(105deg, #5f3dd8 0%, #8466f5 50%, #4f70d9 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  padding-right: .04em;
  opacity: 0; transform: translateY(135%);
  transition: transform .7s var(--os-ease, cubic-bezier(.2,.75,.2,1)), opacity .5s ease;
}
:root[data-theme="dark"] .hero .rot-word { background: linear-gradient(105deg, #fff 5%, #b7a6ff 48%, #6e8aff 92%); -webkit-background-clip: text; background-clip: text; }
.hero .rot-word.is-current { opacity: 1; transform: none; }
.hero .rot-word.is-leaving { opacity: 0; transform: translateY(-135%); }
/* Before the script runs (or without it) the first word sits in normal flow so nothing collapses. */
.hero .rotator:not(.is-live) .rot-word:first-child { position: relative; left: 0; opacity: 1; transform: none; }

/* ───────────── Stage ───────────── */
.orbit-stage {
  position: absolute; z-index: 2; pointer-events: none;
  right: max(2%, calc((100vw - 1500px) / 2)); top: 50%;
  width: min(56vw, 780px); height: min(72vh, 640px);
  transform: translateY(-46%);
  --card-w: clamp(92px, 10vw, 142px);
}
.orbit-glow {
  position: absolute; inset: -6%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(121, 86, 244, .22), rgba(121, 86, 244, .06) 55%, transparent 72%);
  animation: orbit-breathe 7s ease-in-out infinite;
}
:root[data-theme="dark"] .orbit-glow { background: radial-gradient(closest-side, rgba(110, 80, 255, .42), rgba(110, 80, 255, .12) 55%, transparent 72%); }
@keyframes orbit-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }

.orbit-stars {
  position: absolute; inset: 0; opacity: .75;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #7956f4 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 78%, #7956f4 50%, transparent 51%),
    radial-gradient(2px 2px at 71% 14%, #ff4a0d 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 62%, #7956f4 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 92%, #7956f4 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 56%, #ff4a0d 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 30%, #7956f4 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 8%, #7956f4 50%, transparent 51%);
  animation: orbit-twinkle 5s ease-in-out infinite alternate;
}
:root[data-theme="dark"] .orbit-stars { opacity: .9; filter: brightness(1.7); }
@keyframes orbit-twinkle { from { opacity: .35; } to { opacity: .9; } }

/* The tilted plane everything orbits in. JS sets --tx/--ty/--rx/--ry for pointer parallax. */
.orbit-sys {
  position: absolute; inset: 0;
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-14deg);
  transform-style: flat;
}
.orbit-ring {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  width: calc(var(--rw) * 100%); height: calc(var(--rh) * 100%);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(117, 86, 239, .3);
}
.orbit-ring.ring-1 { --rw: .48; --rh: .32; }
.orbit-ring.ring-2 { --rw: .80; --rh: .58; border-color: rgba(117, 86, 239, .2); }
.orbit-ring.ring-3 { --rw: .92; --rh: .78; border-style: dashed; border-color: rgba(117, 86, 239, .18); }
:root[data-theme="dark"] .orbit-ring { border-color: rgba(190, 175, 255, .26); }
:root[data-theme="dark"] .orbit-ring.ring-2 { border-color: rgba(190, 175, 255, .16); }
:root[data-theme="dark"] .orbit-ring.ring-3 { border-color: rgba(190, 175, 255, .14); }

.orbit-dot {
  position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: #ff4a0d; box-shadow: 0 0 14px 3px rgba(255, 74, 13, .55); z-index: 12;
}
.orbit-dot.is-violet { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #8466f5; box-shadow: 0 0 12px 3px rgba(132, 102, 245, .6); }

/* Core: the Outspace mark — an orange ring with a small moon. */
.orbit-core { position: absolute; left: 50%; top: 50%; width: calc(var(--card-w) * 0.9); aspect-ratio: 1; transform: translate(-50%, -50%) rotate(14deg); z-index: 20; }
.core-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: clamp(9px, 1.15vw, 16px) solid #ff4a0d;
  box-shadow: 0 0 40px rgba(255, 74, 13, .45), inset 0 0 30px rgba(255, 74, 13, .35);
  animation: core-pulse 4.5s ease-in-out infinite;
}
.core-moon { position: absolute; inset: -14%; animation: core-spin 14s linear infinite; }
.core-moon::after {
  content: ""; position: absolute; left: 78%; top: 8%; width: 26%; aspect-ratio: 1; border-radius: 50%;
  background: #ff4a0d; box-shadow: 0 0 22px 5px rgba(255, 74, 13, .6);
}
.core-ripple { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 74, 13, .55); opacity: 0; animation: core-ripple 5s ease-out infinite; }
.core-ripple:nth-of-type(2) { animation-delay: 2.5s; }
@keyframes core-pulse { 0%, 100% { box-shadow: 0 0 36px rgba(255, 74, 13, .4), inset 0 0 26px rgba(255, 74, 13, .3); } 50% { box-shadow: 0 0 60px rgba(255, 74, 13, .65), inset 0 0 38px rgba(255, 74, 13, .45); } }
@keyframes core-spin { to { transform: rotate(360deg); } }
@keyframes core-ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.4); opacity: 0; } }

/* Orbiting work */
.orbit-card {
  position: absolute; left: 50%; top: 50%; width: var(--card-w); display: block; pointer-events: auto;
  background: #fff; border: 1px solid rgba(25, 22, 32, .1); border-radius: 7px; padding: 7px 7px 0;
  box-shadow: 0 22px 60px rgba(29, 23, 45, .22);
  /* static fallback if the script cannot run */
  transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0) translate(-50%, -50%) rotate(14deg);
  will-change: transform, opacity; cursor: pointer; text-decoration: none; color: inherit;
}
.orbit-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; background: #e9e5ee; }
.orbit-card figcaption, .orbit-card .card-no { display: flex; justify-content: space-between; align-items: center; height: 24px; font-size: 9px; letter-spacing: .12em; color: #6f6a78; }
.orbit-card .card-no b { font-weight: 500; color: #7956f4; }
.orbit-card:hover, .orbit-card:focus-visible { box-shadow: 0 30px 80px rgba(60, 40, 140, .4), 0 0 0 2px #7956f4; }
:root[data-theme="dark"] .orbit-card { background: #211e29; border-color: rgba(255, 255, 255, .14); box-shadow: 0 22px 60px rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .orbit-card .card-no { color: #b7b0c3; }
:root[data-theme="dark"] .orbit-card .card-no b { color: #b6a5ff; }
:root[data-theme="dark"] .orbit-card:hover, :root[data-theme="dark"] .orbit-card:focus-visible { box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 2px #b6a5ff; }

/* Caption: always names the piece currently at the front */
.orbit-caption {
  position: absolute; left: 4%; bottom: 0; pointer-events: auto; z-index: 40;
  display: grid; gap: 3px; max-width: 280px; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(25, 22, 32, .08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #17151d; text-decoration: none; transition: opacity .3s ease, transform .3s ease;
}
.orbit-caption small { font-size: 10px; letter-spacing: .16em; color: #6f6a78; text-transform: uppercase; }
.orbit-caption strong { font-size: 19px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.orbit-caption span { font-size: 12px; color: #7956f4; }
.orbit-caption.is-swapping { opacity: 0; transform: translateY(6px); }
.orbit-caption:hover strong { text-decoration: underline; text-underline-offset: 4px; }
:root[data-theme="dark"] .orbit-caption { background: rgba(22, 20, 29, .72); border-color: rgba(255, 255, 255, .1); color: #f7f6fa; }
:root[data-theme="dark"] .orbit-caption small { color: #aaa5b3; }
:root[data-theme="dark"] .orbit-caption span { color: #b6a5ff; }

.orbit-pause {
  position: absolute; right: 2%; bottom: 4px; z-index: 40; pointer-events: auto;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid rgba(20, 18, 26, .3); color: #17151d; font-size: 11px; line-height: 1;
  transition: background .2s, color .2s;
}
.orbit-pause:hover { background: #17151d; color: #fff; }
:root[data-theme="dark"] .orbit-pause { border-color: rgba(255, 255, 255, .4); color: #fff; }
:root[data-theme="dark"] .orbit-pause:hover { background: #7956f4; border-color: #7956f4; }

/* ───────────── Tablet & phone: stack text above the orbit ───────────── */
@media (max-width: 1100px) {
  .hero.section-dark { min-height: 0; height: auto; padding: 112px 0 30px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .hero .hero-content { padding-top: 18px; }
  .hero h1 { font-size: clamp(54px, 11.5vw, 100px); }
  .hero .hero-index { margin-top: 28px; }
  .orbit-stage {
    position: relative; right: auto; top: auto; transform: none;
    width: min(100%, 680px); height: clamp(340px, 78vw, 520px); margin: 18px auto 84px;
    --card-w: clamp(78px, 19vw, 128px);
  }
  .orbit-caption { left: 2%; bottom: -78px; max-width: 70%; padding: 10px 14px; }
  .orbit-pause { top: 0; bottom: auto; right: 2%; }
  .orbit-caption strong { font-size: 16px; }
}
@media (max-width: 520px) {
  .orbit-ring.ring-3 { display: none; }
  .orbit-card .card-no { height: 18px; font-size: 0; }
  .orbit-card .card-no b { font-size: 9px; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-glow, .orbit-stars, .core-ring, .core-moon, .core-ripple { animation: none; }
  .core-ripple { display: none; }
}

/* Visually hidden, still read by screen readers (the visible headline words rotate) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


/* OUTSPACE 2.1 — visual refinement: clean orbit, confident type, reliable themes */
/* Homepage header sits over the dark hero in both themes. */
body:not(.inner-page) .header,
body:not(.inner-page) .header.is-scrolled,
:root[data-theme="light"] body:not(.inner-page) .header.is-scrolled {
  color:#f7f6fa; background:rgba(9,9,13,.82); border-bottom:1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)
}
body:not(.inner-page) .header .nav>a:not(.nav-cta),
body:not(.inner-page) .header .theme-toggle {color:#f7f6fa!important;opacity:1}
body:not(.inner-page) .header .nav-cta {color:#fff;border-color:rgba(255,255,255,.48)}
body:not(.inner-page) .header .menu-toggle span {background:#fff}
/* Inner pages: theme-aware logo and navigation contrast. */
:root[data-theme="light"] .inner-page .brand img {filter:none}
:root[data-theme="light"] .inner-page .header {color:#17151d;border-bottom-color:rgba(17,16,22,.12)}
:root[data-theme="light"] .inner-page .header .nav>a:not(.nav-cta) {color:#17151d;opacity:.82}
:root[data-theme="light"] .inner-page .header .nav-cta {color:#17151d;border-color:rgba(17,16,22,.35)}
:root[data-theme="light"] .inner-page .header .theme-toggle {color:#17151d;border-color:rgba(17,16,22,.28);background:rgba(17,16,22,.04)}
:root[data-theme="dark"] .inner-page .brand img {filter:brightness(0) invert(1)}
:root[data-theme="dark"] .inner-page .header {color:#f7f6fa}
:root[data-theme="dark"] .inner-page .header .nav>a:not(.nav-cta) {color:#f7f6fa;opacity:.9}
:root[data-theme="dark"] .inner-page .header .theme-toggle {color:#fff}
/* Orbit: keep the artwork in motion, remove the card UI treatment. */
.orbit-stage {--card-w:clamp(112px,12vw,168px);pointer-events:none}
.orbit-card {pointer-events:auto;width:var(--card-w);padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible;filter:drop-shadow(0 18px 30px rgba(0,0,0,.24));}
.orbit-card img {width:100%;height:auto;aspect-ratio:4/5;object-fit:contain;border-radius:0;background:transparent}
.orbit-card:hover,.orbit-card:focus-visible {box-shadow:none!important;filter:drop-shadow(0 20px 36px rgba(110,80,255,.38));outline:2px solid rgba(182,165,255,.7);outline-offset:5px}
.orbit-card .card-no,.orbit-caption {display:none!important}
.orbit-pause {opacity:.42;transform:scale(.86);transition:opacity .2s,transform .2s}
.orbit-stage:hover .orbit-pause,.orbit-pause:focus-visible {opacity:1;transform:none}
.hero h1 {max-width:760px;font-size:clamp(58px,7.2vw,108px);line-height:.94;letter-spacing:-.075em}
.hero .hero-bottom {max-width:650px;margin-top:36px}
.hero .hero-bottom p {font-size:clamp(16px,1.35vw,19px);line-height:1.55;max-width:390px}
/* Work imagery: use the frame intentionally, fill the area, preserve poster proportions. */
.portfolio-tile figure,.work-showcase-grid .work-card figure {background:#f0eeeb;overflow:hidden}
.portfolio-tile img,.work-showcase-grid .work-card img {width:100%;height:100%;object-fit:cover;object-position:center}
.portfolio-tile.is-portrait figure {aspect-ratio:4/5;background:#f0eeeb}
.portfolio-tile.is-portrait img {object-fit:contain}
.portfolio-tile.is-logo img {object-fit:contain}
/* Reduce micro-copy and give key content more breathing room. */
.eyebrow,.hero-index,.hero-side-label,.work-number,.editorial-card-index {font-size:12px!important;letter-spacing:.09em}
.portfolio-tile .work-meta>div>span,.work-showcase-grid .work-meta>div>span {font-size:11px!important;letter-spacing:.07em}
.portfolio-tile .tile-description,.editorial-home-meta p {font-size:14px;line-height:1.55}
.client-note,.footer-bottom,.filter-status {font-size:13px}
@media(max-width:1100px){
 .orbit-stage {width:min(100%,720px);height:clamp(360px,76vw,540px);margin:12px auto 40px;--card-w:clamp(94px,15vw,150px)}
 .orbit-caption {display:none!important}
 .hero h1 {font-size:clamp(54px,10vw,90px)}
}
@media(max-width:900px){
 :root[data-theme="light"] .inner-page .nav {background:#f3f1ed}
 :root[data-theme="light"] .inner-page .nav>a:not(.nav-cta),:root[data-theme="light"] .inner-page .nav .theme-toggle {color:#17151d!important}
 :root[data-theme="light"] .inner-page .nav .menu-toggle span {background:#17151d}
 :root[data-theme="dark"] .inner-page .nav {background:#111015}
 :root[data-theme="dark"] .inner-page .nav>a:not(.nav-cta),:root[data-theme="dark"] .inner-page .nav .theme-toggle {color:#f7f6fa!important}
}
@media(max-width:600px){
 .wrap {width:calc(100% - 40px)}
 .hero h1 {font-size:clamp(48px,11.5vw,68px);line-height:.98;letter-spacing:-.07em}
 .hero .hero-bottom {margin-top:26px;gap:20px;align-items:flex-start}
 .hero .hero-bottom p {font-size:15px;max-width:270px}
 .orbit-stage {height:clamp(300px,88vw,390px);margin:0 auto 30px;--card-w:clamp(82px,22vw,112px)}
 .orbit-card {filter:drop-shadow(0 10px 18px rgba(0,0,0,.25))}
 .orbit-ring.ring-2 {--rw:.84;--rh:.62}
 .portfolio-tile figure,.work-showcase-grid .work-card figure {aspect-ratio:1.08/1}
 .portfolio-tile.is-portrait figure {aspect-ratio:4/5}
 .portfolio-tile .work-meta h3,.work-showcase-grid .work-meta h3 {font-size:22px}
}
