/* Adelko Studio — OPX-style void gallery + glass controls */
:root {
  --void: #020202;
  --black: #000;
  --hairline: #292a2c;
  --white: #fff;
  --ash: #9b9b9b;

  --glass-bg: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  --glass-bg-hover: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.10));
  --glass-line: rgba(255,255,255,.28);
  --glass-blur: blur(22px) saturate(160%);

  --f-display: 'Inter Tight', 'Söhne', ui-sans-serif, system-ui, sans-serif;
  --f-ui: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --pad: clamp(20px, 4.2vw, 80px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--void); color: var(--white); }
body {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.67;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--ash); }

/* ---------- Stage ---------- */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.shade {
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(2,2,2,.55) 0%, rgba(2,2,2,0) 22%),
    linear-gradient(to top, rgba(2,2,2,.72) 0%, rgba(2,2,2,.25) 32%, rgba(2,2,2,0) 55%);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .6s var(--ease);
}
.glass:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,.5); }
.glass-panel {
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,.22);
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-ui); font-weight: 500; font-size: 14px; line-height: 1;
  letter-spacing: .01em;
  padding: 13px 22px;
  border-radius: 45px;
  white-space: nowrap;
}
.pill.lg { padding: 18px 30px; font-size: 15px; }
.pill.solid { background: rgba(255,255,255,.88); color: var(--void); border-color: #fff; }
.pill.solid:hover { background: #fff; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.round {
  width: 60px; height: 60px; border-radius: 50%;
  display: inline-grid; place-items: center;
}
.round svg { transition: transform .6s var(--ease); }
.round:hover svg { transform: translateY(3px); }
.round.up svg { transform: rotate(180deg); }
.round.up:hover svg { transform: rotate(180deg) translateY(3px); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid #fff; outline-offset: 3px;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--void);
  padding: var(--pad);
  display: flex; flex-direction: column; justify-content: space-between;
}
.loader-top { display: flex; justify-content: space-between; font-size: 18px; }
.loader-foot { display: flex; flex-direction: column; }
.loader-num {
  font-size: clamp(96px, 22vw, 340px);
  line-height: .82; letter-spacing: -.055em; font-weight: 300;
  display: flex; align-items: flex-start;
  overflow: hidden; padding-top: .04em;
  font-variant-numeric: tabular-nums;
}
.loader-sign { font-size: .28em; letter-spacing: 0; margin: .12em 0 0 .08em; color: var(--ash); }
.loader-bar { position: relative; height: 1px; background: var(--hairline); margin-top: 28px; }
.loader-bar i { position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 24px var(--pad);
}
.brand { font-size: 26px; line-height: 1; letter-spacing: -.02em; }
.nav-links {
  display: flex; gap: 2px; padding: 4px; border-radius: 45px;
}
.nav-links button,
.nav-links a {
  font-family: var(--f-ui); font-weight: 500; font-size: 14px; line-height: 1;
  padding: 11px 18px; border-radius: 45px; text-decoration: none; color: #fff;
  transition: background .4s var(--ease);
}
.nav-links button:hover,
.nav-links a:hover { background: rgba(255,255,255,.14); }

/* ---------- Scenes ---------- */
.scene {
  position: fixed; inset: 0; z-index: 10;
  padding: 0 var(--pad) calc(var(--pad) * .9);
  display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none; visibility: hidden;
}
.scene.is-active { pointer-events: auto; visibility: visible; }

.kicker { font-family: var(--f-ui); font-size: 14px; letter-spacing: .02em; color: rgba(255,255,255,.78); margin-bottom: 18px; }
.display {
  font-size: clamp(64px, 12.4vw, 220px);
  line-height: .9; letter-spacing: -.05em; font-weight: 400;
  margin-left: -.05em;
}
.h-xl { font-size: clamp(48px, 7vw, 111px); line-height: 1; letter-spacing: -.04em; font-weight: 400; }
.h-lg { font-size: clamp(32px, 3.4vw, 50px); line-height: 1.1; letter-spacing: -.03em; font-weight: 400; }

/* split text */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .c { display: inline-block; will-change: transform; }

/* still scene */
.scene-still { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; }
.still-copy { max-width: 640px; }
.still-copy .lede { font-family: var(--f-ui); font-size: 17px; line-height: 1.67; color: rgba(255,255,255,.82); max-width: 460px; margin-top: 20px; }
.info {
  width: min(520px, 100%);
  border-radius: 28px; padding: 26px 26px 22px;
  flex-shrink: 0;
}
.dock {
  position: fixed; z-index: 15;
  right: var(--pad); bottom: calc(var(--pad) * .9);
  opacity: 0; pointer-events: none;
}
.dock.is-shown { pointer-events: auto; }
.info.dock {
  width: auto; left: auto; padding: 0;
  background: none; border: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.scene-still .still-copy { max-width: min(640px, calc(100vw - 520px - var(--pad) * 2 - 40px)); }
.info-actions { display: flex; align-items: center; gap: 10px; }
.info-actions .spacer { flex: 1; }
.info-actions .round { width: 48px; height: 48px; }

/* ---------- Rail ---------- */
.rail {
  position: fixed; z-index: 20; right: calc(var(--pad) * .5); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px;
}
.rail button { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 7px 0; font-family: var(--f-ui); font-size: 12px; }
.rail button span { opacity: 0; transform: translateX(6px); transition: opacity .4s var(--ease), transform .5s var(--ease); color: rgba(255,255,255,.85); }
.rail button:hover span { opacity: 1; transform: none; }
.rail button i { display: block; width: 18px; height: 1px; background: rgba(255,255,255,.4); transition: width .6s var(--ease), background .4s; }
.rail button.is-active i { width: 36px; background: #fff; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,2,2,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-panel {
  position: relative; width: min(640px, 100%); max-height: calc(100dvh - 40px); overflow: auto;
  touch-action: pan-y; overscroll-behavior: contain;
  border-radius: 32px; padding: clamp(24px, 4vw, 44px);
}
.modal-panel .kicker { margin-bottom: 8px; }
.close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.about-panel { width: min(680px, 100%); }
.about-copy { font-family: var(--f-ui); font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.82); margin-top: 20px; }

.modal-panel.preview-panel {
  width: min(1200px, 100%); height: min(86dvh, 900px);
  padding: 0; overflow: hidden; background: #050505;
}
.modal-panel.preview-panel.is-resizing {
  transition: width .6s cubic-bezier(.4, 0, .2, 1), height .6s cubic-bezier(.4, 0, .2, 1);
}
.preview-track { position: relative; width: 100%; height: 100%; }
.preview-slide {
  position: absolute; inset: 0;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity .6s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
}
.preview-slide.is-active { opacity: 1; pointer-events: auto; }
.preview-slide[hidden] { display: none !important; }
.preview-slide img, .preview-slide video {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.preview-panel .close { z-index: 3; background: rgba(2,2,2,.55); }
.preview-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff;
}
.preview-nav.prev { left: 16px; }
.preview-nav.next { right: 16px; }
.preview-nav[hidden] { display: none; }
.preview-dots {
  position: absolute; z-index: 3; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.preview-dots[hidden] { display: none; }
.preview-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); transition: background .3s var(--ease), transform .3s var(--ease); }
.preview-dots button.is-active { background: #fff; transform: scale(1.25); }
.preview-audio {
  position: absolute; z-index: 3; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 40px;
  font-family: var(--f-ui); font-weight: 500; font-size: 13px; line-height: 1; color: #fff;
}
.preview-audio[hidden] { display: none; }
.preview-audio .icon-on { display: none; }
.preview-audio[aria-pressed="true"] .icon-on { display: block; }
.preview-audio[aria-pressed="true"] .icon-muted { display: none; }
/* ---------- Intro state ---------- */
.is-loading .nav, .is-loading .rail { opacity: 0; }

/* ============================================================
   RESPONSIVE — phone, tablet, landscape phone, notches
   ============================================================ */

/* ---------- Tablet (portrait iPad and small laptops) ---------- */
@media (max-width: 1180px) and (min-width: 861px) {
  .info { width: min(440px, 46vw); padding: 22px 22px 18px; }
  .scene-still .still-copy { max-width: calc(100vw - 46vw - var(--pad) * 2 - 32px); }
  .rail { right: 10px; }
}

/* iPad portrait: stack the copy above the panel, like the phone layout */
@media (max-width: 1024px) and (min-width: 861px) and (orientation: portrait) {
  .scene-still { flex-direction: column; align-items: stretch; gap: 20px; }
  .scene-still .still-copy { max-width: none; }
  .info { width: 100%; }
  .dock { left: var(--pad); right: var(--pad); }
  .scene-still { padding-bottom: 210px; }
}

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  .nav { gap: 12px; padding: calc(12px + var(--safe-t)) calc(16px + var(--safe-r)) 12px calc(16px + var(--safe-l)); }
  .nav-links { width: auto; justify-content: flex-start; padding: 3px; }
  .nav-links a { font-size: 12.5px; padding: 9px 11px; }
  .brand { font-size: 20px; }
  .rail { right: calc(8px + var(--safe-r)); }
  .rail button span { display: none; }
  .rail button i { width: 14px; }
  .rail button.is-active i { width: 26px; }

  .scene {
    padding: 0 calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  }
  .scene-still { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 16px; }
  .scene-still .still-copy { max-width: none; padding-right: 30px; transform: translateY(110px); }
  .still-copy .lede { line-height: calc(1.67em - 4px); margin-top: 11px; }
  .h-xl { font-size: clamp(38px, 11vw, 60px); }
  .kicker { margin-bottom: 6px; font-size: 13px; }

  .info { width: auto; padding: 16px 16px 14px; border-radius: 22px; }
  .dock { left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); bottom: calc(12px + var(--safe-b)); }
  .scene-still { padding-bottom: 188px; }
  .info-actions { margin-top: 14px; padding-top: 12px; gap: 8px; }
  .info-actions .round { width: 44px; height: 44px; }

  .pill { padding: 12px 18px; }
  .pill.lg { padding: 15px 22px; font-size: 14px; }
  .round { width: 52px; height: 52px; }

  .modal { padding: 12px; }
  .modal-panel { border-radius: 26px; padding: 22px 18px; max-height: calc(100dvh - 24px); }
  .close { top: 12px; right: 12px; width: 40px; height: 40px; }


}

/* very narrow phones */
@media (max-width: 380px) {
  .info-actions .pill { padding: 11px 14px; font-size: 13px; }
}

/* ---------- Phone in landscape: short screens ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .h-xl { font-size: clamp(28px, 7vh, 44px); }
  .scene-still {
    flex-direction: row; align-items: flex-end; justify-content: flex-start;  /* .scene's flex-end would push the copy right */
    padding-bottom: calc(12px + var(--safe-b));
  }
  .scene-still .still-copy { max-width: min(52vw, 420px); }   /* the desktop clamp collapses here */
  .dock { left: auto; right: calc(16px + var(--safe-r)); width: auto; }
  .info { padding: 12px 14px 10px; }
  .info-actions { margin-top: 10px; padding-top: 10px; }
  .modal-panel { max-height: calc(100dvh - 16px); padding: 18px; }
}

/* coarse pointers: no hover-only affordances */
@media (hover: none) {
  .rail button span { opacity: 1; transform: none; }
  .glass:hover { background: var(--glass-bg); border-color: var(--glass-line); }
  .glass:active { background: var(--glass-bg-hover); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .split .c { will-change: auto; }
}
