/* Home page. Approved style block copied verbatim from railey-ashcombe-hero.html (#tourCanvas -> #tourVideo). Self-contained: the home design has its own globals, so base.css is not loaded here. */
:root {
  --ivory: #F6F1E9;
  --stone: #E6DCCB;
  --brass: #A6864F;
  --green: #2F3E36;
  --ink: #1F1C18;
  --bg: var(--ivory);
  --fg: var(--ink);
  --container: 1200px;
  --gutter: clamp(20px, 6vw, 80px);
  --edge: max(var(--gutter), calc((100% - var(--container)) / 2));
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: inherit; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

button, a, [role="button"] { touch-action: manipulation; }

.serif { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ---- Pinned scroll sequence ---- */
.scrollytelling {
  position: relative;
  height: 700vh; /* scroll distance driving the frame sequence */
}

.pin {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
}

#tourVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31,28,24,0.62) 0%, rgba(31,28,24,0.30) 13%, rgba(31,28,24,0) 26%, rgba(31,28,24,0) 68%, rgba(31,28,24,0.55) 100%);
  pointer-events: none;
}

/* ---- Top bar ---- */
.topbar {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--edge);
  z-index: 30;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wordmark {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 15px;
  color: var(--ivory);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-right > * + * { margin-left: 32px; }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links > * + * { margin-left: 32px; }

.nav-links a {
  color: rgba(246,241,233,0.8);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: 0.03em;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--ivory); }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
}

.topbar.scrolled {
  background: var(--ivory);
  border-bottom: 1px solid var(--stone);
  transition: background 200ms ease-out;
}
.topbar.scrolled .wordmark { color: var(--ink); }
.nav-icon { color: var(--ivory); }
.topbar.scrolled .nav-icon { color: var(--ink); }
.topbar.scrolled .nav-links a { color: #59503f; }
@media (hover: hover) and (pointer: fine) {
  .topbar.scrolled .nav-links a:hover { color: var(--ink); }
}

/* ---- Hero copy block ---- */
.hero-copy {
  position: absolute;
  left: var(--edge);
  bottom: clamp(64px, 12vh, 140px);
  max-width: 620px;
  z-index: 20;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.hero-copy.in { opacity: 1; transform: translateY(0); }
.hero-copy.out { opacity: 0; transform: translateY(-10px); transition: opacity 0.5s ease, transform 0.5s ease; }

.hero-copy h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.08;
  margin: 0 0 18px;
}

.hero-copy p {
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(246,241,233,0.86);
  max-width: 46ch;
  margin: 0 0 28px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-block;
  transition: transform 120ms ease-out, background 120ms ease-out, border-color 120ms ease-out;
}
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: rgba(246,241,233,0.5); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #b8965c; }
  .btn-ghost:hover { border-color: var(--ivory); }
}

/* ---- Progress + scroll cue ---- */
.progress-rail {
  position: absolute;
  right: var(--edge);
  bottom: clamp(64px, 12vh, 140px);
  width: 1px;
  height: 120px;
  background: rgba(246,241,233,0.25);
  z-index: 20;
  display: none;
}
.progress-fill {
  width: 100%;
  background: var(--brass);
  height: 0%;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  color: rgba(246,241,233,0.8);
  font-size: 11px;
  letter-spacing: 0.14em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.scroll-cue .line {
  width: 1px;
  height: 26px;
  background: rgba(246,241,233,0.5);
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ivory);
  transform: translateY(-100%);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { to { transform: translateY(100%); } }

/* ---- Closing frame copy (end of tour) ---- */
.close-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 15;
  padding: 0 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.close-copy.in { opacity: 1; pointer-events: auto; }
.close-copy .eyebrow {
  color: var(--ivory);
  font-size: 12px;
  letter-spacing: 0.16em;
  opacity: 0.85;
  margin-bottom: 14px;
}
.close-copy h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 48px);
  color: var(--ivory);
  margin: 0 0 28px;
  max-width: 16ch;
}

/* ---- Next section teaser (proves the scroll continues past the hero) ---- */
.intro-section {
  background: var(--ivory);
  padding: clamp(96px, 16vh, 180px) clamp(20px, 6vw, 80px);
  display: grid;
  place-items: center;
  text-align: center;
}
.intro-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 46px);
  max-width: 22ch;
  line-height: 1.2;
  margin: 0 0 24px;
}
.intro-section h2 em {
  font-style: italic;
  color: var(--brass);
}
.intro-section p {
  max-width: 56ch;
  color: #4b453c;
  line-height: 1.75;
  font-size: 16px;
}

