@property --orbit-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg-deep: #05080f;
  --ink-light: #f6f8fc;
  --ink-soft: rgba(246, 248, 252, 0.68);
  --glass-surface: rgba(14, 20, 34, 0.36);
  --prism-ice: #c2e3ff;
  --prism-gold: #f1d9b5;
  --ease-iris: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--ink-light);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------
   OPTICAL APERTURE BACKGROUND STAGE
------------------------------------------------------------ */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: var(--bg-deep);
}

.parallax-plane {
  position: absolute;
  inset: -26px;
  will-change: transform;
}

.photo-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: clip-path;
  overflow: hidden;
}

.photo-layer.active {
  z-index: 1;
  clip-path: circle(120% at 50% 50%);
}

.photo-layer.incoming {
  z-index: 2;
  clip-path: circle(0% at 50% 50%);
}

.photo-layer.incoming.bloom {
  transition: clip-path 1.6s cubic-bezier(0.26, 0.06, 0.14, 1);
  clip-path: circle(112% at 50% 50%);
}

.photo-drift {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.085);
  will-change: transform;
}

.photo-drift.drifting {
  animation: smoothDrift 11s linear forwards;
}

@keyframes smoothDrift {
  0% { transform: scale(1.085) translate3d(0, 0, 0); }
  100% { transform: scale(1.005) translate3d(-0.4%, -0.25%, 0); }
}

/* Refractive Optical Lens Wave */
.iris-wave {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(115vmax, 1600px);
  height: min(115vmax, 1600px);
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.04);
  opacity: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 60px rgba(194, 227, 255, 0.28),
    inset 0 0 60px rgba(241, 217, 181, 0.22);
}

.iris-wave.pulse {
  animation: irisWaveExpand 1.5s cubic-bezier(0.25, 0.1, 0.2, 1) forwards;
}

@keyframes irisWaveExpand {
  0% {
    transform: translate(-50%, -50%) scale(0.04);
    opacity: 0.9;
  }
  55% {
    opacity: 0.45;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.45);
    opacity: 0;
  }
}

/* Soft atmospheric vignette for typography legibility */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(5, 8, 15, 0.14) 0%, rgba(5, 8, 15, 0.52) 100%),
    linear-gradient(180deg, rgba(5, 8, 15, 0.64) 0%, transparent 28%, transparent 72%, rgba(5, 8, 15, 0.72) 100%);
}

/* Subtle ambient concentric guide ring behind CTA */
.ambient-oculus {
  position: fixed;
  left: 50%;
  top: 50%;
  width: clamp(290px, 44vmin, 520px);
  height: clamp(290px, 44vmin, 520px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 5;
  pointer-events: none;
}

.ambient-oculus::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  animation: slowSpin 75s linear infinite;
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------
   FOREGROUND VIEWPORT SHELL
------------------------------------------------------------ */
.shell {
  position: relative;
  z-index: 10;
  height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  padding:
    calc(clamp(26px, 5vh, 52px) + var(--safe-top))
    clamp(18px, 4vw, 48px)
    calc(clamp(22px, 4vh, 42px) + var(--safe-bottom));
}

/* TOP CENTERED TRANSLUCENT AAD LOGO */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.3vh, 13px);
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  animation: riseIn 1.15s var(--ease-iris) 0.15s forwards;
}

.brand-logo {
  position: relative;
  width: clamp(128px, 15.5vw, 198px);
  aspect-ratio: 219 / 93;
  display: grid;
  place-items: center;
  filter:
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.44))
    drop-shadow(0 0 18px rgba(194, 227, 255, 0.18));
}

