/* ============================================================
   Cherry Tree Surgical — marketing site
   Design tokens, layout, and component styles.
   Scroll/canvas animation lives in main.js.
   ============================================================ */

:root {
  --ct-accent: #A5302B;
  --ct-bg: #05060c;
  --ct-bg-inner: #070810;
  --ct-text: #F3EEE4;

  /* horizontal page padding pattern */
  --pad-x: clamp(1.1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--ct-bg);
  color: var(--ct-text);
  font-family: 'Libre Franklin', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(165, 48, 43, 0.32); color: #fff; }

/* ---------- Keyframes ---------- */
@keyframes ctBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(42%); }
}
@keyframes ctFloatEye {
  0%, 100% { transform: scale(1.0) translate3d(0, 0, 0); }
  50%      { transform: scale(1.045) translate3d(-0.6%, -1%, 0); }
}
@keyframes ctReveal {
  from { opacity: 0; transform: translateY(34px); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Root / anchors ---------- */
#ct-root { position: relative; width: 100%; }
.anchor-top { position: absolute; top: 0; left: 0; }
.anchor-inline { display: block; height: 1px; }

html { scroll-behavior: smooth; }

/* ============================================================
   FIXED COSMIC EYEBALL BACKGROUND  (z-index: 0)
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ct-bg);
}
.bg__inner {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: scale(1) translateY(0);
}
.bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 95% at 47% 45%, transparent 24%, rgba(5, 6, 12, 0.35) 56%, rgba(4, 4, 9, 0.92) 100%);
  opacity: 0.28;
}
.scrim { position: absolute; left: 0; right: 0; pointer-events: none; }
.scrim--top {
  top: 0; height: 34%;
  background: linear-gradient(to bottom, rgba(4, 4, 9, 0.78), rgba(4, 4, 9, 0.18) 55%, transparent);
}
.scrim--bottom {
  bottom: 0; height: 48%;
  background: linear-gradient(to top, rgba(4, 4, 9, 0.9), rgba(4, 4, 9, 0.32) 42%, transparent);
}

/* ============================================================
   PARTICLE DUST  (z-index: 1)
   ============================================================ */
.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   FIXED REVEAL CARDS  (z-index: 3)
   ============================================================ */
.cards {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 0 clamp(1.1rem, 4vw, 2.5rem) clamp(1.8rem, 5vh, 3rem);
  opacity: 0;
  pointer-events: none;
}
.cards__inner { max-width: 76rem; margin: 0 auto; }
.cards__eyebrow { text-align: center; margin: 0 0 1.3rem; }
.cards__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.7rem);
}
.card {
  background: rgba(10, 11, 18, 0.5);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  border: 1px solid rgba(220, 210, 185, 0.14);
  border-radius: 16px;
  padding: clamp(1.3rem, 2vw, 1.7rem);
}
.card__num {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ct-accent);
  font-weight: 600;
  margin: 0 0 0.85rem;
}
.card__title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  color: var(--ct-text);
  margin: 0 0 0.55rem;
  line-height: 1.08;
}
.card__body {
  color: #B4AEA1;
  font-size: 0.95rem;
  line-height: 1.62;
  margin: 0;
}

/* ============================================================
   NAV  (z-index: 50)
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.95rem, 2.3vh, 1.4rem) var(--pad-x);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo {
  height: 44px;
  width: auto;
  display: block;
  background: #ffffff;
  border-radius: 10px;
  padding: 5px 7px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.nav__wordmark {
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: 0.01em;
  color: var(--ct-text);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.7rem);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav__link {
  font-size: 0.9rem;
  color: #CFC9BC;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.nav__link:hover { color: #ffffff; }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(220, 210, 185, 0.32);
  border-radius: 999px;
  padding: 0.5rem 1.05rem;
  color: #EDE7DA;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: border-color 0.2s ease;
}
.nav__cta:hover { border-color: rgba(220, 210, 185, 0.6); }

/* Hamburger toggle — hidden on desktop, shown below 760px */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: rgba(9, 10, 17, 0.45);
  border: 1px solid rgba(220, 210, 185, 0.28);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  flex-shrink: 0;
}
.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #EDE7DA;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav.is-open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   CONTENT FLOW  (z-index: 2)
   ============================================================ */
