/* ============================================================
   Observed Patterns • SME — Cinematic Home
   ============================================================ */

:root {
  --bg: #050d0b;
  --teal: #1D9E75;
  --dark-teal: #085041;
  --purple: #7F77DD;
  --dark-purple: #3C3489;
  --amber: #BA7517;
  --dark-amber: #633806;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --motion: 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: pretty;
  line-height: 1.05;
}

p { margin: 0; line-height: 1.6; }

/* ----- OP LOGO ----- */
.op-logo {
  display: block;
  background: transparent;
  filter: invert(1);
  mix-blend-mode: screen;
}
.op-logo-watermark {
  background: transparent;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.06;
}

/* ----- LIQUID GLASS ----- */
.liquid-glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ----- ANIMATIONS ----- */
@keyframes blurFadeUp {
  from { opacity: 0; filter: blur(20px); transform: translateY(40px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
.animate-blur-fade-up {
  animation: blurFadeUp calc(1s / var(--motion)) cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes daveBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes daveBounceBig {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes propellerSpin {
  to { transform: rotate(360deg); }
}

@keyframes ledPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes scrollChevron {
  0% { transform: translate(-50%, 0); opacity: 0.6; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
  100% { transform: translate(-50%, 0); opacity: 0.6; }
}

@keyframes ambientGlow {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(2%, -2%) scale(1.05); }
}

/* ----- AMBER BITS ----- */
.amber-divider {
  width: 200px;
  height: 1px;
  background: var(--amber);
  margin: 2rem auto;
  opacity: 0.7;
  border: 0;
}

.amber-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
  font-weight: 400;
}

/* ----- BUTTONS ----- */
.btn-amber {
  background: var(--amber);
  color: #050d0b;
  border: none;
  border-radius: 4px;
  padding: 1rem 2.5rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-amber::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}
.btn-amber:hover { background: var(--dark-amber); color: #fff; transform: scale(1.02); }

.btn-glass {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 0.875rem 2rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
}
.btn-glass:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }

/* ----- TILT CARD ----- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ----- VIDEO BG ----- */
.video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.video-bg-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 60%, rgba(29,158,117,0.18), transparent 60%),
    radial-gradient(ellipse 80% 60% at 30% 30%, rgba(127,119,221,0.12), transparent 65%),
    radial-gradient(ellipse 50% 70% at 80% 80%, rgba(186,117,23,0.1), transparent 60%),
    linear-gradient(180deg, #07120f 0%, #050d0b 50%, #030806 100%);
  animation: ambientGlow 18s ease-in-out infinite;
}
.video-overlay {
  position: absolute; inset: 0;
  background: rgba(5, 13, 11, 0.45);
  z-index: 1; pointer-events: none;
}
.video-mask {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%, transparent 15%, transparent 85%, var(--bg) 100%);
  z-index: 2; pointer-events: none;
}

/* ----- WORLD WRAPPER ----- */
.world {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

.world-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main { position: relative; z-index: 5; }

/* ----- NAV ----- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(5, 13, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.nav-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #fff;
}
.nav-brand-name .dot {
  color: var(--amber);
  margin: 0 0.35em;
}
.nav-links {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}
.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
  transition: color 300ms ease;
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: var(--amber); }
.nav-mobile-btn {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
}
@media (max-width: 1024px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-mobile-btn { display: inline-flex; }
  .nav-mobile-menu {
    position: fixed;
    top: 64px; left: 0; right: 0;
    padding: 1.5rem 2rem;
    display: flex; flex-direction: column; gap: 1rem;
    background: rgba(5,13,11,0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-mobile-menu a {
    font-family: 'DM Sans', sans-serif;
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    letter-spacing: 0.05em;
  }
}

/* ----- HERO ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: 7rem;
}
.hero-emboss {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  opacity: 0.04;
  z-index: 3;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 10;
  padding: 0 4rem 3.5rem;
  max-width: 1100px;
  pointer-events: none;
}
.hero-content > * { pointer-events: auto; }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 4.25rem);
  max-width: 900px;
  margin-bottom: 1.25rem;
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.hero p {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  color: rgba(255,255,255,0.72);
  max-width: 650px;
  margin-bottom: 1.75rem;
  line-height: 1.55;
  font-weight: 300;
}
@media (min-height: 800px) {
  .hero h1 { font-size: clamp(2.5rem, 5.2vw, 5rem); }
  .hero-content { padding-bottom: 5rem; }
}
.scroll-chevron {
  position: absolute;
  bottom: 2rem; left: 50%;
  width: 28px; height: 28px;
  color: rgba(255,255,255,0.6);
  z-index: 10;
  animation: scrollChevron 2.4s ease-in-out infinite;
  pointer-events: none;
}
@media (max-width: 768px) {
  .hero-content { padding: 0 1.5rem 3rem; }
  .hero p { font-size: 1.05rem; }
}

/* ----- STATIONS ----- */
.stations {
  position: relative;
  padding: 12vh 4rem 8vh;
  z-index: 5;
}
.station {
  max-width: 600px;
  padding: 2.5rem;
  border-radius: 16px;
  margin-bottom: 25vh;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16,1,0.3,1), transform 1s cubic-bezier(0.16,1,0.3,1), filter 1s;
  filter: blur(12px);
}
.station.in-view {
  opacity: 1; transform: translateY(0); filter: blur(0);
}
.station.left { margin-right: auto; margin-left: 0; }
.station.right { margin-left: auto; margin-right: 0; }
.station h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  margin-bottom: 1rem;
  font-weight: 400;
}
.station p {
  color: rgba(255,255,255,0.72);
  margin-bottom: 1.75rem;
  font-size: 1rem;
}
.station .station-inner {
  position: relative;
  z-index: 2;
}
.stations-final {
  text-align: center;
  display: flex; justify-content: center;
  margin-bottom: 6vh;
}
.stations-final .station {
  margin-left: auto !important; margin-right: auto !important;
  text-align: center;
}
@media (max-width: 768px) {
  .stations { padding: 8vh 1.5rem 4vh; }
  .station { padding: 1.75rem; margin-bottom: 14vh; }
  .station.left, .station.right { margin: 0 0 14vh 0; }
}

/* ----- FOOTER ----- */
.footer {
  position: relative;
  z-index: 5;
  background: rgba(5,13,11,0.95);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}
.footer-col-c { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col-c a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: color 200ms ease;
}
.footer-col-c a:hover { color: #fff; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--amber);
  letter-spacing: 0.05em;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer { padding: 2rem 1.5rem; }
}

/* ----- DAVE ----- */
.dave-host {
  position: fixed;
  right: 28px; bottom: 28px;
  z-index: 200;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}
.dave-host > * { pointer-events: auto; }

.dave-shadow {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 280px;
  height: 120px;
  z-index: 199;
  pointer-events: none;
  background: linear-gradient(to top left,
    rgba(5,13,11,0.95) 0%,
    rgba(5,13,11,0.7) 40%,
    transparent 100%);
}
.dave-mist {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 280px;
  height: 120px;
  z-index: 199;
  pointer-events: none;
  background: radial-gradient(ellipse at bottom right,
    rgba(29,158,117,0.4) 0%,
    transparent 70%);
  animation: daveMistPulse 2s ease-in-out infinite alternate;
}
@keyframes daveMistPulse {
  from { opacity: 0.6; }
  to   { opacity: 1.0; }
}

.dave-bot {
  position: relative;
  width: 76px; height: 96px;
  cursor: pointer;
  animation: daveBounce 1.2s ease-in-out infinite;
  user-select: none;
}
.dave-bot.has-answer { animation: daveBounceBig 0.8s ease-in-out infinite; }

.dave-label {
  position: absolute;
  right: 88px; bottom: 32px;
  background: rgba(5,13,11,0.92);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.dave-bot:hover .dave-label { opacity: 1; transform: translateX(0); }

.dave-prop {
  position: absolute;
  top: -2px; left: 50%;
  width: 30px; height: 4px;
  transform: translateX(-50%);
  transform-origin: center;
  z-index: 3;
}
.dave-prop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.55);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(29,158,117,0.5);
}
.dave-prop.spinning {
  animation: propellerSpin 0.4s linear infinite;
}
.dave-prop-stem {
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 2px; height: 8px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
}