.logo-frost {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(14px) saturate(155%);
  -webkit-backdrop-filter: blur(14px) saturate(155%);
  background: rgba(14, 20, 34, 0.18);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 219 93'%3E%3Cg transform='matrix(1,0,0,1,-623.152,96.2142)' fill='%23fff' fill-rule='evenodd'%3E%3Cpath d='M718.494,-41.983L710.023,-28.32L716.856,-17.299C718.169,-15.181 720.484,-13.893 722.975,-13.893L735.911,-13.893L718.494,-41.983'/%3E%3Cpath d='M695.197,-52.231L703.669,-65.894L694.708,-80.346C692.555,-83.819 688.759,-85.932 684.673,-85.932C680.587,-85.932 676.791,-83.819 674.638,-80.346L633.434,-13.893L642.135,-13.893C644.626,-13.893 646.941,-15.181 648.254,-17.299L681.943,-71.633C682.074,-71.845 682.306,-71.974 682.555,-71.974C682.804,-71.974 683.036,-71.845 683.167,-71.633L695.197,-52.231'/%3E%3Cpath d='M795.273,-85.932L746.18,-85.932L750.765,-78.537C752.078,-76.42 754.392,-75.132 756.884,-75.132L795.273,-75.132C801.962,-75.132 808.376,-72.474 813.106,-67.745C817.835,-63.015 820.492,-56.601 820.492,-49.912C820.492,-43.224 817.835,-36.809 813.106,-32.08C808.376,-27.35 801.962,-24.693 795.273,-24.693L784.15,-24.693L788.735,-17.299C790.048,-15.181 792.362,-13.893 794.854,-13.893L795.273,-13.893C804.826,-13.893 813.988,-17.688 820.743,-24.443C827.497,-31.198 831.292,-40.359 831.292,-49.912C831.292,-59.465 827.497,-68.627 820.743,-75.382C813.988,-82.137 804.826,-85.932 795.273,-85.932'/%3E%3Cpath d='M721.102,-80.346C723.255,-83.819 727.05,-85.932 731.137,-85.932C735.223,-85.932 739.018,-83.819 741.171,-80.346L782.375,-13.893L769.439,-13.893C766.947,-13.893 764.633,-15.181 763.32,-17.299L729.63,-71.633C729.499,-71.845 729.268,-71.974 729.019,-71.974C728.769,-71.974 728.538,-71.845 728.407,-71.633L694.717,-17.299C693.404,-15.181 691.09,-13.893 688.598,-13.893L679.898,-13.893L721.102,-80.346'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 219 93'%3E%3Cg transform='matrix(1,0,0,1,-623.152,96.2142)' fill='%23fff' fill-rule='evenodd'%3E%3Cpath d='M718.494,-41.983L710.023,-28.32L716.856,-17.299C718.169,-15.181 720.484,-13.893 722.975,-13.893L735.911,-13.893L718.494,-41.983'/%3E%3Cpath d='M695.197,-52.231L703.669,-65.894L694.708,-80.346C692.555,-83.819 688.759,-85.932 684.673,-85.932C680.587,-85.932 676.791,-83.819 674.638,-80.346L633.434,-13.893L642.135,-13.893C644.626,-13.893 646.941,-15.181 648.254,-17.299L681.943,-71.633C682.074,-71.845 682.306,-71.974 682.555,-71.974C682.804,-71.974 683.036,-71.845 683.167,-71.633L695.197,-52.231'/%3E%3Cpath d='M795.273,-85.932L746.18,-85.932L750.765,-78.537C752.078,-76.42 754.392,-75.132 756.884,-75.132L795.273,-75.132C801.962,-75.132 808.376,-72.474 813.106,-67.745C817.835,-63.015 820.492,-56.601 820.492,-49.912C820.492,-43.224 817.835,-36.809 813.106,-32.08C808.376,-27.35 801.962,-24.693 795.273,-24.693L784.15,-24.693L788.735,-17.299C790.048,-15.181 792.362,-13.893 794.854,-13.893L795.273,-13.893C804.826,-13.893 813.988,-17.688 820.743,-24.443C827.497,-31.198 831.292,-40.359 831.292,-49.912C831.292,-59.465 827.497,-68.627 820.743,-75.382C813.988,-82.137 804.826,-85.932 795.273,-85.932'/%3E%3Cpath d='M721.102,-80.346C723.255,-83.819 727.05,-85.932 731.137,-85.932C735.223,-85.932 739.018,-83.819 741.171,-80.346L782.375,-13.893L769.439,-13.893C766.947,-13.893 764.633,-15.181 763.32,-17.299L729.63,-71.633C729.499,-71.845 729.268,-71.974 729.019,-71.974C728.769,-71.974 728.538,-71.845 728.407,-71.633L694.717,-17.299C693.404,-15.181 691.09,-13.893 688.598,-13.893L679.898,-13.893L721.102,-80.346'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.logo-svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
  font-weight: 600;
  letter-spacing: 0.46em;
  padding-left: 0.46em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.brand-tagline {
  font-size: clamp(0.62rem, 1vw, 0.72rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* CENTERED LIQUID-GLASS OCULUS PORTAL BUTTON */
.cta-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: scale(0.95);
  animation: scaleIn 1.2s var(--ease-iris) 0.4s forwards;
}

.portal-pill {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 2.6vw, 30px);
  padding: 10px 10px 10px clamp(26px, 3.6vw, 38px);
  min-width: min(86vw, 326px);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-light);
  background:
    radial-gradient(240px circle at var(--mx) var(--my), rgba(194, 227, 255, 0.24), transparent 60%),
    var(--glass-surface);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.52),
    0 0 42px rgba(194, 227, 255, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.34);
  cursor: pointer;
  outline: none;
  transition:
    transform 0.5s var(--ease-iris),
    box-shadow 0.5s var(--ease-iris),
    background-color 0.45s var(--ease-iris),
    border-color 0.45s var(--ease-iris);
}

