/* ==========================================================================
   RUANG THERAPY — MODULE 1: THE PUBLIC SANCTUARY & SOMATIC LAB
   World-Class Design System & Interactive Wonder Engine
   ========================================================================== */

:root {
  /* Brand Colors from Alexa's Dataset */
  --c-primary: #e3bc9a;          /* Peach Terracotta */
  --c-primary-dark: #b66d46;     /* Rich Terracotta */
  --c-secondary: #ac6161;        /* Dusty Rose */
  --c-secondary-dark: #8c4747;   /* Deep Rose */
  --c-cream: #eedbd0;            /* Warm Signature Cream */
  --c-sand: #FAF7F2;             /* Editorial Sand */
  --c-matcha: #8B9B78;           /* Soft Matcha Sage */
  --c-matcha-pale: #EDF2E8;
  --c-accent: #ffa052;           /* Warm Amber Sunrise */
  --c-gold: #ffc466;             /* Golden Amber */
  --c-charcoal: #201D1A;         /* Rich Grounded Dark */
  --c-charcoal-card: #2A2521;
  --c-charcoal-light: #4A443E;
  --c-muted: #827A71;
  --c-border: #E8E0D5;
  --c-border-dark: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-serif-title: 'Playfair Display', Georgia, serif;
  --font-serif-quote: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', 'Plus Jakarta Sans', -apple-system, sans-serif;

  /* Shadows & Glows */
  --shadow-subtle: 0 4px 20px rgba(32, 29, 26, 0.04);
  --shadow-medium: 0 12px 36px rgba(32, 29, 26, 0.08);
  --shadow-elevated: 0 24px 60px rgba(32, 29, 26, 0.16);
  --shadow-glow: 0 0 50px rgba(227, 188, 154, 0.4);
  --shadow-dark-card: 0 25px 60px rgba(0, 0, 0, 0.6);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--c-sand);
  color: var(--c-charcoal-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif-title);
  color: var(--c-charcoal);
  line-height: 1.25;
  font-weight: 500;
}

h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }

a {
  color: var(--c-primary-dark);
  text-decoration: none;
  transition: all 0.3s var(--ease-smooth);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ==========================================================================
   BUTTONS & TACTILE CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: var(--c-primary-dark);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(182, 109, 70, 0.28);
}
.btn-primary:hover {
  background: #96532F;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(182, 109, 70, 0.38);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  color: var(--c-charcoal);
  border: 1.5px solid var(--c-border);
}
.btn-outline:hover {
  border-color: var(--c-primary-dark);
  color: var(--c-primary-dark);
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.btn-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-dark:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 20px;
  font-size: 0.84rem;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */
.wonder-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--c-border);
  padding: 16px 0;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-avatar-mini {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-primary);
  box-shadow: var(--shadow-subtle);
}

.brand-logo-text {
  font-family: var(--font-serif-title);
  font-size: 1.95rem;
  font-weight: 600;
  color: var(--c-charcoal);
  letter-spacing: -0.5px;
  line-height: 1;
}
.brand-logo-text span { color: var(--c-primary-dark); }

.brand-subline {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--c-muted);
  font-weight: 600;
  display: block;
  margin-top: 3px;
}

.nav-links-list {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.nav-item-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-charcoal-light);
  position: relative;
  padding: 6px 0;
}
.nav-item-link:hover { color: var(--c-primary-dark); }

/* ==========================================================================
   MODULE 1: THE PUBLIC SANCTUARY HERO
   ========================================================================== */
.hero-sanctuary-section {
  padding: 70px 0 80px;
}

.hero-sanctuary-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--c-matcha-pale);
  color: var(--c-matcha);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 24px;
  border: 1px solid rgba(139, 155, 120, 0.25);
}
.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4F8A10;
  box-shadow: 0 0 8px #4F8A10;
  animation: pulseGreen 2s infinite;
}

.hero-main-title em {
  font-style: italic;
  font-family: var(--font-serif-quote);
  color: var(--c-primary-dark);
  font-weight: 400;
}

.hero-lead-text {
  font-size: 1.18rem;
  color: var(--c-muted);
  margin: 24px 0 36px;
  line-height: 1.85;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.founder-trust-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  max-width: 440px;
}
.founder-trust-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-primary);
}

/* ==========================================================================
   BIOMETRIC SOMATIC BREATH ENGINE (CANVAS + PARTICLES)
   ========================================================================== */
.somatic-wonder-card {
  background: linear-gradient(145deg, #FFFFFF, var(--c-cream));
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  padding: 36px 30px;
  text-align: center;
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
}

.somatic-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.somatic-tag-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--c-primary-dark);
}

.somatic-mode-switcher {
  display: flex;
  background: rgba(32, 29, 26, 0.06);
  padding: 3px;
  border-radius: var(--radius-full);
  gap: 3px;
}

