/* ==========================================================================
   Catbird Cottage — style.css
   Palette and type are set here. Change a value once and it updates sitewide.
   ========================================================================== */

:root {
  /* --- Colour ------------------------------------------------------------ */
  --bg:          #b3bbbf;   /* page background */
  --ink:         #1c1c1c;   /* body + heading colour */
  --ink-soft:    rgba(28, 28, 28, 0.78);
  --ink-quiet:   rgba(28, 28, 28, 0.70);
  --rule:        rgba(28, 28, 28, 0.30);
  --rule-faint:  rgba(28, 28, 28, 0.16);
  --wash:        rgba(28, 28, 28, 0.05);

  /* --- Type -------------------------------------------------------------- */
  /* Newsreader stands in for Freight Display Book.
     Jost stands in for P22 Underground.
     To swap either one, change the family here and the <link> in each page. */
  --display: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:    "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;

  /* --- Spacing ----------------------------------------------------------- */
  --gutter: clamp(1.15rem, 4.5vw, 4.5rem);  /* left/right page padding */
  --stack:  clamp(1.875rem, 4vw, 3.75rem);  /* space between image blocks */
  --measure: 60ch;                          /* comfortable reading width */
}

/* --------------------------------------------------------------------------
   Reset + base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Masthead + navigation  (identical markup on every page)
   -------------------------------------------------------------------------- */

.masthead {
  padding: clamp(1.5rem, 3.5vw, 2.75rem) var(--gutter) clamp(1.1rem, 2vw, 1.5rem);
  text-align: center;
}

.masthead__brand {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.4rem);
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1;
  padding-right: 0.24em; /* balances the trailing letterspace */
}

.masthead__tagline {
  margin: 0.85em 0 0;
  font-size: clamp(0.62rem, 0.58rem + 0.15vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-right: 0.3em;
}

/* --- Nav bar --- */

.nav {
  border-top: 1px solid var(--rule-faint);
  border-bottom: 1px solid var(--rule-faint);
  padding: 0 var(--gutter);
}

.nav__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 2.6vw, 2.75rem);
}