/* Orbiting luminous prism rim */
.portal-pill::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--orbit-angle),
    rgba(255, 255, 255, 0.06) 0deg,
    rgba(194, 227, 255, 0.92) 70deg,
    rgba(241, 217, 181, 0.85) 125deg,
    rgba(255, 255, 255, 0.06) 190deg,
    rgba(255, 255, 255, 0.06) 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: orbitGlow 6s linear infinite;
  pointer-events: none;
  opacity: 0.72;
  transition: opacity 0.4s ease;
}

@keyframes orbitGlow {
  to { --orbit-angle: 360deg; }
}

.portal-pill:hover,
.portal-pill:focus-visible {
  transform: translateY(-3px) scale(1.022);
  border-color: rgba(255, 255, 255, 0.46);
  box-shadow:
    0 32px 78px rgba(0, 0, 0, 0.62),
    0 0 58px rgba(194, 227, 255, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.portal-pill:hover::before,
.portal-pill:focus-visible::before {
  opacity: 1;
}

.portal-pill:active {
  transform: translateY(-1px) scale(0.995);
}

.portal-pill:focus-visible {
  outline: 2px solid var(--prism-ice);
  outline-offset: 6px;
}

.pill-label {
  font-size: clamp(0.78rem, 1.15vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-orb {
  width: clamp(42px, 5.2vh, 50px);
  height: clamp(42px, 5.2vh, 50px);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 18px rgba(194, 227, 255, 0.16));
  transition: transform 0.5s var(--ease-iris), filter 0.5s var(--ease-iris);
}

.orb-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.orb-disc {
  opacity: 0.88;
  transition: opacity 0.45s var(--ease-iris);
}

.orb-rim {
  transition: stroke 0.45s var(--ease-iris);
}

.orb-arrow-cutout {
  transform: translateX(0);
  transition: transform 0.5s var(--ease-iris);
}

.portal-pill:hover .pill-orb,
.portal-pill:focus-visible .pill-orb {
  transform: scale(1.06);
  filter: drop-shadow(0 8px 24px rgba(194, 227, 255, 0.34));
}

.portal-pill:hover .orb-disc,
.portal-pill:focus-visible .orb-disc {
  opacity: 1;
}

.portal-pill:hover .orb-rim,
.portal-pill:focus-visible .orb-rim {
  stroke: rgba(255, 255, 255, 0.62);
}

.portal-pill:hover .orb-arrow-cutout,
.portal-pill:focus-visible .orb-arrow-cutout {
  transform: translateX(3px);
}

.cta-subnote {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* BOTTOM FLOATING RADIAL CONTROLS DOCK */
.dock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.44);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(10px);
  animation: riseIn 1.15s var(--ease-iris) 0.6s forwards;
}

.dock-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.ring-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.ring-btn {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  outline: none;
}

.ring-svg {
  width: 24px;
  height: 24px;
  transform: rotate(-90deg) scale(1);
  transform-origin: center;
  overflow: visible;
  transition: transform 0.38s var(--ease-iris), filter 0.38s var(--ease-iris);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.5;
  transition: stroke 0.35s var(--ease-iris), stroke-width 0.35s var(--ease-iris);
}

.ring-progress {
  fill: none;
  stroke: var(--prism-ice);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-dasharray: 62.832;
  stroke-dashoffset: 62.832;
  transition: stroke 0.35s var(--ease-iris);
}

.ring-btn.active .ring-svg {
  transform: rotate(-90deg) scale(1.08);
  filter: drop-shadow(0 0 5px rgba(194, 227, 255, 0.45));
}

.ring-btn.active .ring-track {
  stroke: rgba(255, 255, 255, 0.24);
}

.ring-btn:hover .ring-svg,
.ring-btn:focus-visible .ring-svg {
  transform: rotate(-90deg) scale(1.26);
  filter: drop-shadow(0 0 8px rgba(194, 227, 255, 0.85));
}

.ring-btn:hover .ring-track,
.ring-btn:focus-visible .ring-track {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.75;
}

.ring-btn:hover .ring-progress,
.ring-btn:focus-visible .ring-progress {
  stroke: #ffffff;
}

.ring-btn.active .ring-progress {
  animation: radialSweep var(--slide-duration, 7000ms) linear forwards;
}

.ring-btn.active.paused .ring-progress {
  animation-play-state: paused;
}

/* Subtle futuristic audio toggle inside dock */
.sound-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--prism-ice);
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
  transition:
    transform 0.35s var(--ease-iris),
    border-color 0.35s var(--ease-iris),
    background 0.35s var(--ease-iris),
    color 0.35s var(--ease-iris),
    box-shadow 0.35s var(--ease-iris);
}

