/* Heron's Nest Sanctuary: stationery system from Beverly's approved business card.
   Ground Linen Cream, ink heron black, borders Lunenburg with a Malibu Peach inner line. */

@font-face {
  font-family: "Cardo";
  src: url("fonts/Cardo-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("fonts/Cardo-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("fonts/Cardo-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --cream: #F7F3ED;
  --cream-deep: #EFE9DE;
  --ink: #231F20;
  --ink-muted: #4F4A49;
  --blue: #9BB0BC;
  --blue-ink: #3E5768;
  --peach: #FDC8B6;
  --peach-deep: #E3ADA0;
  --measure: 44rem;
  --page: 68rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Cardo", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

/* Links and focus */

a { color: var(--blue-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue-ink);
  outline-offset: 3px;
}

/* Skip link */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; color: var(--cream); }

/* Masthead */

.masthead {
  text-align: center;
  padding: 3.25rem 1.25rem 1.75rem;
}

.wordmark {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.wordmark a { color: var(--ink); text-decoration: none; }
.wordmark .tm { font-size: 0.35em; vertical-align: super; letter-spacing: 0; }

.wordmark-sub {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  letter-spacing: 0.62em;
  text-indent: 0.62em; /* recentres the tracked word */
  text-transform: uppercase;
  color: var(--ink);
}

.tagline {
  margin: 1.1rem 0 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--blue-ink);
}

/* Sticky nav row */

.site-nav {
  position: -webkit-sticky;
  position: sticky;
  overflow-anchor: none;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-top: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
}

.nav-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 3.4rem;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
}

.nav-links a {
  display: inline-block;
  padding: 0.55rem 0.1rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
}
.nav-links a:hover { color: var(--blue-ink); }
.nav-links a[aria-current="page"] {
  color: var(--blue-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
}

.nav-book { margin-left: auto; }

/* Mobile menu (details/summary works without JavaScript) */

.nav-toggle { display: none; }

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.62rem 1.5rem;
  background: var(--blue);
  color: var(--ink);
  border: 1px solid var(--blue-ink);
  border-radius: 2px;
  font-family: inherit;
  font-size: 1.02rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: #8AA2B0; color: var(--ink); }

.btn--peach { background: var(--peach); }
.btn--peach:hover { background: #F3B39D; }

.btn--small { padding: 0.4rem 1rem; font-size: 0.98rem; }

/* Page structure */

.page-main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-main--narrow { max-width: 50rem; }

.page-title {
  margin: 0 0 0.4rem;
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  text-align: center;
}

.section-title {
  margin: 3.25rem 0 1.1rem;
  font-weight: 400;
  font-style: italic;
  font-size: 1.55rem;
  text-align: center;
}
.section-title:first-child { margin-top: 0; }

.lead { font-size: 1.22rem; }

.measure { max-width: var(--measure); margin-left: auto; margin-right: auto; }

.centre, .centre p { text-align: center; }

/* Peach rule with centre dot, from the card */

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 1.4rem auto;
}
.rule::before,
.rule::after {
  content: "";
  width: 2.4rem;
  border-top: 2px solid var(--peach-deep);
}
.rule span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--peach-deep);
}

/* Double border frame, from the card */

.frame {
  border: 2px solid var(--blue);
  padding: 6px;
  background: transparent;
}
.frame-inner {
  border: 1px solid var(--peach-deep);
  padding: clamp(1rem, 3vw, 2.25rem);
}

/* Hero */

.hero { margin-top: 2.25rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  align-items: center;
}

.hero-heron {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 15rem;
}

.hero-heron .heron-stack {
  position: relative;
  height: clamp(15rem, 30vw, 22rem);
  aspect-ratio: 74.05 / 152.53;
}

.heron-draw,
.heron-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-photo { margin: 0; }

/* Hero animation states. Initial hidden states exist only when JS is on
   and the hero has opted into animating, so no-JS and reduced motion
   render the finished scene. */

/* With JS on, the photo and the filled heron start hidden from the first
   paint (no flash before the script runs) and the script reveals them in
   order: outline draws, heron fills, then the photo fades in. Reduced motion,
   a missing path or any failure adds both classes at once. */

html.js .hero:not(.is-photo-in) .hero-photo { opacity: 0; }
html.js .hero:not(.is-filled) .heron-fill { opacity: 0; }
.hero-photo { transition: opacity 1.7s ease; }
.heron-fill { transition: opacity 1s ease; }

/* The outline stroke is animation-only: hidden by default so the no-JS
   and reduced-motion states show the finished filled heron alone. */

.heron-draw { opacity: 0; }

html.js .hero.is-animating .heron-draw {
  opacity: 1;
  transition: opacity 0.9s ease;
}
html.js .hero.is-animating.is-filled .heron-draw { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html.js .hero .hero-photo,
  html.js .hero .heron-fill { opacity: 1; transition: none; }
  html.js .hero .heron-draw { opacity: 0; transition: none; }
  html { scroll-behavior: auto; }
}

.hero-actions {
  margin-top: 1.75rem;
  text-align: center;
}

/* Photos: cover crop into the slot's aspect box, biased upward so skies and rooflines stay */

.photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ar, 3 / 2);
  object-fit: cover;
  object-position: center 30%;
  border: 1px solid var(--blue);
  background: var(--cream-deep);
}
.tile .photo { transition: border-color 0.2s ease; }
.tile:hover .photo { border-color: var(--blue-ink); }