.dave-body {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ffffff 0%, #e6ebe9 55%, #c9d2cf 100%);
  box-shadow:
    inset 0 -8px 14px rgba(0,0,0,0.18),
    inset 0 2px 2px rgba(255,255,255,0.9),
    0 6px 14px rgba(0,0,0,0.45),
    0 0 22px rgba(29,158,117,0.35);
  display: flex; align-items: center; justify-content: center;
}

.dave-face {
  width: 36px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #082c25 0%, #051a16 100%);
  border: 1px solid rgba(29,158,117,0.55);
  box-shadow:
    inset 0 0 8px rgba(29,158,117,0.5),
    0 0 6px rgba(29,158,117,0.25);
  position: relative;
  overflow: hidden;
}
.dave-face::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}

.dave-led {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  animation: ledPulse 2.4s ease-in-out infinite;
}
.dave-led.teal {
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
  left: 8px; bottom: 36px;
}
.dave-led.amber {
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
  right: 8px; bottom: 36px;
  animation-delay: 1.1s;
}

.dave-legs {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 22px;
  display: flex;
  justify-content: space-between;
}
.dave-leg {
  width: 6px; height: 22px;
  background: linear-gradient(180deg, #5a6663 0%, #2c3231 100%);
  border-radius: 2px;
  position: relative;
}
.dave-leg::after {
  content: '';
  position: absolute;
  bottom: -2px; left: -3px; right: -3px;
  height: 4px;
  background: #1c2120;
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ----- DAVE CHAT ----- */
.dave-chat {
  width: 300px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: blurFadeUp 0.35s cubic-bezier(0.16,1,0.3,1) forwards;
}
.dave-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dave-chat-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--amber);
  text-transform: uppercase;
}
.dave-chat-close {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
}
.dave-chat-close:hover { color: #fff; background: rgba(255,255,255,0.06); }
.dave-chat-body {
  padding: 0.75rem 1rem;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.dave-msg {
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  max-width: 92%;
  word-wrap: break-word;
}
.dave-msg.bot {
  background: rgba(29,158,117,0.12);
  border: 1px solid rgba(29,158,117,0.25);
  color: rgba(255,255,255,0.92);
  align-self: flex-start;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.dave-msg.bot .dave-msg-icon {
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 2px;
}
.dave-msg.bot .dave-msg-text { flex: 1; min-width: 0; }
.dave-msg.user {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  align-self: flex-end;
}
.dave-msg.bot a { color: var(--amber); text-decoration: underline; }
.dave-thinking {
  display: inline-flex; gap: 4px; align-items: center;
  padding: 0.6rem 0.8rem;
  background: rgba(29,158,117,0.12);
  border: 1px solid rgba(29,158,117,0.25);
  border-radius: 10px;
  align-self: flex-start;
}
.dave-thinking span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--teal);
  animation: ledPulse 1.2s ease-in-out infinite;
}
.dave-thinking span:nth-child(2) { animation-delay: 0.2s; }
.dave-thinking span:nth-child(3) { animation-delay: 0.4s; }

.dave-chat-input {
  display: flex;
  gap: 6px;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
}
.dave-chat-input input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.dave-chat-input input:focus { border-color: var(--teal); }
.dave-chat-input button {
  background: var(--amber);
  border: none;
  border-radius: 8px;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #050d0b;
  cursor: pointer;
  transition: background 0.2s ease;
}
.dave-chat-input button:hover { background: var(--dark-amber); color: #fff; }
.dave-chat-input button:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 480px) {
  .dave-chat { width: calc(100vw - 56px); }
}

/* ----- REVEAL ----- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(10px);
  transition: opacity 1s cubic-bezier(0.16,1,0.3,1), transform 1s cubic-bezier(0.16,1,0.3,1), filter 1s;
}
.reveal.in-view {
  opacity: 1; transform: translateY(0); filter: blur(0);
}

/* ----- PAGE HERO (sub-pages) ----- */
.page-hero {
  position: relative;
  z-index: 5;
  padding: 14vh 4rem 6vh;
  text-align: center;
}
.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.05;
  max-width: 900px;
  margin: 0 auto;
  text-wrap: pretty;
}
@media (max-width: 768px) {
  .page-hero { padding: 11vh 1.5rem 4vh; }
}