.content { position: relative; z-index: 2; display: block; }
.spacer { width: 100%; }
.spacer--48 { height: 48vh; }
.spacer--42 { height: 42vh; }

/* ---------- Shared type ---------- */
.eyebrow {
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 1.4rem;
}
.eyebrow--accent {
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  color: var(--ct-accent);
  font-weight: 600;
}
.emoji { font-size: 0.95em; }
.emoji--lg { font-size: 0.5em; vertical-align: 0.18em; }
.accent-italic { font-style: italic; color: var(--ct-accent); }
.link-accent {
  color: var(--ct-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(165, 48, 43, 0.4);
}
.link-muted { color: #C3BDB0; text-decoration: none; }

/* ---------- Pills / buttons ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  transition: filter 0.2s ease, border-color 0.2s ease;
}
.pill--solid {
  background: var(--ct-accent);
  color: #FCEFEA;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.85rem 1.65rem;
  font-size: 0.95rem;
}
.pill--solid:hover { filter: brightness(1.08); }
.pill--outline {
  border: 1px solid rgba(220, 210, 185, 0.3);
  color: #EDE7DA;
  font-weight: 500;
  padding: 0.85rem 1.55rem;
  font-size: 0.95rem;
}
.pill--outline:hover { border-color: rgba(220, 210, 185, 0.58); }
.pill--phone {
  gap: 0.6rem;
  border: 1px solid rgba(220, 210, 185, 0.28);
  padding: 0.82rem 1.35rem;
  color: #EDE7DA;
  font-size: 0.94rem;
  letter-spacing: 0.03em;
  background: rgba(9, 10, 17, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pill--phone:hover { border-color: rgba(220, 210, 185, 0.55); }
.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ct-accent);
  box-shadow: 0 0 11px var(--ct-accent);
}

/* Visible keyboard focus for all interactive elements */
a:focus-visible {
  outline: 2px solid var(--ct-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.hero__fade {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0 clamp(1.25rem, 5vw, 2rem) clamp(2.6rem, 7vh, 5rem);
}
.hero__eyebrow {
  color: #F6F1E8;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 0 3px rgba(0, 0, 0, 0.6);
}
.hero__title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.7rem, 7.6vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 15ch;
  color: #F6F2E9;
  text-wrap: balance;
  text-shadow: 0 2px 48px rgba(0, 0, 0, 0.55);
}
.accent-phrase {
  position: relative;
  display: inline-block;
  font-style: italic;
  color: var(--ct-accent);
}
.accent-underline {
  position: absolute;
  left: 0; right: 0;
  bottom: 0.08em;
  height: 3px;
  background: var(--ct-accent);
  opacity: 0.5;
  border-radius: 2px;
}
.hero__subhead {
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: #D8D2C5;
  max-width: 42ch;
  line-height: 1.5;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2.3rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero__partner-link {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #D8D2C5;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(165, 48, 43, 0.45);
  padding-bottom: 2px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hero__partner-link:hover { color: #F6F2E9; border-color: rgba(165, 48, 43, 0.9); }
.scrollcue {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding-bottom: 1.7rem;
}
.scrollcue svg {
  width: 1.35rem;
  height: 1.35rem;
  color: #8C8779;
  animation: ctBounce 1.5s infinite;
}

/* ============================================================
   FOCUS / PULL-QUOTE
   ============================================================ */
.focus {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh clamp(1.5rem, 6vw, 3rem);
}
.focus__inner {
  max-width: 58rem;
  text-align: center;
  opacity: 0;
}
.focus__statement {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 5.2vw, 4rem);
  line-height: 1.12;
  color: #F6F2E9;
  margin: 0;
  text-wrap: balance;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}
.focus__body {
  margin: 1.7rem auto 0;
  color: #C3BDB0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 52ch;
  line-height: 1.62;
}

/* Cards scroll trigger — invisible, drives the fixed card panel */
.cards-trigger { height: 172vh; }

/* ============================================================
   CLOSING REVEAL (VISIT)
   ============================================================ */
.visit {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10vh clamp(1.5rem, 6vw, 3rem);
}
.visit__inner { max-width: 60rem; opacity: 0; }
.visit__title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.8rem, 8.4vw, 6.4rem);
  line-height: 1.0;
  color: #F6F2E9;
  margin: 0;
  text-shadow: 0 2px 48px rgba(0, 0, 0, 0.55);
}
.visit__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.visit__address {
  margin-top: 2rem;
  color: #9C9789;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  background: var(--ct-bg-inner);
  border-top: 1px solid rgba(220, 210, 185, 0.1);
  padding: clamp(3rem, 7vh, 5rem) clamp(1.25rem, 5vw, 3rem) 2.4rem;
}
.footer__cols {
  max-width: 76rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2.6rem 3rem;
  justify-content: space-between;
}
.footer__brand { max-width: 30ch; }
.footer__brandline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}
.footer__logo {
  height: 36px;
  width: auto;
  display: block;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.footer__name { font-weight: 600; font-size: 1.05rem; color: var(--ct-text); }
.footer__address { color: #9C9789; font-size: 0.95rem; line-height: 1.65; margin: 0 0 0.9rem; }
.footer__phones { display: flex; flex-direction: column; gap: 0.3rem; }
.footer__phone {
  color: #EDE7DA;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.footer__phone--backup { color: #9C9789; font-size: 0.9rem; }
.footer__tag {
  color: #6F6B60;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer__col { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__heading {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6F6B60;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.footer__link {
  color: #CFC9BC;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.footer__link:hover { color: #ffffff; }
.footer__partner { max-width: 26ch; }
.footer__partnerlink {
  color: #EDE7DA;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(165, 48, 43, 0.4);
  transition: color 0.2s ease;
}
.footer__partnerlink:hover { color: #ffffff; }
.footer__note { color: #8A8579; font-size: 0.9rem; line-height: 1.6; margin: 0.9rem 0 0; }

/* Blinking MECCA (May Eye Care) logo — sits on a white chip so the
   logo's own white background reads as a deliberate card on the dark footer. */
.footer__mecca {
  display: inline-block;
  margin: 0.95rem 0 0.1rem;
  background: #ffffff;
  border-radius: 10px;
  padding: 7px 9px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.footer__mecca:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.footer__mecca-img { display: block; width: 200px; max-width: 100%; height: auto; }

.footer__fax {
  color: #9C9789;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0.55rem 0 0;
}

.footer__specialty {
  max-width: 76rem;
  margin: 2.6rem auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.1rem;
  padding: 1.3rem 0;
  border-top: 1px solid rgba(220, 210, 185, 0.08);
  border-bottom: 1px solid rgba(220, 210, 185, 0.08);
}
.footer__specialty-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ct-accent);
  font-weight: 600;
}
.footer__specialty-item { color: #B4AEA1; font-size: 0.9rem; }
.footer__dot { color: #4F4C44; }

.footer__legal {
  max-width: 76rem;
  margin: 1.6rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.footer__disclaimer { color: #757166; font-size: 0.84rem; line-height: 1.6; margin: 0; max-width: 62ch; }
.footer__copyright { color: #615E55; font-size: 0.84rem; margin: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .nav__toggle { display: flex; }

  /* The link row collapses into a glass dropdown panel anchored under the bar.
     Absolute positioning takes it out of the flex flow, so the bar shows just
     the brand (left) and the hamburger (right). */
  .nav__links {
    position: absolute;
    top: calc(100% - 0.25rem);
    left: var(--pad-x);
    right: var(--pad-x);
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.8rem;
    background: rgba(8, 9, 15, 0.94);
    border: 1px solid rgba(220, 210, 185, 0.16);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }
  .nav.is-open .nav__links {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }
  .nav__link {
    font-size: 1rem;
    padding: 0.7rem 0.65rem;
    border-radius: 10px;
  }
  .nav__link:hover { background: rgba(220, 210, 185, 0.07); color: #ffffff; }
  .nav__cta {
    justify-content: center;
    margin-top: 0.3rem;
    padding: 0.78rem 1rem;
    font-size: 0.95rem;
  }
}

/* ============================================================
   REDUCED MOTION — disable the always-on chevron bounce and
   let the page render fully static. Scroll-coupled effects are
   softened in main.js; reveal blocks are forced visible here so
   no content is stuck at opacity:0.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scrollcue svg { animation: none; }
  .focus__inner,
  .visit__inner { opacity: 1 !important; transform: none !important; filter: none !important; }
}