/* Photo placeholders */

.ph {
  border: 1px solid var(--blue);
  background: var(--cream-deep);
  aspect-ratio: var(--ar, 3 / 2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.1rem;
  margin: 0;
}

.ph-label {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}

.ph-note {
  display: block;
  margin-top: 0.45rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* Loose tile grid */

.tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  align-items: start;
  margin-top: 2rem;
}

.tile { display: block; text-decoration: none; color: var(--ink); }
.tile--wide { grid-column: span 3; }
.tile--third { grid-column: span 2; }
.tile--drop { margin-top: 3rem; }

.tile .ph { transition: border-color 0.2s ease; }
.tile:hover .ph { border-color: var(--blue-ink); }

.tile-caption {
  display: block;
  margin: 0.7rem 0 0.6rem;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--ink);
}

.tile-link { display: inline-block; }
.tile:hover .tile-link { background: #8AA2B0; }

/* Figures and photo grids on inner pages */

.photo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  align-items: start;
  margin: 1.75rem 0;
}
.photo-row--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

figure { margin: 0; }
figcaption {
  margin-top: 0.55rem;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-muted);
  text-align: center;
}

/* Lists */

.plain-list { padding-left: 1.2rem; }
.plain-list li { margin-bottom: 0.4rem; }

.two-col-list {
  columns: 2;
  column-gap: 2.5rem;
  padding-left: 1.2rem;
}
.two-col-list li { margin-bottom: 0.4rem; break-inside: avoid; }

/* Content placeholder (for copy still to come) */

.note-box {
  border: 1px dashed var(--blue);
  background: transparent;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  color: var(--ink-muted);
}
.note-box strong { color: var(--ink); font-weight: 700; }

/* Contact block and form */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: start;
  margin-top: 1.75rem;
}

.contact-details p { margin: 0 0 0.9rem; }
.contact-details .who { font-size: 1.2rem; }

.social-note { font-size: 0.98rem; color: var(--ink-muted); }

form .field { margin-bottom: 1.15rem; }
form label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}
form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--blue);
  border-radius: 2px;
}
form textarea { min-height: 8.5rem; resize: vertical; }

.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Footer: logo on the left, the words beside it */

.site-footer {
  border-top: 2px solid var(--blue);
  margin-top: 2rem;
  padding: 2.75rem 1.25rem 6.5rem;
}
.footer-frame {
  border-top: 1px solid var(--peach-deep);
  max-width: var(--page);
  margin: 0 auto;
  padding-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.footer-logo { height: 15rem; width: auto; flex: none; }
.footer-text { text-align: left; }
.footer-text p { margin: 0 0 0.45rem; }
.footer-tag {
  font-style: italic;
  color: var(--blue-ink);
}
.footer-reg { font-size: 0.92rem; color: var(--ink-muted); }
.footer-fine {
  margin-top: 1.1rem !important;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.footer-fine a { color: var(--ink-muted); }
.footer-fine a:hover { color: var(--ink); }

/* Mobile call bar */

.call-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  background: var(--cream);
  border-top: 1px solid var(--blue);
  padding: 0.55rem 0.75rem;
  gap: 0.6rem;
}
.call-bar .btn { flex: 1; text-align: center; padding: 0.7rem 0.5rem; min-height: 44px; }

/* Reveal on scroll: hidden states only exist with JS on */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Small screens */

@media (max-width: 52rem) {
  .nav-links { display: none; }
  .nav-book { margin-left: 0; padding: 0.6rem 1rem; min-height: 44px; display: inline-flex; align-items: center; }
  .nav-inner { justify-content: space-between; min-height: 3.2rem; }

  .nav-toggle { display: block; position: relative; }
  .nav-toggle summary {
    list-style: none;
    cursor: pointer;
    padding: 0.55rem 0.1rem;
    font-size: 1.02rem;
    color: var(--ink);
  }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-toggle summary::after { content: ""; }
  .nav-toggle[open] summary { color: var(--blue-ink); }
  .nav-toggle ul {
    position: absolute;
    left: -1.25rem;
    top: 100%;
    min-width: 13rem;
    list-style: none;
    margin: 0;
    padding: 0.4rem 1.25rem 0.9rem;
    background: var(--cream);
    border: 1px solid var(--blue);
    border-top: none;
  }
  .nav-toggle ul a {
    display: block;
    padding: 0.5rem 0;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.08rem;
  }
  .nav-toggle ul a[aria-current="page"] {
    color: var(--blue-ink);
    text-decoration: underline;
    text-underline-offset: 0.45em;
  }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-heron .heron-stack { height: clamp(13rem, 52vw, 17rem); }

  .tiles { grid-template-columns: 1fr; gap: 2.25rem; }
  .tile--wide, .tile--third { grid-column: auto; }
  .tile--drop { margin-top: 0; }

  .photo-row, .photo-row--two { grid-template-columns: 1fr; }

  .two-col-list { columns: 1; }

  .contact-grid { grid-template-columns: 1fr; }

  .call-bar { display: flex; }
  .site-footer { padding-bottom: 2.5rem; }
  .footer-frame { flex-direction: column; gap: 1.25rem; text-align: center; }
  .footer-text { text-align: center; }
  .footer-logo { height: 10rem; }
  .hero-actions { display: none; } /* the call bar carries Book on Airbnb on phones */
  body { padding-bottom: 3.6rem; }
}
