/* style.css — The Quiet Room Design System */

/* ==================== TOKENS ==================== */
:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Colors — Warm, earthy palette inspired by calm interiors */
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-surface-2: #F5F2ED;
  --color-surface-offset: #EDEAE4;
  --color-divider: #DCD8D0;
  --color-border: #CCC8BF;

  --color-text: #2A2520;
  --color-text-muted: #6B665E;
  --color-text-faint: #A8A49C;

  --color-primary: #01696F;
  --color-primary-hover: #0C4E54;
  --color-primary-highlight: #E0F0F1;

  --color-warm: #B8845A;
  --color-warm-light: #F5EDDF;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 50 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 50 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 50 / 0.12);
}

/* ==================== GLOBAL ==================== */

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover { color: var(--color-primary-hover); }

/* ==================== NAV ==================== */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: var(--space-4) var(--space-6);
  display: flex; align-items: center; justify-content: space-between;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.site-nav.scrolled {
  box-shadow: var(--shadow-sm);
}
.site-nav.on-dark {
  background: oklch(0.08 0.005 250 / 0.85);
}
.site-nav.on-dark .nav-logo-text,
.site-nav.on-dark .nav-links a { color: #E8E6E1; }
.site-nav.on-dark .nav-links a:hover { color: #4F98A3; }

.nav-logo {
  display: flex; align-items: center; gap: var(--space-3);
  text-decoration: none; color: var(--color-text);
}
.nav-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
}
.nav-links {
  display: flex; gap: var(--space-6); list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--color-primary);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--color-primary); }
.nav-links a.active::after { width: 100%; }

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: var(--color-text);
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.2s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 20px; height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0;
    width: 280px; height: 100dvh;
    flex-direction: column;
    background: var(--color-surface);
    padding: var(--space-20) var(--space-8);
    gap: var(--space-6);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out);
    box-shadow: var(--shadow-lg);
    z-index: 200;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: var(--text-lg); color: var(--color-text); }
  .site-nav.on-dark .nav-links { background: #1c1b19; }
  .site-nav.on-dark .nav-toggle { color: #E8E6E1; }
}

/* ==================== HERO (3D) ==================== */

.hero-3d {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: #0F1117;
  overflow: hidden;
}
.hero-3d iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.hero-3d-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--space-12) var(--space-8) var(--space-8);
  background: linear-gradient(to top, rgba(15,17,23,0.95) 0%, rgba(15,17,23,0.6) 50%, transparent 100%);
  text-align: center;
  pointer-events: none;
  z-index: 5;
}
.hero-3d-overlay h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: #E8E6E1;
  margin-bottom: var(--space-3);
}
.hero-3d-overlay p {
  font-size: var(--text-base);
  color: #8A8880;
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}
.hero-3d-overlay .btn {
  pointer-events: auto;
}

/* Transition strip: dark → light */
.dark-to-light {
  height: 120px;
  background: linear-gradient(to bottom, #0F1117 0%, var(--color-bg) 100%);
}

/* ==================== SECTIONS ==================== */

.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
.section-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.section-narrow {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.section-body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 58ch;
  line-height: 1.7;
}

/* ==================== BENEFITS GRID ==================== */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.benefit-card {
  padding: var(--space-6) var(--space-5);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.benefit-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.benefit-icon {
  width: 40px; height: 40px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.benefit-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.benefit-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ==================== PROCESS STEPS ==================== */

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--space-8);
  margin-top: var(--space-8);
}
.process-step {
  position: relative;
  padding-left: var(--space-8);
}
.step-num {
  position: absolute; left: 0; top: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: oklch(from var(--color-primary) l c h / 0.2);
  line-height: 1;
}
.process-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.process-step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ==================== IMAGE + TEXT LAYOUT ==================== */

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}
.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; }
.split-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.split-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

@media (max-width: 768px) {
  .split-section { grid-template-columns: 1fr; }
  .split-section.reverse { direction: ltr; }
}

/* ==================== CTA BAND ==================== */

.cta-band {
  background: var(--color-surface-2);
  padding: clamp(var(--space-12), 6vw, var(--space-20)) var(--space-4);
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.cta-band p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}

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

.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #FFFFFF;
}

.btn-light {
  background: rgba(255,255,255,0.12);
  color: #E8E6E1;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-light:hover {
  background: rgba(255,255,255,0.2);
  color: #FFFFFF;
}

/* ==================== PAGE HERO (non-3D pages) ==================== */

.page-hero {
  padding: calc(80px + var(--space-16)) var(--space-4) var(--space-12);
  background: var(--color-surface-2);
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.page-hero p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-inline: auto;
}

/* ==================== HOW IT WORKS — TIMELINE ==================== */

.timeline {
  position: relative;
  padding-left: var(--space-10);
  margin-top: var(--space-10);
}
.timeline::before {
  content: '';
  position: absolute; left: 14px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--color-divider);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-10);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: calc(-1 * var(--space-10) + 6px); top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-bg);
}
.timeline-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.timeline-item p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ==================== CONTACT FORM ==================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  margin-top: var(--space-10);
}
.contact-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.contact-info p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}
.contact-detail {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.contact-detail svg { flex-shrink: 0; color: var(--color-primary); margin-top: 2px; }
.contact-detail span { font-size: var(--text-sm); color: var(--color-text-muted); }
.contact-detail a { font-size: var(--text-sm); }

.contact-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12);
}
.contact-form textarea { resize: vertical; min-height: 140px; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

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

.site-footer {
  background: #1E1C18;
  color: #A8A49C;
  padding: var(--space-12) var(--space-4) var(--space-6);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}
.footer-brand .nav-logo-text {
  color: #E8E6E1;
  margin-bottom: var(--space-3);
  display: block;
}
.footer-brand p {
  font-size: var(--text-sm);
  color: #7A7570;
  line-height: 1.6;
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #E8E6E1;
  margin-bottom: var(--space-4);
  letter-spacing: 0.04em;
}
.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: #7A7570;
  margin-bottom: var(--space-2);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-col a:hover { color: #E8E6E1; }
.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-bottom: var(--space-4);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: #5A5650;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== FULL-BLEED IMAGE ==================== */

.full-bleed-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}
.full-bleed-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ==================== QUOTE BLOCK ==================== */

.quote-block {
  padding: var(--space-8) var(--space-6);
  border-left: 3px solid var(--color-primary);
  background: var(--color-primary-highlight);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: var(--space-8) 0;
}
.quote-block p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.6;
}

/* ==================== VALUES GRID ==================== */

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.value-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.value-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
