/* Alma — Creations (orbit + shared chrome with Core / Philosophy) */

:root {
  --bg: #000000;
  --void: #030304;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.55, 1);
  --glass-bg: rgba(255, 255, 255, 0.028);
  --glass-inner: rgba(255, 255, 255, 0.022);
  --glass: rgba(14, 14, 18, 0.62);
  --glass-border: rgba(255, 255, 255, 0.078);
  --text: rgba(255, 255, 255, 0.9);
  --text-dim: rgba(255, 255, 255, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Same gate pattern as Philosophy */
body:not(.alma-ready) {
  overflow: hidden;
}

body:not(.alma-ready) .main,
body:not(.alma-ready) .top-glass-dock,
body:not(.alma-ready) .bottom-glass {
  visibility: hidden;
  pointer-events: none;
}

.creations-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.creations-skip:focus {
  left: max(0.5rem, env(safe-area-inset-left));
  top: max(0.5rem, env(safe-area-inset-top));
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #111;
  z-index: 10120;
  outline: 1px solid rgba(255, 255, 255, 0.3);
}

/* —— Top nav (matches Philosophy / Core) —— */
.top-glass {
  position: fixed;
  top: max(0.65rem, calc(env(safe-area-inset-top) + 0.35rem));
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.15rem, 1.2vw, 0.45rem);
  padding: 0.42rem clamp(0.45rem, 1.5vw, 0.65rem);
  border-radius: 9999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 1px 0 var(--glass-inner) inset;
  backdrop-filter: blur(14px) saturate(1.04);
  -webkit-backdrop-filter: blur(14px) saturate(1.04);
  pointer-events: auto;
  overflow: visible;
  isolation: isolate;
  max-width: calc(100vw - 1.25rem);
}

@supports (-webkit-touch-callout: none) {
  .top-glass {
    backdrop-filter: blur(12px) saturate(1.03);
    -webkit-backdrop-filter: blur(12px) saturate(1.03);
  }
}

.top-glass nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.05rem, 0.8vw, 0.28rem);
}

.top-glass a {
  font-size: clamp(0.52rem, 1.05vw, 0.62rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  padding: 0.38rem clamp(0.5rem, 1.4vw, 0.72rem);
  border-radius: 9999px;
  transition: color 0.45s var(--ease), background 0.45s var(--ease);
  white-space: nowrap;
}

.top-glass a:hover,
.top-glass a:focus-visible {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.05);
}

.top-glass a:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: 2px;
}

.top-glass a.top-glass__core {
  letter-spacing: 0.14em;
}

.top-glass a.top-glass__here {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
}

.top-glass__lab-home {
  position: relative;
  z-index: 1;
  isolation: isolate;
  color: rgba(255, 255, 255, 0.52) !important;
  padding-inline: clamp(0.5rem, 1.5vw, 0.78rem) !important;
}

.top-glass__lab-home::before {
  content: "";
  position: absolute;
  inset: -12px -16px;
  border-radius: 9999px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 145% at 32% 38%, rgba(255, 252, 248, 0.2) 0%, rgba(255, 255, 255, 0.06) 44%, transparent 72%),
    radial-gradient(ellipse 90% 130% at 72% 58%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 48%, transparent 70%),
    radial-gradient(ellipse 70% 95% at 50% 82%, rgba(255, 252, 248, 0.1) 0%, transparent 58%);
  filter: blur(14px);
  opacity: 0.56;
  animation: top-glass-nebula 10.5s ease-in-out infinite;
}

@keyframes top-glass-nebula {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.98);
    filter: blur(12px);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.04);
    filter: blur(15px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-glass__lab-home::before {
    animation: none;
  }

  .orbit-core__trigger::before {
    animation: none;
    opacity: 0.42;
  }
}

/* Footer shell: alma-universal.css */

/* —— Main orbit —— */
.main {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: max(clamp(4.5rem, 12dvh, 6rem), calc(env(safe-area-inset-top, 0px) + 3.2rem));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(clamp(5rem, 14dvh, 7.5rem), calc(env(safe-area-inset-bottom, 0px) + 4.25rem));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
}

.orbit-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(200px, min(72dvh, 72svh), 640px);
  min-width: 0;
}

.orbit-stage {
  position: relative;
  width: min(92vw, 92dvw, 560px);
  aspect-ratio: 1;
  max-height: min(68dvh, 68svh, 560px, 92vw);
  max-width: 100%;
  flex-shrink: 0;
}

.orbit-stage__space {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  overflow: hidden;
}

.orbit-stage__grain {
  position: absolute;
  inset: -15%;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orbit-stage__vignette {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.35) 75%, rgba(0, 0, 0, 0.65) 100%);
}