.somatic-mode-btn {
  background: transparent;
  border: none;
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--c-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}
.somatic-mode-btn.active {
  background: #FFFFFF;
  color: var(--c-charcoal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.canvas-breath-wrapper {
  width: 250px;
  height: 250px;
  margin: 18px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#breathParticleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.breath-center-touchpoint {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--c-primary), var(--c-primary-dark));
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 2;
  user-select: none;
  transition: transform 0.3s ease;
}
.breath-center-touchpoint:hover { transform: scale(1.05); }

.touchpoint-title {
  font-family: var(--font-serif-quote);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
}
.touchpoint-subtitle {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
  opacity: 0.85;
}

.somatic-live-guidance {
  font-size: 0.88rem;
  color: var(--c-muted);
  min-height: 26px;
  margin-top: 8px;
}

/* AUDIO SOUNDSCAPE CONSOLE */
.soundscape-console-bar {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.audio-knob-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--c-muted);
}
.audio-slider {
  -webkit-appearance: none;
  width: 70px;
  height: 4px;
  background: var(--c-border);
  border-radius: 4px;
  outline: none;
}
.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-primary-dark);
  cursor: pointer;
}

/* ==========================================================================
   CORE VALUE PILLARS (SOFT BRAVERY & (SELF) COMPASSION)
   ========================================================================== */
.values-showcase-section {
  background: var(--c-cream);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 56px 0;
}

.values-wonder-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-wonder-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(232, 224, 213, 0.9);
  padding: 28px 24px;
  transition: all 0.35s var(--ease-smooth);
}
.value-wonder-card:hover {
  background: #FFFFFF;
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.value-emoji-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.value-wonder-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-charcoal);
  margin-bottom: 8px;
}
.value-wonder-body {
  font-size: 0.85rem;
  color: var(--c-muted);
  line-height: 1.65;
}

/* ==========================================================================
   MODULE 1: 3D REFLECTION DECK & SOMATIC SENSATION STUDIO
   ========================================================================== */
.reflection-wonder-section {
  background: var(--c-charcoal);
  color: #FFFFFF;
  padding: 110px 0;
  position: relative;
  overflow: hidden;
}
.reflection-wonder-section h2 { color: #FFFFFF; }
.reflection-wonder-section p { color: rgba(255, 255, 255, 0.65); }

.deck-filter-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 36px 0 44px;
}

.filter-chip-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-chip-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}
.filter-chip-btn.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-charcoal);
  font-weight: 700;
}

.deck-3d-stage {
  max-width: 680px;
  margin: 0 auto;
  perspective: 1400px;
}

.card-flipper-3d {
  position: relative;
  width: 100%;
  min-height: 420px;
  transition: transform 0.65s cubic-bezier(0.2, 1, 0.3, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}
.card-flipper-3d.flipped {
  transform: rotateY(180deg) !important;
}

.card-pane {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-dark-card);
}

.card-pane-front {
  background: linear-gradient(145deg, var(--c-charcoal-card), #161412);
  border: 1px solid var(--c-border-dark);
}

.card-pane-back {
  background: linear-gradient(145deg, #38251F, #191412);
  border: 1px solid rgba(227, 188, 154, 0.3);
  transform: rotateY(180deg);
}

.card-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-category-tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--c-primary);
}

.card-favorite-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  transition: all 0.25s ease;
}
.card-favorite-btn.active { color: var(--c-gold); }

.card-quote-display {
  font-family: var(--font-serif-title);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-style: italic;
  line-height: 1.45;
  color: #FAF7F2;
  text-align: center;
  margin: 24px 0;
}

/* SOMATIC SENSATION SELECTOR (ON CARD BACK) */
.somatic-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 14px 0;
}

.somatic-tag-btn {
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.25s ease;
}
.somatic-tag-btn:hover { background: rgba(255, 255, 255, 0.18); }
.somatic-tag-btn.selected {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-charcoal);
  font-weight: 700;
}

.card-reflection-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #FFFFFF;
  resize: none;
  height: 80px;
  outline: none;
  transition: border-color 0.3s ease;
}
.card-reflection-input:focus { border-color: var(--c-primary); }

.card-footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  opacity: 0.75;
}

.deck-action-buttons-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.deck-bridge-card {
  margin-top: 48px;
  padding: 28px 36px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 138, 16, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(79, 138, 16, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 138, 16, 0); }
}

@media (max-width: 1024px) {
  .hero-sanctuary-grid { grid-template-columns: 1fr; gap: 48px; }
  .values-wonder-grid { grid-template-columns: 1fr 1fr; }
  .deck-bridge-card { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .values-wonder-grid { grid-template-columns: 1fr; }
  .nav-links-list { display: none; }
  .card-pane { padding: 30px 22px; }
}