/* ----- FOUNDERS ----- */
.founders-grid {
  position: relative;
  z-index: 5;
  padding: 4vh 4rem 8vh;
  display: flex;
  flex-direction: column;
  gap: 16vh;
}
.founder.left .founder-card { margin-right: auto; margin-left: 0; }
.founder.right .founder-card { margin-left: auto; margin-right: 0; }
.founder-card {
  max-width: 760px;
  width: 100%;
  border-radius: 18px;
  padding: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
}
.founder.right .founder-card { grid-template-columns: 1fr 280px; }
.founder.right .founder-photo-wrap { order: 2; }
.founder.right .founder-body { order: 1; }

.founder-photo-wrap {
  position: relative;
  min-height: 100%;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
}
.founder-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 60px 8px rgba(5,13,11,0.55);
}
.founder-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  filter: saturate(0.9) contrast(1.05);
}
.founder-photo-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, rgba(127,119,221,0.18), transparent 65%),
    linear-gradient(135deg, #0a1614 0%, #050d0b 100%);
  z-index: -1;
}
.founder-body {
  padding: 2.5rem;
  position: relative;
  z-index: 2;
}
.founder-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  line-height: 1.05;
}
.founder-loc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.founder-story {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}
.founder-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  color: var(--amber);
  text-align: center;
  margin: 1rem 0 0.5rem;
  padding: 0 0.5rem;
  font-weight: 400;
  line-height: 1.4;
}
.founder-motto-latin {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--amber);
  text-align: center;
  text-transform: uppercase;
  margin: 0.5rem 0 1.25rem;
  font-weight: 500;
}
.founder-crest-wrap {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 1.25rem;
}
.founder-crest {
  width: 110px;
  height: auto;
  display: block;
}
.founder-motto-en {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}