.nav__link {
  display: block;
  padding: 1.05rem 0;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav__link:hover,
.nav__link:focus-visible { color: var(--ink); }

.nav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* --- Mobile nav toggle --- */

.nav__toggle {
  display: none;
  width: 100%;
  background: none;
  border: 0;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 0;
  cursor: pointer;
}

@media (max-width: 46rem) {
  .nav__toggle { display: block; }
  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav__list.is-open {
    max-height: 26rem;
    padding-bottom: 0.9rem;
    border-top: 1px solid var(--rule-faint);
  }
  .nav__link { padding: 0.6rem 0; font-size: 0.78rem; }
}

/* --------------------------------------------------------------------------
   Page intro
   -------------------------------------------------------------------------- */

.intro {
  /* top: space below the nav (50% of original)
     bottom: gap to the first visual element below — .gallery, .portrait,
     .reviews and .prose all have zero top padding, so this one value
     controls that gap on every page (reduced by 60%) */
  padding: clamp(1.5rem, 3.5vw, 3rem) var(--gutter) clamp(1rem, 2vw, 1.6rem);
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

/* Wider intro variant. Add class="intro intro--wide" to the <section>.

   The standard .intro is a 46rem box, but its usable text width is
   46rem minus the left/right gutter, and that gutter shrinks on smaller
   screens. So a fixed max-width can't deliver a consistent 20%. Both rules
   below are written in terms of --gutter, which makes the lead exactly 20%
   wider than standard at every screen size, while the heading keeps its
   original measure and therefore its original line breaks.

   Must stay AFTER .intro — same specificity, so the later rule wins. */
.intro--wide {
  max-width: calc(55.2rem - 0.4 * var(--gutter));   /* text area x 1.2 */
}

.intro--wide h1 {
  max-width: calc(46rem - 2 * var(--gutter));       /* standard text width */
  margin-left: auto;
  margin-right: auto;
}

.intro__eyebrow {
  display: block;
  margin-bottom: 1.5em;
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  padding-right: 0.28em;
}

.intro__lead {
  margin-top: 1.75rem;
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.75;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   THE IMAGE BLOCK  —  the repeating unit of this site
   Full-bleed within the page gutters, caption hung beneath it.
   -------------------------------------------------------------------------- */

.gallery {
  padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem);
}

.frame {
  margin: 0 0 var(--stack);
}
.frame:last-child { margin-bottom: 0; }

.frame img {
  width: 100%;
  /* Portrait shots are capped so they never swallow the whole screen */
  max-height: 88vh;
  object-fit: cover;
  object-position: center;
}

.frame figcaption {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  max-width: 34rem;
  position: relative;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* the hairline that hangs above every caption */
.frame figcaption::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.75rem;
  height: 1px;
  background: var(--rule);
}

.frame figcaption b,
.frame figcaption strong {
  display: block;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

/* --- Scroll reveal --- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   Prose pages (About)
   -------------------------------------------------------------------------- */

.prose {
  padding: 0 var(--gutter) clamp(3.5rem, 7vw, 6rem);
  max-width: calc(var(--measure) + 4rem);
  margin: 0 auto;
}

.prose p {
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
  line-height: 1.8;
  margin-bottom: 1.6em;
}

.prose h2 { margin: 2.75rem 0 1.1rem; }

.prose a {
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.25s ease;
}
.prose a:hover { border-bottom-color: var(--ink); }

.portrait {
  padding: 0 var(--gutter);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.portrait img { width: 100%; max-height: 78vh; object-fit: cover; }

/* --------------------------------------------------------------------------
   Reviews  (What Guests Say)
   -------------------------------------------------------------------------- */

.reviews {
  padding: 0 var(--gutter) clamp(3.5rem, 7vw, 6rem);
  max-width: 52rem;
  margin: 0 auto;
}

.review {
  padding: clamp(2.25rem, 4.5vw, 3.5rem) 0;
  border-bottom: 1px solid var(--rule-faint);
}
.review:first-child { padding-top: 0; }
.review:last-child { border-bottom: 0; }

.review__text {
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.35rem;
}

.review__by {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Call to action
   -------------------------------------------------------------------------- */

.cta {
  /* bottom padding halved — this is the gap just above the footer */
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  border-top: 1px solid var(--rule-faint);
}

.cta p {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: var(--ink-soft);
}

.button {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1px solid var(--ink);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.button:hover,
.button:focus-visible { background: var(--ink); color: var(--bg); }

/* --------------------------------------------------------------------------
   Footer  (identical markup on every page)
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule-faint);
  /* Top padding is a flat 1.875rem (30px at the default browser text size)
     rather than a clamp — it's small enough that it doesn't need to scale
     down on phones. Paired with .cta's bottom padding, this sets the total
     gap between the last content and the footer. */
  padding: 1.875rem var(--gutter) clamp(2rem, 4vw, 3rem);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.5rem;
  max-width: 68rem;
  margin: 0 auto;
  text-align: center;
}

.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin: 0 0 1.15rem;
  padding-right: 0.28em;
}

.site-footer p { font-size: 0.94rem; margin: 0; }

.site-footer a {
  border-bottom: 1px solid var(--rule-faint);
  transition: border-color 0.25s ease;
}
.site-footer a:hover { border-bottom-color: var(--ink); }

.site-footer a.site-footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-bottom: 0;
}
.site-footer a.site-footer__social:hover { border-bottom: 0; }
.site-footer__social svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.4;
  transition: stroke 0.25s ease;
}
.site-footer__social:hover svg { stroke: var(--ink); }

/* Selector is scoped to .site-footer so it outranks the `.site-footer p`
   rule above — otherwise that rule's `margin: 0` kills the auto-centering. */
.site-footer .colophon {
  max-width: 68rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-faint);
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}

@media (max-width: 34rem) {
  .site-footer__cols { grid-template-columns: 1fr; gap: 2.25rem; }
}
