/* ==========================================================================
   The St Christopher's Collection — design system
   Palette drawn from the brand deck: warm sand, travertine, green marble,
   deep walnut and the low evening light of the Cornish coast.
   ========================================================================== */

:root {
  /* Core neutrals */
  --sand:        #F9EADF;   /* brand cream, from the deck */
  --shell:       #F4EBE2;
  --travertine:  #E8DACB;
  --linen:       #DCCDBC;
  --clay:        #C4A88C;

  /* Depths */
  --walnut:      #4A3728;
  --peat:        #2E241C;
  --ink:         #1C1611;

  /* Accents */
  --marble:      #5C6B54;   /* green marble */
  --marble-deep: #3F4A3A;
  --ember:       #B4713F;   /* evening light */

  /* Semantic */
  --bg:          var(--sand);
  --bg-alt:      #FDF7F1;
  --text:        var(--peat);
  --text-soft:   #6B5B4C;
  --rule:        rgba(74, 55, 40, 0.16);

  /* Type */
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --maxw: 1400px;
  --measure: 62ch;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: 0.005em;
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(2.75rem, 7vw, 6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.75rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 2.1rem); line-height: 1.2; }
p  { margin: 0 0 1.25em; max-width: var(--measure); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 1.5rem;
  display: block;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  line-height: 1.5;
  color: var(--walnut);
  max-width: 46ch;
}
.muted { color: var(--text-soft); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--compact { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.bg-alt { background: var(--bg-alt); }
.bg-deep { background: var(--peat); color: var(--shell); }
.bg-deep .eyebrow, .bg-deep .muted { color: rgba(244, 235, 226, 0.6); }
.bg-deep .lede { color: var(--shell); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.split--reverse > *:first-child { order: 2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.05em 2.2em;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: var(--walnut);
  transition: background 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.btn:hover { background: var(--walnut); border-color: var(--walnut); color: var(--sand); }
.btn--solid { background: var(--walnut); border-color: var(--walnut); color: var(--sand); }
.btn--solid:hover { background: var(--peat); border-color: var(--peat); }
.btn--light { color: var(--shell); }
.btn--light:hover { background: var(--shell); color: var(--peat); border-color: var(--shell); }

.link-underline {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.4s var(--ease);
}
.link-underline:hover { border-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: 1.4rem;
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  /* Same left offset as .hero__inner so the wordmark lines up with the
     headline beneath it, at every width. */
  max-width: none;
  padding-inline: clamp(1.25rem, 8vw, 7rem);
}
@media (max-width: 560px) {
  .site-header__inner { padding-inline: var(--gutter); }
}
.wordmark {
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.2;
}
.wordmark small {
  display: block;
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.4em;
  opacity: 0.65;
  margin-top: 0.35em;
}
.nav { display: flex; align-items: center; gap: clamp(1.2rem, 2.6vw, 2.6rem); }
.nav a {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  position: relative;
  padding-block: 0.4rem;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Transparent-over-hero state */
.site-header--over { color: var(--shell); }
.site-header--over .btn { color: var(--shell); }
.site-header--over .btn:hover { background: var(--shell); color: var(--peat); border-color: var(--shell); }
.site-header--scrolled {
  background: rgba(249, 234, 223, 0.94);
  backdrop-filter: blur(14px);
  color: var(--peat);
  padding-block: 0.9rem;
  box-shadow: 0 1px 0 var(--rule);
}
.site-header--scrolled .btn { color: var(--walnut); }
.site-header--scrolled .btn:hover { background: var(--walnut); color: var(--sand); border-color: var(--walnut); }

.nav-toggle { display: none; background: none; border: 0; color: inherit; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 1px; background: currentColor; margin: 6px 0; transition: transform 0.4s var(--ease), opacity 0.3s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--shell);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,22,17,0.75) 0%, rgba(28,22,17,0.25) 45%, rgba(28,22,17,0.35) 100%);
}
.hero__inner {
  position: relative; z-index: 2; width: 100%;
  padding-bottom: clamp(3.5rem, 8vw, 7rem);
  /* Hugs the left of the frame rather than the centred content column, but
     keeps a comfortable margin. Matches the page gutter on small screens. */
  padding-inline: clamp(1.25rem, 8vw, 7rem);
  max-width: none;
}
@media (max-width: 560px) {
  .hero__inner { padding-inline: var(--gutter); }
}
.hero h1 { max-width: 16ch; }
.hero__sub { max-width: 44ch; margin-top: 1.75rem; color: rgba(244,235,226,0.85); }
.hero__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero--short { min-height: 80svh; }
.hero--tall  { min-height: 90svh; }
.hero--short .hero__media img,
.hero--tall .hero__media img { object-position: center 55%; }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 2rem;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(244,235,226,0.7);
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 46px;
  background: linear-gradient(to bottom, rgba(244,235,226,0.7), transparent);
}

/* ---------- Figures ---------- */
figure { margin: 0; }
.fig img { width: 100%; }
.fig figcaption {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 0.9rem;
}
.ratio { position: relative; overflow: hidden; background: var(--travertine); }
.ratio > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-3-4  { padding-top: 133.33%; }
.r-4-3  { padding-top: 75%; }
.r-3-2  { padding-top: 66.66%; }
.r-16-9 { padding-top: 56.25%; }
.r-1-1  { padding-top: 100%; }

.zoom > img { transition: transform 1.2s var(--ease); }
a:hover .zoom > img, .zoom:hover > img { transform: scale(1.045); }

/* ---------- Property cards ---------- */
.property-card { display: block; color: inherit; }
.property-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.property-card h3 { margin-bottom: 0.25rem; }
.property-card p { margin-top: 1rem; font-size: 0.94rem; }

/* ---------- Facts / specs ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--rule);
  border-block: 1px solid var(--rule);
}
.facts > div { background: var(--bg); padding: 1.75rem 1.5rem; }
.bg-alt .facts > div { background: var(--bg-alt); }
.bg-deep .facts { background: rgba(244,235,226,0.18); border-color: rgba(244,235,226,0.18); }
.bg-deep .facts > div { background: var(--peat); }
.facts dt {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.6rem;
}
.facts dd { margin: 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.15; }

/* Optional breakdown beneath a headline figure */
.facts__breakdown {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0.45rem;
}
.facts__breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}
.facts__breakdown li span:last-child { white-space: nowrap; }
.bg-deep .facts__breakdown { border-top-color: rgba(244,235,226,0.2); }