@media (max-width: 768px) {
  .founders-grid { padding: 4vh 1.5rem 6vh; gap: 10vh; }
  .founder-card,
  .founder.right .founder-card { grid-template-columns: 1fr; }
  .founder.right .founder-photo-wrap { order: 0; }
  .founder.right .founder-body { order: 0; }
  .founder-photo-wrap { aspect-ratio: 4/3; }
  .founder-body { padding: 1.75rem; }
}

.founders-closing {
  position: relative;
  z-index: 5;
  padding: 4vh 2rem 8vh;
  text-align: center;
}
.founders-closing-line {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  color: rgba(255,255,255,0.85);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ----- PROGRAMS ----- */
.page-subline {
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.72);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  max-width: 640px;
  margin: 1.25rem auto 0;
  text-align: center;
  line-height: 1.55;
  font-weight: 300;
}
.programs-grid {
  position: relative;
  z-index: 5;
  padding: 4vh 4rem 8vh;
  display: flex;
  flex-direction: column;
  gap: 14vh;
}
.program.left .program-card { margin-right: auto; margin-left: 0; }
.program.right .program-card { margin-left: auto; margin-right: 0; }
.program.center .program-card { margin: 0 auto; }
.program.wide .program-card { max-width: 1000px; }
.program-card {
  max-width: 760px;
  width: 100%;
  border-radius: 18px;
  padding: 2.5rem;
}
.program-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  line-height: 1.05;
}
.program-italic {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--amber);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.program-body {
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}
.program-cta {
  margin-top: 0.5rem;
}

