/* Polarlight homepage: opener + work-by-category showcase */

/* ---------- Opener ---------- */
html.pl-op-cover::after { content: ""; position: fixed; inset: 0; background: #050506; z-index: 9998; }
html.pl-op-run, html.pl-op-run body { overflow: hidden; }
.pl-op {
  --beam: linear-gradient(90deg, transparent, #f9d648 18%, #f58b2e 50%, #ef3b36 82%, transparent);
  position: fixed; inset: 0; z-index: 9999; background: #050506; overflow: hidden;
  color: #ece8e1; font-family: var(--sans, "Archivo", "Helvetica Neue", Arial, sans-serif);
  transition: opacity .65s cubic-bezier(.4,0,.2,1);
}
.pl-op.is-out { opacity: 0; pointer-events: none; }
.op-stage { position: absolute; inset: 0; }
.op-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 34% at 50% 30%, rgba(245,139,46,.16), transparent 70%),
              radial-gradient(40% 18% at 62% 26%, rgba(239,59,54,.10), transparent 70%); }
.op-plane {
  --tw: 24vw; --gap: .9vw;
  --pw: calc(var(--cols) * var(--tw) + (var(--cols) - 1) * var(--gap));
  --ph: calc(var(--rows) * var(--tw) * 9 / 16 + (var(--rows) - 1) * var(--gap));
  position: absolute; left: 50%; top: 50%; width: var(--pw); height: var(--ph);
  margin-left: calc(var(--pw) / -2); margin-top: calc(var(--ph) / -2);
  display: grid; grid-template-columns: repeat(var(--cols), var(--tw)); grid-auto-rows: calc(var(--tw) * 9 / 16); gap: var(--gap);
  transform: perspective(1500px) translateY(-4vh) rotateX(36deg) rotateZ(-12deg) scale(1.06);
  transform-origin: 50% 50%; will-change: transform; flex: none;
}
@media (max-width: 760px) { .op-plane { --tw: 46vw; --gap: 1.6vw; } }
.op-tile {
  position: relative; aspect-ratio: 16 / 9; width: var(--tw); background: #111214; overflow: hidden;
  opacity: 0; filter: brightness(.15); transition: filter .55s ease, box-shadow .55s ease;
}
.op-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.is-open .op-tile { animation: op-light .9s cubic-bezier(.2,.7,.1,1) forwards; animation-delay: var(--d); }
@keyframes op-light { 0% { opacity: 0; filter: brightness(2.2) saturate(0); } 35% { opacity: 1; } 100% { opacity: 1; filter: brightness(.82) saturate(.95); } }
.is-lit .op-tile { animation: none; opacity: 1; filter: brightness(.82) saturate(.95); }
/* category highlight */
.op-plane[data-active] .op-tile { filter: brightness(.22) saturate(.25); }
.op-plane[data-active] .op-tile.op-center { filter: brightness(.22) saturate(.25); }
.op-plane[data-active=cities] .op-tile[data-cat=cities],
.op-plane[data-active=agencies] .op-tile[data-cat=agencies],
.op-plane[data-active=destinations] .op-tile[data-cat=destinations],
.op-plane[data-active=documentaries] .op-tile[data-cat=documentaries],
.op-plane[data-active=brands] .op-tile[data-cat=brands] { filter: brightness(1.05) saturate(1.05); box-shadow: 0 0 0 2px rgba(249,214,72,.85), 0 0 60px rgba(245,139,46,.55); }
.is-landing .op-tile { filter: brightness(.55) saturate(.8); }
.is-landing .op-tile.op-center { filter: none; box-shadow: none; }

.op-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 110% at 50% 50%, transparent 50%, rgba(5,5,6,.5) 85%, rgba(5,5,6,.85) 100%); transition: opacity .8s ease; }
.is-landing .op-vignette { opacity: 0; }
.op-stage { transition: filter .9s cubic-bezier(.2,.7,.1,1); }
.is-blur .op-stage { filter: blur(18px) brightness(1.08); }

/* gate: two black halves that part along the beam */
.op-gate { position: absolute; left: 0; right: 0; height: 50.2%; background: #050506; z-index: 2;
  transition: transform 1.15s cubic-bezier(.7,0,.15,1); }
.op-gate-t { top: 0; } .op-gate-b { bottom: 0; }
.is-open .op-gate-t { transform: translateY(-101%); }
.is-open .op-gate-b { transform: translateY(101%); }

.op-beam { position: absolute; left: 0; right: 0; top: 50%; height: 0; z-index: 3; pointer-events: none; }
.op-beam i { position: absolute; left: 50%; top: -1px; height: 2px; width: 0; transform: translateX(-50%);
  background: var(--beam); box-shadow: 0 0 18px 3px rgba(245,139,46,.55), 0 0 70px 8px rgba(239,59,54,.25); }
