/* ============================================
   LARAIB HEALTH CLINIC — PREMIUM CINEMATIC
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.no-cinema {
  scroll-behavior: auto;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F4EFE5;
  color: #1E2420;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

/* === TOKENS === */
:root {
  --ivory: #F4EFE5;
  --ivory-deep: #EDE5D6;
  --ink: #1E2420;
  --ink-2: #2A3028;
  --ink-3: #5E665F;
  --forest: #22332C;
  --moss: #4A6555;
  --moss-light: #6B8A70;
  --warm: #C4A882;
  --white: #FFFFFF;
  --black: #000000;
  
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', -apple-system, sans-serif;
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  
  --nav-h: 72px;
}

/* === CURSOR === */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s ease;
}

html.fine .cursor {
  opacity: 1;
}

.cursor-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--ivory);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor-ring {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--ivory);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), border-color 0.3s ease;
}

html.fine .cursor-ring {
  width: 36px;
  height: 36px;
}

html.fine .cursor.hover .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--ivory);
}

/* === READING PROGRESS === */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--moss);
  z-index: 9000;
  width: 0%;
  transition: width 0.1s linear;
}

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  height: var(--nav-h);
  background: rgba(244, 239, 229, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30, 36, 32, 0.06);
  transition: transform 0.4s var(--ease-out), background 0.3s ease;
}

.nav.nav--hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav-brand-icon {
  color: var(--moss);
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.3s var(--ease-out);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--ink);
  color: var(--ivory);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: var(--forest);
  transform: translateY(-1px);
}

.nav-cta-icon {
  transition: transform 0.2s ease;
}

.nav-cta:hover .nav-cta-icon {
  transform: translateX(3px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

.nav-toggle.active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle.active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* === MOBILE MENU === */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ivory);
  z-index: 7000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--ink);
}

.mobile-cta {
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: var(--ink);
  color: var(--ivory);
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================
   CINEMATIC STORY
   ============================================ */

.cinematic-story {
  position: relative;
  height: 800vh;
  background: var(--ivory);
}

.cinematic-viewport {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  will-change: opacity, transform;
}

.scene.active {
  opacity: 1;
  visibility: visible;
}

.scene-image-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.scene-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  will-change: transform, opacity;
}

.scene-scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.25) 100%
  );
  z-index: 2;
}

.scene-scrim--dark {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

.scene-body {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  padding-top: var(--nav-h);
}

.scene-content {
  max-width: 600px;
  color: var(--ivory);
}

.scene-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.scene-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.scene-title--sm {
  font-size: clamp(2rem, 5vw, 4rem);
}

.scene-title--final {
  font-size: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
}

.line {
  display: block;
  overflow: hidden;
}

.line > span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
}

.scene.active .line > span {
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.8s var(--ease-out), opacity 0.6s ease;
}

.scene.active .line:nth-child(2) > span {
  transition-delay: 0.1s;
}

.scene.active .line:nth-child(3) > span {
  transition-delay: 0.2s;
}

.scene-sub {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  margin-bottom: 2rem;
}

.scene.active .scene-sub {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.3s, transform 0.6s var(--ease-out) 0.3s;
}

.scene-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.8rem;
  background: var(--ivory);
  color: var(--ink);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: background 0.3s ease, transform 0.3s ease, opacity 0.6s ease 0.4s, transform 0.6s var(--ease-out) 0.4s;
}

.scene.active .scene-cta {
  opacity: 1;
  transform: translateY(0);
}

.scene-cta:hover {
  background: var(--ivory-deep);
  transform: translateY(-2px);
}

.scene-cta--primary {
  background: var(--moss);
  color: var(--ivory);
}

.scene-cta--primary:hover {
  background: var(--forest);
}

.scene-cta-arrow {
  transition: transform 0.2s ease;
}

.scene-cta:hover .scene-cta-arrow {
  transform: translateX(4px);
}

/* Scene 6 — Doctors */
.scene-content--doctors {
  max-width: 520px;
}