.inner-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 1.75rem;
}
.inner-grid.one { grid-template-columns: 1fr; }
.inner-grid.two { grid-template-columns: 1fr 1fr; }
.inner-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.inner-card {
  border-radius: 12px;
  padding: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(8px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1), filter 0.8s;
}
.inner-card.in-view {
  opacity: 1; transform: translateY(0); filter: blur(0);
}
.inner-card-label {
  margin-bottom: 0.5rem;
  font-size: 0.65rem;
}
.inner-card-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.inner-card-line {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  margin-bottom: 0.35rem;
}
.inner-card-italic {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--amber);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .inner-grid.two, .inner-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .programs-grid { padding: 4vh 1.5rem 6vh; gap: 10vh; }
  .program-card { padding: 1.75rem; }
}

/* ----- LIBRARY ----- */
.library-wheel-section {
  position: relative;
  z-index: 5;
  padding: 4vh 2rem 14vh;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}
.wheel-host {
  position: relative;
  width: 700px;
  max-width: 100%;
  height: 700px;
  margin: 0 auto;
  perspective: 1200px;
}
.wheel-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}
.wheel-orrery {
  position: absolute;
  width: 280px; height: 280px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 24px rgba(186,117,23,0.25));
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.orrery-ring-1 { animation: spin 80s linear infinite reverse; transform-origin: center; }
.orrery-ring-2 { animation: spin 50s linear infinite; transform-origin: center; }
.orrery-ring-3 { animation: spin 110s linear infinite; transform-origin: center; }
.orrery-arcs { animation: spin 28s linear infinite; transform-origin: center; }
.orrery-core { filter: drop-shadow(0 0 6px #BA7517); }

.wheel-extra {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.5s ease-in-out;
}
.wheel-ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: wheelSpin 30s linear infinite;
}
@keyframes wheelSpin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
.wheel-host:hover .wheel-ring,
.wheel-host:hover .wheel-orrery { animation-play-state: paused; }
.wheel-host.has-modal .wheel-orrery,
.wheel-host.has-modal .wheel-ring { animation-play-state: paused; }

/* ----- WHEEL NAV ARROWS ----- */
.wheel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 60;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 8px 20px rgba(0,0,0,0.35);
  transition: background 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease, transform 0.15s ease;
}
.wheel-nav:hover {
  background: rgba(186,117,23,0.12);
  border-color: rgba(186,117,23,0.55);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 0 12px rgba(186,117,23,0.6);
}
.wheel-nav:active { transform: translateY(-50%) scale(0.95); }
.wheel-nav-left { left: -16px; }
.wheel-nav-right { right: -16px; }
@media (max-width: 768px) {
  .wheel-nav-left { left: 8px; }
  .wheel-nav-right { right: 8px; }
}

.wheel-book {
  position: absolute;
  top: 50%; left: 50%;
  width: 90px; height: 130px;
  margin: -65px 0 0 -45px;
  border-radius: 8px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: filter 0.3s ease;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.wheel-book img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
  backface-visibility: hidden;
  background: rgba(7,18,15,0.4);
  mix-blend-mode: normal;
}
.wheel-book:hover {
  background: rgba(186,117,23,0.12);
  border-color: rgba(186,117,23,0.55);
  box-shadow: 0 0 24px rgba(186,117,23,0.55), 0 0 60px rgba(186,117,23,0.35), 0 12px 32px rgba(0,0,0,0.6);
}
.wheel-book:hover img {
  transform: scale(1.1) translateZ(30px);
}

/* ----- BOOK MODAL (horizontal) ----- */
.book-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5,13,11,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: blurFadeUp 0.25s ease-out forwards;
}
.book-modal {
  position: relative;
  width: 100%;
  max-width: 700px;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  background: rgba(10, 20, 18, 0.62);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}