.is-beam .op-beam i { animation: op-beam 1s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes op-beam { to { width: 110vw; } }
.is-open .op-beam { animation: op-beam-out 1.1s cubic-bezier(.7,0,.15,1) forwards; }
@keyframes op-beam-out { 0% { opacity: 1; transform: scaleY(1); } 40% { opacity: 1; transform: scaleY(14); filter: blur(6px); } 100% { opacity: 0; transform: scaleY(40); filter: blur(18px); } }

.op-logo { position: absolute; left: 50%; top: calc(50% - 64px); width: min(260px, 52vw); height: auto; z-index: 4;
  transform: translateX(-50%); opacity: 0; }
.is-beam .op-logo { animation: op-logo 1.5s cubic-bezier(.2,.7,.1,1) forwards; }
@keyframes op-logo { 0% { opacity: 0; transform: translate(-50%, 10px); } 30% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 1; transform: translate(-50%, 0); filter: blur(0); } 100% { opacity: 0; transform: translate(-50%, -14px); filter: blur(6px); } }

.op-copy { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 4; text-align: center;
  display: grid; gap: 10px; justify-items: center; pointer-events: none; padding-inline: 16px;
  opacity: 0; transition: opacity .45s ease; }
.is-words .op-copy { opacity: 1; }
.op-copy::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(1100px, 120vw); height: 340px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(5,5,6,.78), transparent); z-index: -1; }
.op-kicker { font: 600 12px/1 var(--sans, "Archivo", sans-serif); font-stretch: 125%; letter-spacing: .3em; text-transform: uppercase; color: #c9c4bb; }
.op-words { position: relative; display: block; height: 1.05em; font: 800 clamp(48px, 9vw, 150px)/1.05 var(--display, "Archivo", sans-serif);
  font-stretch: 125%; letter-spacing: -.035em; width: 100%; }
.op-words b { position: absolute; inset: 0; font-weight: inherit; opacity: 0; transform: translateY(.35em); filter: blur(10px);
  transition: opacity .35s ease, transform .5s cubic-bezier(.2,.7,.1,1), filter .4s ease; white-space: nowrap;
  background: linear-gradient(180deg, #fff 30%, #f3d9a6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.op-words b.on { opacity: 1; transform: none; filter: none; }

.op-skip { position: absolute; z-index: 5; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
  display: grid; gap: 8px; padding: 10px 14px; background: rgba(12,13,15,.55); color: #ece8e1; border: 1px solid rgba(236,232,225,.2);
  border-radius: 2px; font: 600 11px/1 var(--sans, "Archivo", sans-serif); font-stretch: 125%; letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.op-skip:hover { border-color: rgba(245,139,46,.8); }
.op-skip:focus-visible { outline: 2px solid #f58b2e; outline-offset: 3px; }
.op-progress { display: block; height: 2px; background: rgba(236,232,225,.15); overflow: hidden; }
.op-progress i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #f9d648, #f58b2e, #ef3b36);
  transform-origin: 0 50%; transform: scaleX(0); animation: op-prog linear forwards; }
@keyframes op-prog { to { transform: scaleX(1); } }

/* hero hand-off */
html.pl-op-reveal .hero .eyebrow, html.pl-op-reveal .hero h1, html.pl-op-reveal .hero .lede,
html.pl-op-reveal .hero .hero-actions, html.pl-op-reveal .hero .hero-foot, html.pl-op-reveal .site-header {
  animation: op-rise 1s cubic-bezier(.2,.7,.1,1) both; }
html.pl-op-reveal .hero h1 { animation-delay: .12s; }
html.pl-op-reveal .hero .lede { animation-delay: .24s; }
html.pl-op-reveal .hero .hero-actions { animation-delay: .36s; }
html.pl-op-reveal .hero .hero-foot { animation-delay: .5s; }
html.pl-op-reveal .site-header { animation-name: op-fade; animation-delay: .3s; }
@keyframes op-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes op-fade { from { opacity: 0; } to { opacity: 1; } }
html.pl-op-reveal .hero-media img { animation: op-settle 2.4s cubic-bezier(.2,.7,.1,1) both; }
@keyframes op-settle { from { transform: scale(1.06); } to { transform: scale(1); } }

/* ---------- Work by category ---------- */
.showcase { display: flex; gap: 10px; height: clamp(440px, 64vh, 660px); margin-top: clamp(28px, 4vw, 48px); }
.sc-panel {
  --tint: var(--accent, #f58b2e);
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--radius-md, 4px);
  text-decoration: none; color: var(--ink, #ece8e1); background: #111214; isolation: isolate;
  transition: flex-grow .9s cubic-bezier(.2,.7,.1,1);
}
.sc-panel.is-active { flex-grow: 3.6; }
.sc-slides { position: absolute; inset: 0; z-index: -2; }
.sc-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transform: scale(1.12); transition: opacity 1.2s ease, transform 7s linear; filter: saturate(.85); }
.sc-slides img.on { opacity: 1; transform: scale(1); }
.sc-panel:not(.is-active) .sc-slides img { filter: saturate(.3) brightness(.7); }
.sc-shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12,13,15,.15) 0%, rgba(12,13,15,.2) 45%, rgba(12,13,15,.92) 100%),
              linear-gradient(90deg, color-mix(in srgb, var(--tint) 22%, transparent), transparent 60%); }
.sc-panel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tint);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.sc-panel.is-active::after { transform: scaleX(1); }
.sc-num { position: absolute; top: 18px; left: 20px; font: 600 12px/1 var(--sans, "Archivo", sans-serif); font-stretch: 125%;
  letter-spacing: .14em; color: var(--tint); font-variant-numeric: tabular-nums; }