.distances { list-style: none; margin: 0; padding: 0; max-width: 30rem; }
.distances li {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}
.distances li span:last-child { color: var(--text-soft); white-space: nowrap; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(0.75rem, 1.5vw, 1.5rem); }
.gallery > * { grid-column: span 6; }
.gallery > .g-wide { grid-column: span 12; }
.gallery > .g-third { grid-column: span 4; }
.gallery > .g-offset { grid-column: span 5; }
.gallery > .g-offset-lg { grid-column: span 7; }

/* ---------- Gallery page ---------- */
.gallery-nav {
  display: flex; flex-wrap: wrap;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  align-items: baseline;
}
.gallery-head {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: baseline;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}
.gallery-head .eyebrow { margin-bottom: 0.75rem; }
.gallery-head p { margin: 0; font-size: 0.85rem; letter-spacing: 0.02em; }
.bg-deep .gallery-head { border-bottom-color: rgba(244,235,226,0.2); }

.grid-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 320px), 1fr));
  gap: clamp(0.6rem, 1.2vw, 1.1rem);
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(44%, 180px), 1fr));
  gap: clamp(0.6rem, 1.2vw, 1.1rem);
  grid-auto-flow: dense;
}
.mood-grid .tall { grid-row: span 2; }

/* ---------- Availability calendar ---------- */
.avail {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.bg-deep .avail { background: rgba(244,235,226,0.05); border-color: rgba(244,235,226,0.2); }
.avail__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem;
}
.avail__title { font-family: var(--serif); font-size: 1.35rem; }
.avail__nav { display: flex; gap: 0.5rem; }
.avail__nav button {
  width: 34px; height: 34px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  display: grid; place-items: center;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.avail__nav button:hover:not(:disabled) { background: var(--walnut); color: var(--sand); border-color: var(--walnut); }
.avail__nav button:disabled { opacity: 0.3; cursor: not-allowed; }

.cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: clamp(1.25rem, 2.5vw, 2rem); }
.cal-month { max-width: 300px; margin-inline: auto; width: 100%; }
.cal-month__label {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin-bottom: 0.9rem;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-soft);
  padding-bottom: 0.5rem;
}
.cal-day {
  aspect-ratio: 1;
  max-height: 40px;
  display: grid; place-items: center;
  font-size: 0.8rem;
  border-radius: 3px;
  position: relative;
}
.cal-day--empty { visibility: hidden; }
.cal-day--free {
  background: rgba(92,107,84,0.20);
  color: var(--marble-deep);
  font-weight: 400;
}
/* Selectable days are real buttons — reset the UA styling. */
button.cal-day {
  font: inherit; font-size: 0.8rem;
  border: 0; padding: 0; margin: 0;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
button.cal-day:hover { background: rgba(92,107,84,0.42); }
button.cal-day:focus-visible {
  outline: 2px solid var(--walnut);
  outline-offset: 1px;
  position: relative; z-index: 1;
}
/* Chosen range */
.cal-day--between { background: rgba(92,107,84,0.32) !important; color: var(--marble-deep); }
.cal-day--start,
.cal-day--end {
  background: var(--marble-deep) !important;
  color: var(--sand) !important;
  font-weight: 400;
}
.cal-day--start:hover, .cal-day--end:hover { background: var(--peat) !important; }
.bg-deep .cal-day--start, .bg-deep .cal-day--end { background: #C8D6BE !important; color: var(--peat) !important; }
.bg-deep button.cal-day:hover { background: rgba(148,168,136,0.45); }

/* Selection summary bar */
.avail__selection {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  background: rgba(92,107,84,0.12);
  border-left: 2px solid var(--marble-deep);
}
.avail__selection strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.avail__selection span { font-size: 0.78rem; color: var(--text-soft); }
.bg-deep .avail__selection { background: rgba(148,168,136,0.16); border-left-color: #C8D6BE; }
.bg-deep .avail__selection span { color: rgba(244,235,226,0.7); }

.cal-key i.chosen { background: var(--marble-deep); }
[data-clear] { background: none; border: 0; color: var(--text-soft); cursor: pointer; }
.cal-day--booked { color: rgba(107,91,76,0.42); text-decoration: line-through; text-decoration-thickness: 1px; }
.cal-day--past { color: rgba(107,91,76,0.26); }
.cal-day--today { outline: 1px solid var(--walnut); outline-offset: -1px; }
.bg-deep .cal-day--free { background: rgba(148,168,136,0.22); color: #C8D6BE; }
.bg-deep .cal-day--booked, .bg-deep .cal-day--past { color: rgba(244,235,226,0.3); }

.cal-key { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.5rem; font-size: 0.72rem; color: var(--text-soft); }
.cal-key span { display: inline-flex; align-items: center; gap: 0.5rem; }
.cal-key i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.cal-key i.free { background: rgba(92,107,84,0.3); }
.cal-key i.booked { background: rgba(107,91,76,0.14); }

.avail__note { font-size: 0.74rem; color: var(--text-soft); margin-top: 1.25rem; max-width: 48ch; }
[data-availability] { transition: opacity 0.3s var(--ease); }
.avail__foot { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; }
.field { display: flex; flex-direction: column; gap: 0.55rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.63rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0;
  border-radius: 0;
  transition: border-color 0.4s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--walnut);
}
.field textarea { resize: vertical; min-height: 7rem; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-soft) 50%), linear-gradient(135deg, var(--text-soft) 50%, transparent 50%); background-position: calc(100% - 12px) 1.35em, calc(100% - 7px) 1.35em; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- Footer ---------- */
.site-footer { background: var(--peat); color: rgba(244,235,226,0.8); padding-block: clamp(3.5rem, 7vw, 6rem) 2.5rem; }
.site-footer a { color: rgba(244,235,226,0.8); }
.site-footer a:hover { color: var(--shell); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(2rem, 4vw, 4rem); }
.footer-grid h4 { font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(244,235,226,0.5); margin-bottom: 1.25rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; font-size: 0.88rem; }
.footer-bottom {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(244,235,226,0.15);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: 0.72rem; color: rgba(244,235,226,0.5);
}
.site-footer .wordmark { color: var(--shell); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split, .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .split--reverse > *:first-child { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery > *, .gallery > .g-third, .gallery > .g-offset, .gallery > .g-offset-lg { grid-column: span 6; }
  .gallery > .g-wide { grid-column: span 12; }

  .site-header { z-index: 110; }
  .site-header .wordmark { position: relative; z-index: 112; }
  .nav-toggle { display: block; position: relative; z-index: 112; }
  body.nav-open .site-header__inner { color: var(--shell); }
  .nav {
    position: fixed;
    inset: 0;
    background: var(--peat);
    color: var(--shell);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease);
    z-index: 105;
  }
  .nav a { font-size: 0.95rem; letter-spacing: 0.24em; }
  body.nav-open .nav { transform: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { color: var(--shell); background: transparent; box-shadow: none; }
}
@media (max-width: 760px) {
  .facts__breakdown li { flex-direction: column; gap: 0.15rem; }
  .facts__breakdown li span:last-child { color: var(--text); }
}
@media (max-width: 560px) {
  .facts > div { padding: 1.4rem 1.1rem; }
  .facts dd { font-size: 1.35rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery > * { grid-column: span 12 !important; }
}
