/* ==========================================================================
   Autumn House: the whole site's styles.

   1. Brand settings (colours and fonts): change these to restyle the site,
      e.g. when making Winter's Nook or Spring Hideaway.
   2. Building blocks used everywhere (type, buttons, bands, torn edges).
   3. Header and footer.
   4. Sections used on several pages.
   5. Page-specific parts.
   ========================================================================== */

/* ---------- 1. Brand settings ---------- */
:root {
  --primary: #EBE4D4;        /* main backgrounds */
  --primary-light: #D4D7CE;  /* calm sections and boxes */
  --secondary: #2B1800;      /* text, lines, footer */
  --tertiary: #BE7E5B;       /* buttons, highlights, quote marks */
  --shade: #96988B;          /* call-outs and boxes */
  --paper: #F7F3EA;          /* the pale core along a torn edge; form fields */
  --knockout: var(--primary);/* logo areas that were white in Affinity */
  --line: rgba(43, 24, 0, .28);

  --serif: "Baskervville", "Baskerville", "Libre Baskerville", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --hand: "Oooh Baby", "Segoe Script", cursive;

  --page-width: 1180px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --band-space: clamp(3.75rem, 8vw, 7rem);   /* space above and below each band */
  color-scheme: light;
}

@font-face { font-family: "Baskervville"; src: url("/fonts/baskervville.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Baskervville"; src: url("/fonts/baskervville-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans.woff2") format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Oooh Baby"; src: url("/fonts/oooh-baby.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- 2. Building blocks ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--primary); color: var(--secondary); font: 400 1.125rem/1.6 var(--serif); overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.wrap { max-width: var(--page-width); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.narrow { max-width: 46rem; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
p { margin: 0; }
.stack { display: grid; gap: 1.15rem; align-content: start; }
.stack > p { max-width: 62ch; }
.stack > .centre-text { max-width: none; }
.centre { text-align: center; justify-items: center; }
.centre p { margin-inline: auto; }
.label { font: 500 .75rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.hand { font-family: var(--hand); font-weight: 400; line-height: 1.1; font-size: 2rem; }
.lead { font-size: 1.25rem; }

.skip-link { position: absolute; left: -9999px; top: .5rem; background: var(--secondary); color: var(--primary); padding: .6rem 1rem; z-index: 50; }
.skip-link:focus { left: var(--gutter); }
:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 3px; }

/* Photos: fill their box without stretching */
.photo { display: block; width: 100%; height: auto; object-fit: cover; background: var(--shade); }

/* Buttons: square corners, double border (a border plus an outline 3px outside it) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 500 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--secondary); background: transparent; cursor: pointer;
  padding: 1rem 1.6rem; margin: 4px; border: 1px solid currentColor; border-radius: 0;
  outline: 1px solid currentColor; outline-offset: 3px;
  transition: background-color .2s, color .2s, outline-color .2s, border-color .2s;
}
.btn:hover { background: var(--secondary); color: var(--primary); outline-color: var(--secondary); border-color: var(--secondary); }
.btn:focus-visible { outline: 2px solid var(--tertiary); outline-offset: 4px; }
.btn--fill { background: var(--tertiary); border-color: var(--tertiary); outline-color: var(--tertiary); }
.btn--light { color: var(--primary); }
.btn--light:hover { background: var(--primary); color: var(--secondary); outline-color: var(--primary); border-color: var(--primary); }
.btn--paper { background: var(--paper); border-color: var(--paper); outline-color: var(--paper); }
.btn--small { padding: .8rem 1.2rem; }
.btns { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.centre .btns { justify-content: center; }
.centre-text { text-align: center; }

/* Bands: full-width colour sections. Set the colour with style="--band: var(--shade)". */
.band { position: relative; background: var(--band, var(--primary)); padding-block: var(--band-space); }
.band--tight { padding-block: calc(var(--band-space) * .6); }

/* Torn edges: a band with .torn gets a ragged top edge that overlaps the band above.
   ::before is the pale paper core; ::after is the band's own colour, cut a little lower. */
.torn::before, .torn::after {
  content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1;
  -webkit-mask: var(--edge) 0 0 / 1200px 100% repeat-x; mask: var(--edge) 0 0 / 1200px 100% repeat-x;
}
.torn::before { top: -30px; height: 31px; background: var(--paper); --edge: url("/images/edges/torn-paper.svg"); }
.torn::after  { top: -24px; height: 25px; background: var(--band, var(--primary)); --edge: url("/images/edges/torn-edge.svg"); }
.torn--flip::before, .torn--flip::after { transform: scaleX(-1); }

/* Over a photo, the tear cuts into the photo itself: the band is masked to the
   paper's edge and pulled up 30px, with a strip of paper along its top. */
.torn-photo {
  margin-top: -30px; padding-top: calc(var(--band-space) + 30px); background: var(--secondary); overflow: hidden;
  -webkit-mask: url("/images/edges/torn-paper.svg") 0 0 / 1200px 31px repeat-x, linear-gradient(#000 0 0) 0 30px / 100% calc(100% - 30px) no-repeat;
          mask: url("/images/edges/torn-paper.svg") 0 0 / 1200px 31px repeat-x, linear-gradient(#000 0 0) 0 30px / 100% calc(100% - 30px) no-repeat;
}
.torn-photo::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 31px; z-index: 2; background: var(--paper);
  -webkit-mask: url("/images/edges/torn-edge-over-photo.svg") 0 0 / 1200px 100% repeat-x;
          mask: url("/images/edges/torn-edge-over-photo.svg") 0 0 / 1200px 100% repeat-x;
}
.torn-photo + .band.torn::before, .torn-photo + .site-footer::before { display: none; }

/* A photo behind a band's content (hero, quote, review). */
.band-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-photo + .shade-over, .shade-over { position: absolute; inset: 0; background: rgba(43, 24, 0, .38); }

/* Torn photo card: a print with ragged edges and a soft shadow */
.card-torn { filter: drop-shadow(0 10px 14px rgba(43, 24, 0, .22)); }
.card-torn > div { background: var(--paper); padding: 14px 14px 46px; clip-path: polygon(0.00% 0.45%, 2.17% 0.21%, 4.35% 0.91%, 6.52% 0.10%, 8.70% 0.75%, 10.87% 0.51%, 13.04% 0.08%, 15.22% 0.71%, 17.39% 0.05%, 19.57% 0.61%, 21.74% 0.10%, 23.91% 0.13%, 26.09% 0.59%, 28.26% 1.16%, 30.43% 0.17%, 32.61% 0.31%, 34.78% 0.88%, 36.96% 1.33%, 39.13% 0.81%, 41.30% 0.56%, 43.48% 1.37%, 45.65% 0.07%, 47.83% 1.20%, 50.00% 0.41%, 52.17% 0.20%, 54.35% 0.16%, 56.52% 0.43%, 58.70% 1.14%, 60.87% 0.25%, 63.04% 0.81%, 65.22% 0.89%, 67.39% 0.52%, 69.57% 0.77%, 71.74% 0.09%, 73.91% 0.08%, 76.09% 0.29%, 78.26% 0.95%, 80.43% 0.60%, 82.61% 0.44%, 84.78% 0.82%, 86.96% 0.63%, 89.13% 0.42%, 91.30% 1.11%, 93.48% 0.98%, 95.65% 0.34%, 97.83% 0.80%, 99.49% 0.00%, 99.14% 2.17%, 99.29% 4.35%, 99.72% 6.52%, 99.04% 8.70%, 99.88% 10.87%, 99.59% 13.04%, 99.26% 15.22%, 99.85% 17.39%, 99.52% 19.57%, 99.96% 21.74%, 99.35% 23.91%, 99.25% 26.09%, 99.44% 28.26%, 99.14% 30.43%, 99.69% 32.61%, 99.32% 34.78%, 99.42% 36.96%, 99.43% 39.13%, 99.55% 41.30%, 99.18% 43.48%, 99.07% 45.65%, 99.54% 47.83%, 99.35% 50.00%, 99.94% 52.17%, 99.31% 54.35%, 99.37% 56.52%, 99.03% 58.70%, 99.19% 60.87%, 99.72% 63.04%, 99.62% 65.22%, 99.34% 67.39%, 99.98% 69.57%, 99.55% 71.74%, 99.84% 73.91%, 99.89% 76.09%, 99.94% 78.26%, 99.25% 80.43%, 99.87% 82.61%, 99.76% 84.78%, 99.62% 86.96%, 99.15% 89.13%, 99.92% 91.30%, 99.56% 93.48%, 99.46% 95.65%, 99.13% 97.83%, 100.00% 98.85%, 97.83% 98.79%, 95.65% 99.61%, 93.48% 99.42%, 91.30% 99.50%, 89.13% 98.76%, 86.96% 98.66%, 84.78% 99.79%, 82.61% 99.75%, 80.43% 99.68%, 78.26% 99.67%, 76.09% 99.32%, 73.91% 99.18%, 71.74% 99.63%, 69.57% 99.99%, 67.39% 99.41%, 65.22% 99.48%, 63.04% 99.21%, 60.87% 98.67%, 58.70% 99.03%, 56.52% 99.28%, 54.35% 99.14%, 52.17% 99.05%, 50.00% 99.92%, 47.83% 98.74%, 45.65% 98.91%, 43.48% 98.78%, 41.30% 98.88%, 39.13% 99.45%, 36.96% 99.44%, 34.78% 99.86%, 32.61% 99.11%, 30.43% 99.91%, 28.26% 99.91%, 26.09% 99.71%, 23.91% 99.77%, 21.74% 99.52%, 19.57% 99.93%, 17.39% 100.00%, 15.22% 99.79%, 13.04% 99.86%, 10.87% 99.49%, 8.70% 99.96%, 6.52% 98.78%, 4.35% 99.14%, 2.17% 99.79%, 0.25% 100.00%, 0.34% 97.83%, 0.36% 95.65%, 0.12% 93.48%, 0.83% 91.30%, 0.97% 89.13%, 0.46% 86.96%, 0.47% 84.78%, 0.08% 82.61%, 0.10% 80.43%, 0.34% 78.26%, 0.26% 76.09%, 0.81% 73.91%, 0.16% 71.74%, 0.02% 69.57%, 0.93% 67.39%, 0.52% 65.22%, 0.14% 63.04%, 0.53% 60.87%, 0.03% 58.70%, 0.52% 56.52%, 0.96% 54.35%, 0.85% 52.17%, 0.68% 50.00%, 0.26% 47.83%, 0.36% 45.65%, 0.16% 43.48%, 0.76% 41.30%, 0.52% 39.13%, 0.76% 36.96%, 0.32% 34.78%, 0.22% 32.61%, 0.80% 30.43%, 0.97% 28.26%, 0.84% 26.09%, 0.79% 23.91%, 0.80% 21.74%, 0.73% 19.57%, 0.22% 17.39%, 0.51% 15.22%, 0.35% 13.04%, 0.03% 10.87%, 0.03% 8.70%, 0.27% 6.52%, 0.25% 4.35%, 0.68% 2.17%); }
.card-torn .hand { display: block; text-align: center; font-size: 1.5rem; margin-top: .55rem; }
.tilt-l { transform: rotate(-2.2deg); }
.tilt-r { transform: rotate(1.6deg); }

/* Hand-drawn illustrations: coloured by the text colour around them */
.illustration { width: auto; height: 3.4rem; max-width: 6rem; fill: currentColor; }

/* ---------- 3. Header and footer ---------- */
.announcement { background: var(--secondary); color: var(--primary); font: 400 .82rem/1.4 var(--sans); letter-spacing: .05em; position: relative; z-index: 6; }
.announcement .wrap { position: relative; padding-block: .6rem; padding-right: calc(var(--gutter-r) + 2.2rem); text-align: center; }
.announcement-close { position: absolute; right: var(--gutter-r); top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: .3rem .4rem; }

.site-header { position: relative; z-index: 5; color: var(--secondary); }
.over-photo .site-header { position: absolute; left: 0; right: 0; color: var(--primary); --knockout: transparent; }
.site-header .btn { color: inherit; }
.site-header .btn:hover { background: var(--secondary); color: var(--primary); }
.over-photo .site-header .btn:hover { background: var(--primary); color: var(--secondary); outline-color: var(--primary); border-color: var(--primary); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.3rem; }
.site-logo { display: block; line-height: 0; }
.logo { width: clamp(150px, 18vw, 205px); height: auto; fill: currentColor; }
.menu ul { display: flex; gap: clamp(.9rem, 2vw, 1.9rem); list-style: none; margin: 0; padding: 0; font-size: 1.02rem; }
.menu a, .menu-panel a { text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 2px; }
.menu a:hover, .menu a[aria-current], .menu-panel a[aria-current] { border-bottom-color: currentColor; }
.menu-toggle { display: none; position: relative; }
.menu-toggle summary { list-style: none; }
.menu-toggle summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 4px; top: calc(100% + .7rem); z-index: 10; min-width: 13rem; background: var(--primary); color: var(--secondary);
  padding: 1.3rem 1.7rem; border: 1px solid var(--secondary); outline: 1px solid var(--secondary); outline-offset: 3px; }
.menu-panel ul { display: grid; gap: .95rem; list-style: none; margin: 0; padding: 0; font-size: 1.1rem; }
@media (max-width: 960px) {
  .menu, .header-book { display: none; }
  .menu-toggle { display: block; }
}

.site-footer { color: var(--primary); --knockout: var(--secondary); }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2.5rem; align-items: start; text-align: center; }
.footer-grid .label { color: var(--primary-light); margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current] { text-decoration: underline; }
.footer-centre { display: grid; gap: 1.2rem; justify-items: center; max-width: 22rem; }
.footer-centre p { font-size: 1rem; }
.monogram { width: 92px; height: auto; fill: currentColor; }
.footer-mark { line-height: 0; }
.footer-base { margin-top: 3.2rem; padding-top: 1.4rem; border-top: 1px solid rgba(235, 228, 212, .3); font: 400 .8rem var(--sans); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } .footer-centre { order: -1; margin-inline: auto; } }

/* Instagram row: six photos with the handle on top */
.instagram { padding-block: calc(var(--band-space) * .7); }
.instagram-row { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.instagram-handle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-transform: none; letter-spacing: .06em; margin: 0; }
@media (max-width: 760px) { .instagram-row { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 4. Sections used on several pages ---------- */

/* Hero: a full-width photo at the top of the page, with the header over it */
.hero { position: relative; color: var(--primary); background: var(--secondary); min-height: min(88vh, 54rem); display: grid; align-items: end; }
.hero > .wrap { position: relative; z-index: 1; width: 100%; padding-top: 9rem; padding-bottom: clamp(5rem, 10vw, 8rem); }
.hero h1 { max-width: 14ch; }
.hero .hand { color: var(--primary-light); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.hero p { max-width: 46ch; font-size: 1.15rem; }
.hero--short { min-height: min(62vh, 36rem); }
.hero--centre { text-align: center; }
.hero--centre h1, .hero--centre p { margin-inline: auto; }
.hero--centre h1 { max-width: 20ch; }
.hero--centre .btns { justify-content: center; }

/* Page title for pages without a hero photo */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }

/* Two columns: text beside a photo. Add .split--flip to put the photo first. */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.split--flip > :first-child { order: 2; }
.split--form { grid-template-columns: .85fr 1.15fr; align-items: start; }
.split .media { position: relative; }
.stamp { position: absolute; width: 130px; right: -18px; bottom: -36px; fill: var(--tertiary); transform: rotate(-8deg); }
@media (max-width: 800px) {
  .split, .split--form { grid-template-columns: 1fr; }
  .split--flip > :first-child { order: 0; }
  .stamp { width: 100px; right: -4px; }
}

/* A photo filling the height of its half of a .split */
.split > .photo { height: 100%; min-height: 24rem; }

/* Three features with handwritten titles and illustrations */
.features { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.features > div { padding: .5rem clamp(1rem, 3vw, 2.4rem); display: grid; gap: .8rem; justify-items: center; align-content: start; }
.features > div + div { border-left: 1px solid var(--line); }
.features .hand { font-size: 2.15rem; }
.features p { font-size: 1rem; max-width: 30ch; }
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; gap: 2.2rem; }
  .features > div + div { border-left: 0; border-top: 1px solid var(--line); padding-top: 2.2rem; }
}

/* Cards: photo, title, short text and a button */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.card { background: var(--paper); display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); }
.card-body { display: grid; gap: .9rem; justify-items: center; text-align: center; align-content: start; padding: 1.8rem 1.6rem 2rem; }
.card-body p { font-size: 1rem; }
.card-body .btn { margin-top: .4rem; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; } }