.sc-tab { position: absolute; left: 18px; bottom: 22px; writing-mode: vertical-rl; transform: rotate(180deg);
  font: 700 clamp(15px, 1.25vw, 19px)/1 var(--display, "Archivo", sans-serif); font-stretch: 125%; text-transform: uppercase;
  letter-spacing: .04em; white-space: nowrap; transition: opacity .4s ease; }
.sc-panel.is-active .sc-tab { opacity: 0; }
.sc-body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(20px, 2.4vw, 34px); display: grid; gap: 10px;
  opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .7s cubic-bezier(.2,.7,.1,1);
  max-width: 560px; pointer-events: none; }
.sc-panel.is-active .sc-body { opacity: 1; transform: none; transition-delay: .25s; }
.sc-body h3 { font-size: clamp(24px, 2.4vw, 38px); }
.sc-body p { margin: 0; color: var(--ink-2, #c9c4bb); max-width: 44ch; }
.sc-clients { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px;
  font: 600 11px/1.3 var(--sans, "Archivo", sans-serif); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #9a968e); }
.sc-go { margin-top: 6px; display: inline-flex; gap: 10px; align-items: center; font: 600 12px/1 var(--sans, "Archivo", sans-serif); font-stretch: 125%;
  letter-spacing: .14em; text-transform: uppercase; color: var(--tint); }
.sc-go::after { content: "\2192"; transition: translate .3s ease; }
.sc-panel:hover .sc-go::after, .sc-panel:focus-visible .sc-go::after { translate: 5px 0; }
.sc-panel:focus-visible { outline: 2px solid var(--tint); outline-offset: 3px; }

@media (max-width: 820px) {
  .showcase { height: auto; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px;
    margin-inline: calc(-1 * var(--gutter, 16px)); padding-inline: var(--gutter, 16px); scrollbar-width: none; }
  .showcase::-webkit-scrollbar { display: none; }
  .sc-panel, .sc-panel.is-active { flex: 0 0 84%; height: 440px; scroll-snap-align: center; }
  .sc-panel .sc-tab { display: none; }
  .sc-panel .sc-body { opacity: 1; transform: none; }
  .sc-panel .sc-slides img { filter: saturate(.9); }
  .sc-panel::after { transform: scaleX(1); }
  .sc-shade { background: linear-gradient(180deg, rgba(12,13,15,.1) 0%, rgba(12,13,15,.35) 35%, rgba(12,13,15,.94) 72%),
              linear-gradient(90deg, color-mix(in srgb, var(--tint) 18%, transparent), transparent 60%); }
}
@media (prefers-reduced-motion: reduce) {
  .sc-panel, .sc-slides img, .sc-body { transition: none !important; }
  .sc-slides img { transform: none !important; }
}

/* preview-only chip */
.pl-preview-chip { position: fixed; z-index: 60; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: flex; gap: 10px; align-items: center; padding: 8px 10px 8px 14px; background: rgba(12,13,15,.85); border: 1px solid rgba(236,232,225,.18);
  border-radius: 2px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 600 11px/1 var(--sans, "Archivo", sans-serif); font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; color: #c9c4bb; }
.pl-preview-chip button { all: unset; cursor: pointer; padding: 7px 10px; background: #f58b2e; color: #0c0d0f; border-radius: 2px; }
.pl-preview-chip button:focus-visible { outline: 2px solid #f9d648; outline-offset: 2px; }

/* Intro: keep the longest word ("Documentaries.") fully on screen on phones */
@media (max-width: 760px) {
  .op-words { font-size: min(48px, 10vw); font-stretch: 100%; letter-spacing: -.02em; }
}
/* op-words fit on phones */