/* ---- Buy / Sell split ---- */
.split-section {
  background: var(--stone);
  padding: clamp(64px, 10vh, 120px) clamp(20px, 6vw, 80px);
}
.split-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.split-panel { padding: clamp(28px, 5vw, 64px); }
.split-panel:first-child { border-right: 1px solid rgba(31,28,24,0.14); }
.kicker {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--brass);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.split-panel h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 0 0 16px;
}
.split-panel p {
  color: #4b453c;
  line-height: 1.75;
  font-size: 15px;
  margin: 0 0 28px;
  max-width: 38ch;
}
.btn-ghost-ink { background: transparent; color: var(--ink); border-color: rgba(31,28,24,0.35); }
@media (hover: hover) and (pointer: fine) {
  .btn-ghost-ink:hover { border-color: var(--ink); }
}
@media (max-width: 760px) {
  .split-grid { grid-template-columns: 1fr; }
  .split-panel:first-child { border-right: none; border-bottom: 1px solid rgba(31,28,24,0.14); }
}

/* ---- Featured property ---- */
.featured-section {
  background: var(--ivory);
  padding: clamp(72px, 11vh, 140px) clamp(20px, 6vw, 80px);
}
.featured-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.featured-media { position: relative; }
.featured-media img {
  width: 100%;
  display: block;
  border-radius: 2px;
}
.featured-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 2px;
}
.featured-copy .kicker {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--brass);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.featured-copy h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.2;
  margin: 0 0 6px;
}
.featured-copy .location {
  color: #6b6459;
  font-size: 14px;
  margin: 0 0 24px;
}
.featured-copy p {
  color: #4b453c;
  line-height: 1.75;
  font-size: 15px;
  margin: 0 0 28px;
  max-width: 42ch;
}
.featured-meta {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  margin: 0 0 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(31,28,24,0.12);
}
.featured-meta div { display: flex; flex-direction: column; }
.featured-meta .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--ink);
}
.featured-meta .label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8375;
  margin-top: 2px;
}
@media (max-width: 760px) {
  .featured-grid { grid-template-columns: 1fr; }
}

/* ---- About Railey ---- */
.about-section {
  background: var(--stone);
  padding: clamp(72px, 11vh, 140px) clamp(20px, 6vw, 80px);
}
.about-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.about-media img {
  width: 100%;
  display: block;
  border-radius: 2px;
}
.about-copy .kicker { margin-bottom: 14px; }
.about-copy h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.35;
  margin: 0 0 24px;
  color: var(--ink);
}
.about-copy p {
  color: #4b453c;
  line-height: 1.8;
  font-size: 15px;
  margin: 0 0 20px;
  max-width: 46ch;
}
.about-stats {
  display: flex;
  gap: clamp(24px, 4vw, 40px);
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(31,28,24,0.15);
}
.about-stats div { display: flex; flex-direction: column; }
.about-stats .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 3vw, 32px);
  color: var(--ink);
  line-height: 1;
}
.about-stats .label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6459;
  margin-top: 8px;
}
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { flex-wrap: wrap; row-gap: 20px; }
}

/* ---- Private Register teaser ---- */
.register-section {
  background: var(--ink);
  color: var(--ivory);
  padding: clamp(80px, 13vh, 160px) clamp(20px, 6vw, 80px);
  text-align: center;
}
.register-section .kicker { color: var(--brass); justify-content: center; display: flex; }
.register-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.25;
  max-width: 18ch;
  margin: 0 auto 22px;
  color: var(--ivory);
}
.register-section p {
  color: rgba(246,241,233,0.72);
  font-size: 15.5px;
  line-height: 1.8;
  max-width: 52ch;
  margin: 0 auto 36px;
}
.register-section .btn { padding: 14px 32px; }

/* ---- Testimonials ---- */
.proof-section {
  background: var(--stone);
  padding: clamp(72px, 11vh, 140px) clamp(20px, 6vw, 80px);
}
.proof-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
}
.proof-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 54px;
  color: var(--brass);
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}
.proof-item p.quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 2.1vw, 22px);
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 20px;
}
.proof-item .attribution {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6459;
}
@media (max-width: 760px) {
  .proof-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--ivory); }
