/* ===============================================================
   Daniel Dennis · DFW Mortgage — luxury estate scroll experience
   Palette: ivory #FAF6EE · cream #F3ECDF · espresso #2B211A
            gold #B08D57 · gold-light #D6BC94
   =============================================================== */

:root {
  --ivory: #FAF6EE;
  --cream: #F3ECDF;
  --espresso: #2B211A;
  --espresso-soft: #4A3C30;
  --gold: #B08D57;
  --gold-light: #D6BC94;
  --gold-faint: rgba(176, 141, 87, 0.18);
  --serif: "Cormorant Garamond", "Didot", "Georgia", serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", sans-serif;
  --rail-w: 260px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ===== Hero overlay (lives inside the video stage, fades on scroll) ===== */
.hero {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  z-index: 10;
  pointer-events: none;
  will-change: opacity, transform;
}

.hero.is-hidden { visibility: hidden; }

.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(24, 16, 8, 0.82) 0%, rgba(24, 16, 8, 0.35) 38%, rgba(24, 16, 8, 0.08) 65%),
    radial-gradient(ellipse at 50% 100%, rgba(24, 16, 8, 0.35), transparent 60%);
}

.hero__content {
  position: relative;
  max-width: 880px;
  padding: 0 6vw 13vh;
  color: var(--ivory);
}

.hero__kicker {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  font-weight: 500;
  text-wrap: balance;
  margin-bottom: 1.3rem;
}

.hero__sub {
  max-width: 34rem;
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  color: rgba(250, 246, 238, 0.88);
}

.hero__cue {
  margin-top: 2.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.hero__cue span {
  display: block;
  width: 1px; height: 44px;
  background: linear-gradient(var(--gold-light), transparent);
  animation: cue 2.2s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.5; }
  50%      { transform: scaleY(1);   transform-origin: top; opacity: 1; }
}

/* ===== Progress rail ===== */
.rail {
  position: fixed;
  left: clamp(1.2rem, 3vw, 3rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.rail.is-visible { opacity: 1; }

.rail__line {
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 1px;
  background: rgba(214, 188, 148, 0.35);
}

.rail__fill {
  width: 100%;
  height: 0%;
  background: var(--gold);
  transition: height 0.15s linear;
}

.rail__steps { list-style: none; display: grid; gap: 2.6rem; }

.rail__step {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.rail__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1px solid var(--gold-light);
  background: var(--ivory);
  transition: all 0.4s ease;
  flex: none;
}

.rail__label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 246, 238, 0.55);
  display: grid;
  line-height: 1.5;
  transition: color 0.4s ease;
}

.rail__label em {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: rgba(214, 188, 148, 0.6);
}

.rail__step.is-active .rail__dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 5px var(--gold-faint);
}

.rail__step.is-active .rail__label { color: var(--ivory); }
.rail__step.is-active .rail__label em { color: var(--gold-light); }

/* Rail recolors when over light sections */
.rail.on-light .rail__label { color: rgba(43, 33, 26, 0.5); }
.rail.on-light .rail__step.is-active .rail__label { color: var(--espresso); }

/* ===== Tour ===== */
.tour { position: relative; }

.tour__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #14100b;
}

.tour__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tour__video.is-active { opacity: 1; }

.tour__vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(20, 14, 8, 0.55) 0%, transparent 45%),
    linear-gradient(to top, rgba(20, 14, 8, 0.5) 0%, transparent 30%);
  pointer-events: none;
}

/* Step cards */
.card {
  position: absolute;
  right: clamp(1.2rem, 5vw, 5rem);
  bottom: clamp(1.4rem, 7vh, 4.5rem);
  width: min(30rem, calc(100vw - 2.4rem));
  background: rgba(250, 246, 238, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(176, 141, 87, 0.35);
  border-top: 3px solid var(--gold);
  padding: 1.9rem 2.1rem 1.7rem;
  box-shadow: 0 30px 60px rgba(20, 12, 4, 0.35);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.card.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.card__room {
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.card h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: 0.65rem;
}

.card__chip {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  margin-bottom: 0.9rem;
  background: rgba(214, 188, 148, 0.12);
}

.card__body { font-size: 0.95rem; color: var(--espresso-soft); }

.card__tip {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(176, 141, 87, 0.3);
  font-size: 0.9rem;
  color: var(--espresso);
}

.card__tip span {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

/* ===== Shared section styling ===== */
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 0.6rem;
}

.section-sub {
  text-align: center;
  color: var(--espresso-soft);
  max-width: 36rem;
  margin: 0 auto;
}

/* ===== FAQ ===== */
.faq {
  padding: clamp(4.5rem, 9vw, 8rem) 6vw;
  max-width: 60rem;
  margin: 0 auto;
}

.faq__list { margin-top: 3rem; display: grid; gap: 0.9rem; }

.faq__item {
  border: 1px solid rgba(176, 141, 87, 0.3);
  background: var(--cream);
  padding: 0;
  transition: border-color 0.3s ease;
}

.faq__item[open] { border-color: var(--gold); }

.faq__item summary {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  padding: 1.25rem 3.4rem 1.25rem 1.6rem;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq__item p {
  padding: 0 1.6rem 1.4rem;
  color: var(--espresso-soft);
  font-size: 0.97rem;
  max-width: 46rem;
}

/* ===== Agent card ===== */
.agent {
  padding: 0 6vw clamp(4rem, 8vw, 7rem);
  display: flex;
  justify-content: center;
}

.agent__card {
  display: flex;
  gap: 2.6rem;
  align-items: center;
  max-width: 52rem;
  background: var(--cream);
  border: 1px solid rgba(176, 141, 87, 0.35);
  border-top: 3px solid var(--gold);
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: 0 24px 50px rgba(43, 33, 26, 0.08);
}

.agent__photo {
  flex: none;
  width: clamp(110px, 16vw, 150px);
  height: clamp(110px, 16vw, 150px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--gold);
  box-shadow: 0 10px 26px rgba(43, 33, 26, 0.2);
}

.agent__info h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }

.agent__meta {
  font-size: 0.75rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0.3rem 0 1rem;
}

.agent__blurb { color: var(--espresso-soft); font-size: 0.97rem; }

.agent__contact {
  list-style: none;
  margin-top: 1.1rem;
  display: grid;
  gap: 0.2rem;
  font-size: 0.95rem;
}

.agent__contact a {
  color: var(--espresso);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-light);
  transition: color 0.25s ease;
}

.agent__contact a:hover { color: var(--gold); }

/* ===== Playbook CTA ===== */
.playbook {
  background:
    linear-gradient(rgba(24, 16, 8, 0.78), rgba(24, 16, 8, 0.88)),
    url("assets/poster-4.jpg") center / cover no-repeat, #1a130c;
  color: var(--ivory);
  padding: clamp(5rem, 10vw, 8.5rem) 6vw;
  text-align: center;
}

.playbook__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.playbook h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 1rem; }