.orbit-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.orbit-rings circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

/* —— Alma core: LAB-style nebula only on the Alma control (same recipe as .top-glass__lab-home::before) —— */
.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  transition: transform 0.85s var(--ease-soft);
  isolation: isolate;
}

.orbit-core__trigger {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: none;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  border-radius: 9999px;
  isolation: isolate;
  transition: transform 0.45s var(--ease-out), filter 0.45s var(--ease-out);
}

.orbit-core__trigger::before {
  content: "";
  position: absolute;
  inset: -12px -16px;
  border-radius: 9999px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 145% at 32% 38%, rgba(255, 252, 248, 0.2) 0%, rgba(255, 255, 255, 0.06) 44%, transparent 72%),
    radial-gradient(ellipse 90% 130% at 72% 58%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 48%, transparent 70%),
    radial-gradient(ellipse 70% 95% at 50% 82%, rgba(255, 252, 248, 0.1) 0%, transparent 58%);
  filter: blur(14px);
  opacity: 0.56;
  animation: top-glass-nebula 10.5s ease-in-out infinite;
}

.orbit-core__trigger:hover .orbit-core__name,
.orbit-core__trigger:focus-visible .orbit-core__name {
  color: rgba(255, 255, 255, 0.95);
}

.orbit-core__trigger:hover .orbit-core__dot .orbit-dot__halo,
.orbit-core__trigger:focus-visible .orbit-core__dot .orbit-dot__halo {
  transform: scale(1.1);
  opacity: 1;
}

.orbit-core__trigger:hover .orbit-core__dot .orbit-dot__point,
.orbit-core__trigger:focus-visible .orbit-core__dot .orbit-dot__point {
  transform: scale(1.1);
  box-shadow:
    0 0 16px rgba(255, 255, 255, 1),
    0 0 40px rgba(255, 255, 255, 0.5);
}

.orbit-core__trigger:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 6px;
}

.orbit-core__marker {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.52rem, 1.8vw, 0.72rem);
  pointer-events: none;
}

.orbit-core__dot.orbit-dot__glow {
  width: clamp(72px, 18vw, 96px);
  height: clamp(72px, 18vw, 96px);
}

.orbit-core__dot .orbit-dot__halo {
  width: clamp(58px, 15vw, 78px);
  height: clamp(58px, 15vw, 78px);
}

.orbit-core__dot .orbit-dot__point {
  width: clamp(11px, 2.8vw, 14px);
  height: clamp(11px, 2.8vw, 14px);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.98),
    0 0 36px rgba(255, 255, 255, 0.5),
    0 0 64px rgba(255, 250, 245, 0.22);
  animation: orbit-core-pulse 4s var(--ease-soft) infinite;
}

.orbit-core__name.orbit-dot__name {
  font-size: clamp(0.58rem, 1.15vw, 0.72rem);
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.72);
  text-transform: none;
}

@keyframes orbit-core-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.94;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* —— Project dots —— */
.orbit-dots {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.orbit-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  pointer-events: auto;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.5s var(--ease-out);
}

.orbit-dot__glow {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.orbit-dot__halo {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.2) 0%, transparent 68%);
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}

.orbit-dot__point {
  position: relative;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.9),
    0 0 22px rgba(255, 255, 255, 0.35);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.orbit-dot__name {
  font-size: clamp(0.46rem, 0.9vw, 0.56rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  max-width: 6.5rem;
  line-height: 1.35;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
  transition: color 0.45s var(--ease-out);
}

.orbit-dot:hover .orbit-dot__halo,
.orbit-dot:focus-visible .orbit-dot__halo {
  transform: scale(1.12);
  opacity: 1;
}

.orbit-dot:hover .orbit-dot__point,
.orbit-dot:focus-visible .orbit-dot__point {
  transform: scale(1.12);
  box-shadow:
    0 0 12px rgba(255, 255, 255, 1),
    0 0 32px rgba(255, 255, 255, 0.45);
}

.orbit-dot:hover .orbit-dot__name,
.orbit-dot:focus-visible .orbit-dot__name {
  color: rgba(255, 255, 255, 0.92);
}

.orbit-dot--active .orbit-dot__halo {
  transform: scale(1.18);
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
}

.orbit-dot--active .orbit-dot__point {
  transform: scale(1.15);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 1),
    0 0 40px rgba(255, 255, 255, 0.5);
}

.orbit-dot--active .orbit-dot__name {
  color: rgba(255, 255, 255, 0.98);
}

.orbit-dot:focus-visible {
  outline: none;
}

.orbit-dot:focus-visible .orbit-dot__point {
  outline: 1px solid rgba(255, 255, 255, 0.4);
  outline-offset: 8px;
}