.footer-cta {
  padding: 56px var(--edge) 64px;
  border-bottom: 1px solid rgba(246,241,233,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.footer-cta h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 38px);
  margin: 0;
  max-width: 20ch;
  line-height: 1.2;
}
.footer-cta .cta-meta { font-size: 12px; color: rgba(246,241,233,0.65); margin-top: 10px; }
.footer-cols {
  padding: 48px var(--edge);
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-brand-col { max-width: 260px; }
.footer-brand-col .nav-brand { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-brand-col p { font-size: 13.5px; color: rgba(246,241,233,0.65); line-height: 1.7; margin: 0 0 16px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(246,241,233,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ivory); text-decoration: none; font-size: 12px;
}
.footer-link-group { min-width: 140px; }
.footer-link-group .col-label { font-size: 12.5px; color: rgba(246,241,233,0.55); margin-bottom: 12px; }
.footer-link-group a { display: block; color: rgba(246,241,233,0.85); text-decoration: none; font-size: 13.5px; margin-bottom: 12px; }
.footer-mark { overflow: hidden; line-height: 0.75; padding: 0 var(--edge); }
.footer-mark svg { width: 100%; height: auto; display: block; color: rgba(246,241,233,0.07); }
.footer-bottom {
  padding: 16px var(--edge);
  border-top: 1px solid rgba(246,241,233,0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: rgba(246,241,233,0.55);
}
.footer-bottom a { color: rgba(246,241,233,0.55); }
@media (max-width: 640px) {
  .scrollytelling { height: 600vh; }
  .progress-rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scrollytelling { height: auto; }
  .pin { position: relative; height: 100dvh; }
  #tourVideo { display: none; }
  .pin { background-image: var(--fallback-bg, none); background-size: cover; background-position: center; }
  .hero-copy { opacity: 1; transform: none; position: absolute; }
  .scroll-cue { display: none; }
  .close-copy { display: none; }
}

/* ---- WordPress: keep the fixed bar clear of the admin bar when logged in ---- */
body.admin-bar .topbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .topbar { top: 46px; } }

/* ---- Text-legibility shades (added on request; not in the original design) ----
   Two soft layers between the video and the copy. Each fades in and out with the copy it supports,
   so the photography stays untouched for the rest of the tour. */
.shade {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.shade.in { opacity: 1; }
.shade--hero {
  background:
    linear-gradient(90deg, rgba(31,28,24,0.70) 0%, rgba(31,28,24,0.52) 32%, rgba(31,28,24,0.20) 60%, rgba(31,28,24,0) 82%),
    linear-gradient(0deg, rgba(31,28,24,0.55) 0%, rgba(31,28,24,0) 58%);
}
.shade--close {
  background: radial-gradient(ellipse 72% 62% at 50% 50%, rgba(31,28,24,0.72) 0%, rgba(31,28,24,0.52) 55%, rgba(31,28,24,0.26) 100%);
}
@media (max-width: 760px) {
  .shade--hero {
    background:
      linear-gradient(0deg, rgba(31,28,24,0.88) 0%, rgba(31,28,24,0.76) 34%, rgba(31,28,24,0.42) 62%, rgba(31,28,24,0) 86%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .shade--hero { opacity: 1; }
  .shade--close { display: none; }
}

/* ---- Top bar sizing + one-line guarantee (added on request) ---- */
.topbar .wordmark { font-size: 17px; white-space: nowrap; }
.topbar .nav-links a { font-size: 14px; }
.topbar .nav-right .btn { padding: 11px 22px; font-size: 13px; white-space: nowrap; }
.topbar .nav-icon { flex-shrink: 0; }
@media (max-width: 1100px) {
  /* Approved CSS stacks a flex gap and a sibling margin (64px between links); tighten it so the bar always fits. */
  .topbar .nav-right, .topbar .nav-links { gap: 24px; }
  .topbar .nav-right > * + *, .topbar .nav-links > * + * { margin-left: 0; }
}
@media (max-width: 900px) {
  .topbar .wordmark { font-size: 15px; }
  .topbar .nav-links a { font-size: 13px; }
  .topbar .nav-right .btn { padding: 10px 18px; font-size: 12.5px; }
}
@media (max-width: 760px) {
  /* The link group is hidden here; its sibling margin would otherwise push the button off-screen. */
  .topbar .nav-right > * + * { margin-left: 0; }
}
@media (max-width: 480px) {
  .topbar .nav-brand { gap: 6px; }
  .topbar .wordmark { font-size: 13px; letter-spacing: 0.1em; }
  .topbar .nav-right .btn { padding: 9px 14px; font-size: 12px; }
}
@media (max-width: 340px) {
  .topbar .wordmark { font-size: 12px; letter-spacing: 0.08em; }
  .topbar .nav-right .btn { padding: 8px 10px; font-size: 11.5px; }
}

/* ---- Stacking fix (added): keep the fixed top bar above the sections that scroll past it. ---- */
.pin { z-index: 40; }

/* ---- Short landscape screens (phones held sideways) (added) ----
   The copy blocks are centred/bottom-anchored for tall screens and collide with the bar when height is scarce. */
@media (max-height: 560px) and (orientation: landscape) {
  .hero-copy { bottom: 44px; max-width: 560px; }
  .hero-copy h1 { font-size: clamp(26px, 4.4vw, 36px); margin-bottom: 10px; }
  .hero-copy p { font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
  .hero-copy .btn { padding: 11px 20px; }
  .scroll-cue { display: none; }
  .close-copy { padding-top: 96px; padding-bottom: 24px; }
  .close-copy .eyebrow { margin-bottom: 8px; }
  .close-copy h2 { font-size: clamp(24px, 4.2vw, 34px); margin-bottom: 16px; }
}

/* ---- iPhone frame-sequence canvas (added): sits over the video/poster; transparent until the first frame is drawn. ---- */
#tourCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { #tourCanvas { display: none; } }