.book-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  border-radius: 8px;
  z-index: 3;
  transition: background 0.2s, color 0.2s;
}
.book-modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.book-modal-cover-col {
  flex: 0 0 180px;
  display: flex;
  align-items: flex-start;
}
.book-modal-cover {
  width: 180px;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  display: block;
}

.book-modal-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-right: 1.5rem;
}
.book-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.4rem;
  text-wrap: pretty;
}
.book-modal-author {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}
.book-modal-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  margin: 0.75rem 0 0;
}
.book-modal-cta-btn {
  margin-top: auto;
  align-self: flex-start;
  margin-top: 1.5rem;
}
@media (max-width: 720px) {
  .book-modal {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    max-width: 460px;
  }
  .book-modal-cover-col { flex: 0 0 auto; justify-content: center; }
  .book-modal-cover { width: 140px; max-height: none; margin: 0 auto; }
  .book-modal-info-col { padding-right: 0; align-items: center; text-align: center; }
  .book-modal-title { text-align: center; }
  .book-modal-cta-btn { align-self: center; }
}

/* ----- FLOATING SCREENS (Priory / CPHUD) ----- */
.floating-screens {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 4vh 2rem 2vh;
}
.screen-frame {
  width: 280px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 32px rgba(29,158,117,0.28), 0 16px 48px rgba(0,0,0,0.55);
  border: 1px solid rgba(29,158,117,0.3);
  animation: float 4s ease-in-out infinite alternate;
}
.screen-frame.tilt-l { transform: rotate(-3deg); animation-delay: -1s; }
.screen-frame.tilt-r { transform: rotate(3deg); }
.screen-frame img { display: block; width: 100%; height: auto; }
@keyframes float {
  from { transform: translateY(0) rotate(var(--rot,0)); }
  to   { transform: translateY(-14px) rotate(var(--rot,0)); }
}
.screen-frame.tilt-l { --rot: -3deg; }
.screen-frame.tilt-r { --rot: 3deg; }
.with-pulse .screen-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 540px; height: 280px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(29,158,117,0.28), transparent 65%);
  filter: blur(40px);
  animation: pulseGlow 3s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: translate(-50%,-50%) scale(0.95); }
  50%      { opacity: 1;   transform: translate(-50%,-50%) scale(1.05); }
}

/* ----- FEATURE GRID ----- */
.features-grid {
  position: relative;
  z-index: 5;
  max-width: 1000px;
  margin: 0 auto;
  padding: 6vh 2rem 2vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.feature-card {
  border-radius: 14px;
  padding: 1.75rem;
  opacity: 0;
  transform: translateY(24px);
  filter: blur(8px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1), filter 0.8s;
}
.feature-card.in-view { opacity: 1; transform: translateY(0); filter: blur(0); }
.feature-card-body {
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.95rem;
  line-height: 1.55;
}
@media (max-width: 760px) {
  .features-grid { grid-template-columns: 1fr; }
}

.page-cta {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 4vh 2rem 10vh;
}
.page-cta .btn-amber {
  font-size: 1rem;
  padding: 1.1rem 3rem;
}

/* ----- CPHUD specific ----- */
.cphud-hero { padding-top: 16vh; }
.cphud-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}
.cphud-sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .wheel-host { width: 100%; height: 520px; }
  .wheel-book { width: 64px; height: 92px; margin: -46px 0 0 -32px; transform-origin: center; }
}

/* ----- CONTACT ----- */
.contact-page {
  position: relative;
  z-index: 5;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12vh 2rem 8vh;
}
.contact-card {
  max-width: 640px;
  width: 100%;
  border-radius: 18px;
  padding: 4rem 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-body {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  margin: 1.5rem auto 2.5rem;
  max-width: 480px;
  line-height: 1.6;
}
.contact-cta {
  width: 100%;
  max-width: 380px;
  justify-content: center;
  padding: 1.1rem 2.5rem;
  font-size: 1rem;
}
.contact-closing {
  margin-top: 2.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--amber);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
@media (max-width: 768px) {
  .contact-card { padding: 2.5rem 1.5rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