/* A statement over a photo, with a button */
.statement { color: var(--primary); }
.statement > .wrap { position: relative; z-index: 3; display: grid; gap: 1.6rem; align-content: end; min-height: 26rem; }
.statement h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 16ch; }

/* A photo that overlaps the band above it, with text beside it */
.overlap { display: grid; grid-template-columns: .8fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.overlap .card-torn { margin-top: calc(var(--band-space) * -1.9); }
@media (max-width: 800px) { .overlap { grid-template-columns: 1fr; } .overlap .card-torn { margin-top: calc(var(--band-space) * -1.4); max-width: 26rem; } }

/* Numbered slider (scrolls sideways; arrows added by js/site.js) */
.slider { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(16rem, calc((100% - 4rem) / 3.3)); gap: 2rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; scrollbar-color: var(--shade) transparent; }
.slide { scroll-snap-align: start; display: grid; gap: .9rem; align-content: start; }
.slide + .slide { border-left: 1px solid var(--line); padding-left: 2rem; margin-left: -1rem; }
.slide-number { font: 400 2.2rem/1 var(--serif); }
.slide p { font-size: 1rem; }
.slider-arrows { display: flex; justify-content: center; gap: 1rem; margin-top: 1.4rem; }
.slider-arrows button { font: 400 1.4rem/1 var(--sans); }
.slider-arrows button { background: none; border: 1px solid var(--secondary); outline: 1px solid var(--secondary); outline-offset: 3px; width: 3rem; height: 3rem; margin: 4px; cursor: pointer; color: var(--secondary); }
.slider-arrows button:hover { background: var(--secondary); color: var(--primary); }

/* Guest review over a photo: serif with italic highlights and big quote marks */
.review { color: var(--primary); }
.review-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.review .wrap { position: relative; z-index: 3; }
.review-card { margin: 0 0 0 auto; max-width: 31rem; display: grid; gap: 1.4rem; text-align: right; }
.review-card blockquote { margin: 0; position: relative; font: 400 clamp(1.7rem, 3.4vw, 2.5rem)/1.3 var(--serif); }
.review-card blockquote::before, .review-card blockquote::after { font: 400 clamp(4.5rem, 9vw, 6.5rem)/1 var(--serif); color: var(--tertiary); position: absolute; }
.review-card blockquote::before { content: "\201C"; left: -.15em; top: -.2em; transform: translateX(-100%); }
.review-card blockquote::after { content: "\201D"; right: -.55em; bottom: -.75em; }
.review-card figcaption { font: 400 1.3rem var(--serif); padding-right: .5rem; }
@media (max-width: 760px) {
  .review-card blockquote { padding-left: 2.6rem; padding-right: 1.4rem; }
  .review-card blockquote::before { left: 0; transform: none; }
  .review-card blockquote::after { right: -.15em; bottom: -.85em; }
}

/* "Ready to stay?" call-out */
.callout-inner { display: grid; gap: 1.4rem; justify-items: center; text-align: center; }
.callout-inner h2 { max-width: 24ch; }
.callout-inner .btns { justify-content: center; }

/* Questions that open and close (FAQs) */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1.2rem; padding: 1.05rem 0; font-size: 1.05rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 300 1.4rem/1 var(--sans); flex: none; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-answer { padding-bottom: 1.2rem; font-size: 1rem; display: grid; gap: .8rem; max-width: 60ch; }
.faq-answer p { margin: 0; }

/* Running text (Terms, Guide post text) */
.prose { display: grid; gap: 1.1rem; }
.prose h2 { margin-top: 1.4rem; }
.prose h3 { margin-top: .8rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .4rem; }
.prose p, .prose li { max-width: 66ch; }

/* ---------- 5. Page-specific parts ---------- */

/* FAQs page: title on the left, questions on the right */
.faq-page { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.faq-page-intro { position: sticky; top: 2rem; }
.faq-group + .faq-group { margin-top: 3rem; }
.faq-group .label { margin-bottom: 1rem; }
@media (max-width: 860px) { .faq-page { grid-template-columns: 1fr; } .faq-page-intro { position: static; } }

/* The House: photo grid of mixed heights */
.gallery { columns: 3 10rem; column-gap: 1.25rem; }
@media (max-width: 520px) { .gallery { column-gap: .75rem; } .gallery .photo { margin-bottom: .75rem; } }
.gallery .photo { margin-bottom: 1.25rem; break-inside: avoid; }

/* Enquire form */
.form { display: grid; gap: 1.3rem; }
.field { display: grid; gap: .45rem; font: 400 .9rem var(--sans); }
.field .optional { opacity: .7; font-size: .8rem; }
.field input, .field select, .field textarea {
  font: 400 1rem var(--sans); color: var(--secondary); background: var(--paper);
  border: 1px solid var(--secondary); outline: 1px solid var(--secondary); outline-offset: 3px; border-radius: 0;
  padding: .85rem .95rem; margin: 4px; width: calc(100% - 8px);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--tertiary); }
.field textarea { min-height: 9rem; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.field-error { color: #8A3A1C; font-size: .85rem; }
.field input[aria-invalid], .field textarea[aria-invalid] { border-color: #8A3A1C; outline-color: #8A3A1C; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* a trap for spam robots */
.form-message { padding: 1.1rem 1.3rem; border: 1px solid var(--secondary); outline: 1px solid var(--secondary); outline-offset: 3px; margin: 4px; background: var(--paper); }
.form-message--error { border-color: var(--tertiary); outline-color: var(--tertiary); }
.helpful-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* The Guide: category buttons, then a grid of post cards */
.guide-categories { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.guide-categories [aria-current] { background: var(--secondary); color: var(--primary); outline-color: var(--secondary); }
.post-head .label a { text-decoration: none; }
.post-head .label a:hover { text-decoration: underline; }

/* The Guide: grid of post cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem clamp(1.2rem, 3vw, 2.2rem); }
.post-card { display: grid; gap: .9rem; text-align: center; text-decoration: none; }
.post-card h3 { font-size: 1.3rem; }
.post-card:hover h3 { text-decoration: underline; }
.post-card .photo { aspect-ratio: 1; }
@media (max-width: 860px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .post-grid { grid-template-columns: 1fr; } }

/* Guide post */
.post-head { text-align: center; display: grid; gap: 1.2rem; justify-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.post-head h1 { max-width: 20ch; }
.post-intro { max-width: 46rem; margin-inline: auto; text-align: center; display: grid; gap: 1rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.post-body { max-width: 58rem; margin-inline: auto; }
.post-section { padding-block: 2.8rem; border-bottom: 1px solid var(--line); display: grid; gap: 2rem; }
.post-section-main { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4rem); align-items: center; }
.post-section--flip .post-photo { order: 2; }
.post-section--text .post-section-main { grid-template-columns: 1fr; text-align: center; max-width: 42rem; margin-inline: auto; }
.post-section--text .prose p { margin-inline: auto; }
.post-photo { aspect-ratio: 4 / 5; }
.post-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.post-gallery .photo { aspect-ratio: 3 / 4; }
.post-back { padding-block: 2.5rem calc(var(--band-space) * .8); text-align: center; }
@media (max-width: 760px) {
  .post-section-main { grid-template-columns: 1fr; }
  .post-section--flip .post-photo { order: 0; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