.playbook__sub {
  max-width: 40rem;
  margin: 0 auto 2.4rem;
  color: rgba(250, 246, 238, 0.85);
}

.playbook__form {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 44rem;
  margin: 0 auto;
}

.playbook__form input {
  flex: 1 1 200px;
  padding: 0.95rem 1.2rem;
  font: 300 1rem var(--sans);
  background: rgba(250, 246, 238, 0.08);
  border: 1px solid rgba(214, 188, 148, 0.45);
  color: var(--ivory);
  outline: none;
  transition: border-color 0.25s ease;
}

.playbook__form input::placeholder { color: rgba(250, 246, 238, 0.55); }
.playbook__form input:focus { border-color: var(--gold); }

.playbook__form button,
.ctabar__btn {
  padding: 0.95rem 2.2rem;
  font: 400 0.85rem var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1c130a;
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.25s ease, transform 0.15s ease;
}

.playbook__form button:hover, .ctabar__btn:hover { filter: brightness(1.08); }
.playbook__form button:active { transform: translateY(1px); }

.playbook__fine {
  margin-top: 1.3rem;
  font-size: 0.8rem;
  color: rgba(250, 246, 238, 0.55);
}

.playbook__success {
  margin-top: 1.6rem;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.playbook__download {
  display: inline-block;
  margin-top: 1.3rem;
  padding: 0.85rem 2rem;
  font: 400 0.8rem var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1c130a;
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  text-decoration: none;
  transition: filter 0.25s ease, transform 0.15s ease;
}

.playbook__download:hover { filter: brightness(1.08); }
.playbook__download:active { transform: translateY(1px); }

/* ===== Sticky CTA bar ===== */
.ctabar {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translate(-50%, 140%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  width: min(46rem, calc(100vw - 2rem));
  background: rgba(28, 20, 12, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(176, 141, 87, 0.5);
  padding: 0.75rem 0.85rem 0.75rem 1.5rem;
  color: var(--ivory);
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ctabar.is-visible { transform: translate(-50%, 0); }

.ctabar__text { font-size: 0.9rem; flex: 1; }
.ctabar__text strong { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; }
.ctabar__btn { padding: 0.7rem 1.5rem; flex: none; }

/* Keep step cards clear of the sticky CTA bar */
body.ctabar-open .card { bottom: calc(clamp(1.4rem, 7vh, 4.5rem) + 3.6rem); }

/* ===== Footer ===== */
.footer {
  background: var(--espresso);
  color: rgba(250, 246, 238, 0.7);
  text-align: center;
  padding: 2.6rem 6vw;
  font-size: 0.82rem;
  display: grid;
  gap: 0.6rem;
}

.footer strong { color: var(--ivory); }

.footer a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer a:hover { color: var(--gold); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .rail__label { display: none; }
  .rail { left: 0.9rem; }

  .agent__card { flex-direction: column; text-align: center; }
  .agent__contact { justify-items: center; }

  .card {
    left: 50%;
    right: auto;
    transform: translate(-50%, 26px);
    bottom: 0.9rem;
    padding: 1.2rem 1.3rem 1.1rem;
    z-index: 45;              /* sits above the rail dots */
    max-height: 55vh;
    overflow-y: auto;
  }

  .card h2 { font-size: 1.35rem; }
  .card__body, .card__tip { font-size: 0.85rem; }

  .card.is-active { transform: translate(-50%, 0); }

  .ctabar { flex-wrap: wrap; gap: 0.7rem; text-align: center; justify-content: center; }
}

/* ===== Reduced motion: skip the scrub, show stills ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__cue span { animation: none; }
}
