/* ============================================================
   STORYROOMS.ORG — Master Homepage Stylesheet
   "Every story deserves a room of its own."
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

/* --- Master Variables --- */
:root {
  /* Core palette — neutral dark, sits above both room brands */
  --black:        #070708;
  --deep:         #0d0d10;
  --surface:      #121215;
  --surface-2:    #191920;
  --border:       rgba(220,215,205,0.08);
  --border-soft:  rgba(220,215,205,0.04);

  /* Neutral cream accent — master brand */
  --cream:        #c8bfa8;
  --cream-light:  #dfd6c0;
  --cream-dim:    rgba(200,191,168,0.22);

  /* Room accent colors — carried in from room stylesheets */
  --gold:         #c9a84c;    /* Listening Rooms */
  --silver:       #7a9ab8;    /* Reading Rooms   */

  --text-primary: #e4dfd4;
  --text-muted:   rgba(228,223,212,0.48);
  --text-faint:   rgba(228,223,212,0.22);

  --radius:       4px;
  --transition:   0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  background-color: var(--black);
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(7,7,8,0.97) 0%, transparent 100%);
  transition: border-color var(--transition);
}

.site-header.scrolled {
  border-bottom: 1px solid var(--border);
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-nav a { transition: color var(--transition); }
.site-nav a:hover { color: var(--cream-light); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle split glow — gold left, silver right */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 60% at 28% 50%, rgba(201,168,76,0.04) 0%, transparent 65%),
    radial-gradient(ellipse 55% 60% at 72% 50%, rgba(122,154,184,0.04) 0%, transparent 65%),
    radial-gradient(ellipse 80% 50% at 50% 90%, rgba(7,7,8,0.95) 0%, transparent 100%);
  pointer-events: none;
}

/* Fine grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220,215,205,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,215,205,0.012) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-eyebrow {
  position: relative;
  z-index: 1;
  font-size: 0.65rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 24px;
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 8px;
  max-width: 760px;
}

.hero h1 em {
  font-style: normal;
  color: var(--cream-light);
}

/* Rule between headline and sub */
.hero-rule {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px auto 20px;
  width: min(320px, 80vw);
}

.hero-rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cream-dim));
}

.hero-rule-line:last-child {
  background: linear-gradient(to left, transparent, var(--cream-dim));
}

.hero-rule-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cream-dim);
  flex-shrink: 0;
}

.hero-sub {
  position: relative;
  z-index: 1;
  font-size: clamp(0.75rem, 1.8vw, 0.88rem);
  letter-spacing: 0.14em;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.9;
  margin-bottom: 52px;
}

.hero-ctas {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 13px 28px;
  border: 1px solid var(--cream-dim);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius);
}

.btn:hover {
  background: var(--cream-dim);
  border-color: var(--cream);
  color: var(--cream-light);
}

.btn-listening {
  border-color: rgba(201,168,76,0.35);
  color: var(--gold);
}

.btn-listening:hover {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold);
  color: #e2c97e;
}

.btn-reading {
  border-color: rgba(122,154,184,0.35);
  color: var(--silver);
}

.btn-reading:hover {
  background: rgba(122,154,184,0.12);
  border-color: var(--silver);
  color: #a8c4dc;
}

/* ============================================================
   THE ROOMS — Two large door cards
   ============================================================ */

.rooms-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
  border-top: 1px solid var(--border);
}

.room-door {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px 52px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  transition: background var(--transition);
  min-height: 75vh;
}

/* Listening Room door — warm gold */
.room-door--listening {
  border-right: 1px solid var(--border);
  background: var(--black);
}

.room-door--listening::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(201,168,76,0.06) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(7,7,8,0) 30%, rgba(7,7,8,0.9) 100%);
  transition: opacity var(--transition);
}

.room-door--listening:hover::before {
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(201,168,76,0.12) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(7,7,8,0) 20%, rgba(7,7,8,0.92) 100%);
}

/* Reading Room door — cool silver */
.room-door--reading {
  background: var(--black);
}

.room-door--reading::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(122,154,184,0.05) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(7,7,8,0) 30%, rgba(7,7,8,0.9) 100%);
  transition: opacity var(--transition);
}

.room-door--reading:hover::before {
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(122,154,184,0.11) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(7,7,8,0) 20%, rgba(7,7,8,0.92) 100%);
}

/* Door ornament — large background symbol */
.room-door-ornament {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(7rem, 16vw, 14rem);
  font-style: italic;
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  line-height: 1;
  user-select: none;
}

.room-door--listening .room-door-ornament {
  color: rgba(201,168,76,0.07);
}

.room-door--reading .room-door-ornament {
  color: rgba(122,154,184,0.06);
}

.room-door:hover .room-door-ornament {
  transform: translate(-50%, -62%) scale(1.03);
  opacity: 0.8;
}

/* Door content (label, title, description, CTA) */
.room-door-content {
  position: relative;
  z-index: 1;
}

.room-door-label {
  font-size: 0.6rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.room-door--listening .room-door-label { color: var(--gold); }
.room-door--reading  .room-door-label { color: var(--silver); }

.room-door-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.room-door-desc {
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--text-muted);
  max-width: 320px;
  margin-bottom: 36px;
  letter-spacing: 0.04em;
}

.room-door-enter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition);
}

.room-door--listening .room-door-enter { color: var(--gold); }
.room-door--reading  .room-door-enter { color: var(--silver); }

.room-door-enter svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.room-door:hover .room-door-enter {
  opacity: 1;
  transform: translateY(0);
}

.room-door:hover .room-door-enter svg {
  transform: translateX(4px);
}

/* Vertical divider label between doors */
.rooms-divider {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.rooms-divider-text {
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-faint);
  writing-mode: vertical-lr;
}

/* ============================================================
   ABOUT / PHILOSOPHY SECTION
   ============================================================ */

.about-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 32px;
  text-align: center;
}

.section-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 24px;
  display: block;
}

.about-rule {
  width: 48px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cream-dim), transparent);
  margin: 0 auto 36px;
}

.about-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-style: italic;
  line-height: 1.95;
  color: var(--text-muted);
  font-weight: 300;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}

.footer-logo {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.footer-logo img {
  height: 36px;
  width: auto;
  opacity: 0.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .site-header { padding: 20px 24px; }
  .site-nav { display: none; }
  .rooms-section { grid-template-columns: 1fr; }
  .room-door { min-height: 60vh; padding: 40px 32px; }
  .room-door--listening { border-right: none; border-bottom: 1px solid var(--border); }
  .about-section { padding: 72px 24px; }
  .site-footer { padding: 40px 24px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .room-door { padding: 36px 24px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

.fade-in { animation: fade-in 0.85s ease forwards; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stagger-1 { animation-delay: 0.10s; opacity: 0; }
.stagger-2 { animation-delay: 0.24s; opacity: 0; }
.stagger-3 { animation-delay: 0.38s; opacity: 0; }
.stagger-4 { animation-delay: 0.52s; opacity: 0; }
.stagger-5 { animation-delay: 0.66s; opacity: 0; }