/* —— Gallery black hole (shared alma-black-hole.css) — below orbit, toward footer —— */
.creations-gallery-bh {
  flex: 0 0 auto;
  display: block;
  width: min(100%, 19rem);
  margin: clamp(1.25rem, 4vh, 2.75rem) auto 0;
  padding: 0 max(1rem, env(safe-area-inset-left)) clamp(0.35rem, 1.5vh, 1rem) max(1rem, env(safe-area-inset-right));
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.creations-gallery-bh:focus-visible {
  outline: none;
}

.creations-gallery-bh:focus-visible .alma-bh--embed {
  box-shadow: 0 0 0 1px rgba(255, 200, 140, 0.4), 0 0 28px rgba(255, 100, 40, 0.15);
}

.creations-gallery-bh:hover .alma-bh__hud-title {
  color: rgba(255, 236, 210, 0.72);
}

/* —— Detail panel — centered; light veil so orbit keeps moving behind —— */
.detail {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  pointer-events: none;
}

.detail:not([hidden]) {
  pointer-events: auto;
}

.detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 22, 0.2);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  opacity: 0;
  transition: opacity 0.55s var(--ease-out);
}

.detail:not([hidden]) .detail__backdrop {
  opacity: 1;
}

.detail__sheet {
  position: relative;
  width: min(
    calc(100vw - max(1.5rem, calc(env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px)))),
    26rem
  );
  max-height: min(
    620px,
    86dvh,
    calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem)
  );
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 1.35rem;
  background: var(--alma-liquid-shine), var(--alma-liquid-veil);
  border: 1px solid var(--alma-liquid-border);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.32) inset,
    0 1px 0 var(--alma-liquid-inset) inset,
    0 28px 72px rgba(0, 0, 0, 0.34),
    var(--alma-liquid-shadow);
  backdrop-filter: blur(28px) saturate(var(--alma-liquid-sat));
  -webkit-backdrop-filter: blur(28px) saturate(var(--alma-liquid-sat));
  transform: scale(0.94);
  opacity: 0;
  filter: blur(6px);
  transition:
    transform 0.6s var(--ease-out),
    opacity 0.55s var(--ease-out),
    filter 0.55s var(--ease-out);
}

.detail:not([hidden]) .detail__sheet {
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
}

.detail__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22) inset;
  transition:
    color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    background 0.35s var(--ease-out);
}

.detail__close:hover,
.detail__close:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
}

.detail__figure {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(6, 7, 12, 0.22);
  backdrop-filter: blur(16px) saturate(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.detail__thumb.detail__thumb--show {
  opacity: 1;
}

.detail__thumb-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(40, 40, 48, 0.9), rgba(12, 12, 16, 0.95));
}

.detail__thumb-fallback[hidden] {
  display: none;
}

.detail__body {
  padding: 1.15rem 1.35rem 1.45rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 55%);
}

.detail__category {
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 0.45rem;
}

.detail__name {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
  color: rgba(255, 255, 255, 0.95);
}

.detail__desc {
  font-size: clamp(0.78rem, 1.5vw, 0.88rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.66);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.15rem;
}

.detail__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.detail__actions .detail__cta {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

/* Glass pill CTA — shared by Alma modal and project “View Project” */
.alma-cta__btn,
.detail__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 400;
  font-size: clamp(0.76rem, 1.55vw, 0.9rem);
  letter-spacing: 0.035em;
  text-transform: none;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.98);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 1.05rem 2.1rem;
  border-radius: 9999px;
  cursor: pointer;
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 0 28px rgba(255, 255, 255, 0.1),
    0 0 56px rgba(255, 255, 255, 0.05);
  transition: border-color 0.55s var(--ease), box-shadow 0.55s var(--ease), background 0.55s var(--ease);
}

.alma-cta__btn {
  appearance: none;
  margin-top: 0.35rem;
}

.alma-cta__btn:hover,
.alma-cta__btn:focus-visible,
.detail__cta:hover,
.detail__cta:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.22) inset,
    0 0 40px rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.14);
}

.alma-cta__btn:focus-visible,
.detail__cta:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.3);
  outline-offset: 4px;
}

/* —— Alma CTA (Core last-beat parity: butterflies + mailto CTA) —— */
.detail__sheet--alma-cta {
  width: min(
    calc(100vw - max(1.5rem, calc(env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px)))),
    24rem
  );
  max-height: min(
    520px,
    78dvh,
    calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.5rem)
  );
  overflow: hidden;
}

.alma-cta {
  position: relative;
  min-height: min(52dvh, 380px);
  display: flex;
  flex-direction: column;
  padding: 2.35rem 1.5rem 1.65rem;
}