.sound-btn:hover,
.sound-btn:focus-visible {
  transform: scale(1.14);
  border-color: rgba(194, 227, 255, 0.72);
  background: rgba(194, 227, 255, 0.14);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(194, 227, 255, 0.4);
}

.sound-btn.muted {
  color: rgba(246, 248, 252, 0.38);
  border-color: rgba(255, 255, 255, 0.1);
}

@keyframes radialSweep {
  from { stroke-dashoffset: 62.832; }
  to { stroke-dashoffset: 0; }
}

@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  to { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------------------------
   RESPONSIVE TUNING
------------------------------------------------------------ */
@media (max-width: 680px) {
  .dock {
    padding: 8px 13px;
    gap: 10px;
  }

  .portal-pill {
    min-width: min(86vw, 300px);
    padding: 8px 8px 8px 22px;
  }

  .pill-label {
    letter-spacing: 0.18em;
  }
}

@media (max-height: 540px) {
  .shell {
    padding-top: 16px;
    padding-bottom: 14px;
  }
  .brand-logo {
    width: 112px;
  }
  .brand-tagline,
  .cta-subnote {
    display: none;
  }
  .pill-orb {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-drift.drifting,
  .portal-pill::before,
  .ambient-oculus::before {
    animation: none !important;
  }
  .photo-layer.incoming {
    clip-path: none !important;
    opacity: 0;
    transition: opacity 0.8s ease !important;
  }
  .photo-layer.incoming.bloom {
    opacity: 1;
  }
  .iris-wave {
    display: none;
  }
}