.doc-info {
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.scene.active .doc-info {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.4s, transform 0.6s var(--ease-out) 0.4s;
}

.doc-qual {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.doc-focus, .doc-training, .doc-cert {
  font-size: 0.9rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.doc-hours {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(244, 239, 229, 0.2);
}

/* Scene 7 — Clinic */
.clinic-info {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
}

.scene.active .clinic-info {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.4s, transform 0.6s var(--ease-out) 0.4s;
}

.clinic-addr {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.clinic-coord {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* Scene 8 — Final CTA */
.scene-content--final {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.final-hours {
  margin: 2rem 0;
  opacity: 0;
  transform: translateY(20px);
}

.scene.active .final-hours {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease 0.5s, transform 0.6s var(--ease-out) 0.5s;
}

.final-hour-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.final-hour-time {
  font-weight: 600;
}

.final-hour-doc {
  font-weight: 300;
  opacity: 0.85;
}

.final-phone {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.6s, transform 0.6s var(--ease-out) 0.6s;
}

.scene.active .final-phone {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ESSENTIALS BAND
   ============================================ */

.essentials {
  background: var(--ivory);
  padding: 6rem 2rem;
  border-top: 1px solid rgba(30, 36, 32, 0.06);
}

.essentials-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.essentials-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 5rem;
}

.fact-card {
  padding: 2rem 0;
  border-top: 1px solid rgba(30, 36, 32, 0.1);
}

.fact-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--ink);
}

.fact-text {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-3);
}

.fact-link {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--moss);
  transition: color 0.2s ease;
}

.fact-link:hover {
  color: var(--forest);
}

.fact-hours-row {
  display: block;
  margin-bottom: 0.5rem;
}

.fact-hours-row em {
  font-style: normal;
  font-weight: 300;
  opacity: 0.7;
}

/* FAQ */
.essentials-faq {
  margin-bottom: 4rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: var(--ink);
}

.faq-list {
  border-top: 1px solid rgba(30, 36, 32, 0.1);
}

.faq-item {
  border-bottom: 1px solid rgba(30, 36, 32, 0.1);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--moss);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform 0.3s var(--ease-out);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-bottom: 1.5rem;
}

.faq-answer p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-3);
}

.faq-answer a {
  color: var(--moss);
  text-decoration: underline;
}

/* CTA */
.essentials-cta {
  text-align: center;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--ink);
  color: var(--ivory);
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background: var(--forest);
  transform: translateY(-2px);
}

.cta-button-icon {
  transition: transform 0.2s ease;
}

.cta-button:hover .cta-button-icon {
  transform: translateX(4px);
}

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

.footer {
  background: var(--ink);
  color: var(--ivory);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer-icon {
  color: var(--moss-light);
}

.footer-addr {
  font-size: 0.85rem;
  font-weight: 300;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.footer-phone {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ivory);
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.footer-phone:hover {
  opacity: 1;
}

.footer-legal {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 300;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-sep {
  opacity: 0.5;
}

.footer-creator {
  color: var(--ivory);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.footer-creator:hover {
  opacity: 0.8;
}

/* ============================================
   REDUCED MOTION
   ============================================ */

html.rm .cinematic-story {
  height: auto;
}

html.rm .cinematic-viewport {
  position: relative;
  height: auto;
  overflow: visible;
}

html.rm .stage {
  position: relative;
  height: auto;
}

html.rm .scene {
  position: relative;
  opacity: 1;
  visibility: visible;
  height: auto;
  min-height: 100vh;
}

html.rm .scene-image-wrap {
  position: relative;
  height: 60vh;
}

html.rm .scene-image {
  transform: scale(1);
}

html.rm .line > span {
  transform: translateY(0);
  opacity: 1;
}

html.rm .scene-sub,
html.rm .scene-cta,
html.rm .doc-info,
html.rm .clinic-info,
html.rm .final-hours,
html.rm .final-phone {
  opacity: 1;
  transform: translateY(0);
}

html.rm .cursor {
  display: none;
}

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

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  
  .nav-cta {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .scene-body {
    padding: 0 2rem;
  }
  
  .essentials-facts {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }
  
  .cinematic-story {
    height: 600vh;
  }
  
  .scene-body {
    padding: 0 1.5rem;
    align-items: flex-end;
    padding-bottom: 4rem;
  }
  
  .scene-content {
    max-width: 100%;
  }
  
  .scene-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  
  .scene-title--final {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .scene-sub {
    font-size: 1rem;
  }
  
  .scene-cta {
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .final-hour-row {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .essentials {
    padding: 4rem 1.5rem;
  }
  
  .section-heading {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .cinematic-story {
    height: 500vh;
  }
  
  .scene-image-wrap {
    height: 100%;
  }
  
  .scene-image {
    object-position: center 30%;
  }
}

/* === NO-JS FALLBACK === */
html.no-cinema .cinematic-story {
  height: auto;
}

html.no-cinema .cinematic-viewport {
  position: relative;
  height: auto;
  overflow: visible;
}

html.no-cinema .stage {
  position: relative;
  height: auto;
}

html.no-cinema .scene {
  position: relative;
  opacity: 1;
  visibility: visible;
  height: auto;
  min-height: 100vh;
}

html.no-cinema .scene-image-wrap {
  position: relative;
  height: 60vh;
}

html.no-cinema .scene-image {
  transform: scale(1);
}

html.no-cinema .line > span {
  transform: translateY(0);
  opacity: 1;
}

html.no-cinema .scene-sub,
html.no-cinema .scene-cta,
html.no-cinema .doc-info,
html.no-cinema .clinic-info,
html.no-cinema .final-hours,
html.no-cinema .final-phone {
  opacity: 1;
  transform: translateY(0);
}

html.no-cinema .cursor {
  display: none;
}