.alma-cta__bf-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}

.alma-cta__bf-layer .bf {
  position: absolute;
  left: calc(50% + var(--bf-origin-x, 0px));
  top: calc(50% + var(--bf-origin-y, 0px));
  width: clamp(16px, 4.2vw, 24px);
  height: clamp(12px, 3.2vw, 18px);
  opacity: var(--bf-op, 0);
  transform: translate(-50%, -50%) translate(var(--bf-tx, 0px), var(--bf-ty, 0px)) rotate(var(--bf-rot, 0deg))
    scale(var(--bf-sc, 0.2));
  will-change: transform, opacity;
}

.alma-cta__bf-layer .bf svg {
  display: block;
  width: 100%;
  height: 100%;
  shape-rendering: geometricPrecision;
}

.alma-cta__content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.alma-cta__eyebrow {
  margin: 0;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.alma-cta__title {
  margin: 0;
  font-size: clamp(0.92rem, 2.2vw, 1.12rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
  max-width: 18rem;
}

.alma-cta__hint {
  margin: 0;
  font-size: clamp(0.72rem, 1.45vw, 0.82rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.64);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.48);
  max-width: 17rem;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-core__dot .orbit-dot__point {
    animation: none;
  }

  .detail__sheet {
    transition-duration: 0.01ms;
  }

  .alma-cta__bf-layer .bf {
    will-change: auto;
  }
}

/* ---- Coarse pointer / touch: comfortable tap targets ---- */
@media (pointer: coarse) {
  .top-glass a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .detail__close {
    width: 2.5rem;
    height: 2.5rem;
  }

  .orbit-core__trigger {
    padding: 0.65rem 1rem;
  }
}

/* ---- Narrow phones ---- */
@media (max-width: 380px) {
  .top-glass {
    padding-inline: 0.35rem;
  }

  .top-glass a {
    padding-inline: clamp(0.38rem, 2.5vw, 0.55rem);
    font-size: 0.5rem;
    letter-spacing: 0.1em;
  }

  .alma-cta {
    padding: 1.65rem 1.05rem 1.25rem;
  }

  .alma-cta__btn,
  .detail__cta {
    max-width: 100%;
    padding-inline: 1.35rem;
    box-sizing: border-box;
  }

  .detail__body {
    padding-inline: 1.05rem;
  }
}

/* ---- Small screens (portrait phones) ---- */
@media (max-width: 520px) {
  .orbit-stage {
    width: min(94vw, 100%);
    max-height: min(58dvh, 58svh, 92vw);
  }

  .detail__sheet {
    border-radius: 1.1rem;
    max-height: min(82dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.25rem));
  }

  .detail__sheet--alma-cta {
    max-height: min(80dvh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.25rem));
  }
}

/* ---- Landscape & short viewports (phones / split-screen) ---- */
@media (orientation: landscape) and (max-height: 560px) {
  .main {
    padding-top: max(5.25rem, calc(env(safe-area-inset-top, 0px) + 4.25rem));
    padding-bottom: max(2.85rem, calc(env(safe-area-inset-bottom, 0px) + 2.15rem));
  }

  .orbit-wrap {
    min-height: 0;
  }

  .orbit-stage {
    width: min(72vmin, 78vw, 520px);
    max-height: min(72vmin, 78vw, 75dvh, 75svh);
  }

  .detail__sheet,
  .detail__sheet--alma-cta {
    max-height: min(92dvh, 92svh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 0.75rem));
  }

  .detail__sheet--alma-cta {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .alma-cta {
    min-height: 0;
    padding: 1.35rem 1.15rem 1.1rem;
  }

  .alma-cta__content {
    gap: 0.55rem;
  }

  .detail__figure {
    max-height: min(38dvh, 240px);
  }

  .alma-sound-whisper {
    bottom: calc(max(0.4rem, env(safe-area-inset-bottom, 0px)) + 3rem);
    max-width: min(11.5rem, 88vw);
  }
}

/* ---- Tablets & small laptops ---- */
@media (min-width: 600px) and (max-width: 1024px) {
  .orbit-stage {
    width: min(88vw, 580px);
    max-height: min(62dvh, 580px);
  }

  .top-glass {
    max-width: min(calc(100vw - 1.5rem), 42rem);
  }
}

/* ---- Wide / ultra-wide: keep orbit readable, avoid tiny stage in letterbox ---- */
@media (min-width: 1200px) and (min-height: 700px) {
  .orbit-stage {
    width: min(560px, 52vmin);
    max-height: min(560px, 58vmin);
  }
}

@media (min-width: 1600px) {
  .main {
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  }
}
