/* Hodgdon Pond Farm — hpfacadia.com
   Palette carried over from the previous site: pond blue, warm sand, cream. */

:root {
  --blue: #0b3f59;
  --blue-deep: #072a3c;
  --ink: #1d262b;
  --muted: #5b6a72;
  --sand: #e5c7a4;
  --tan: #cc914d;
  --tan-dark: #a8742f;
  --cream: #f7f2ec;
  --cream-deep: #efe6da;
  --white: #ffffff;
  --rule: #e2d8ca;
  --reserved: #c96d5c;
  --pending: #d9a441;
  --available: #5a9c73;

  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  --max: 1180px;
  --narrow: 760px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --shadow: 0 10px 30px rgba(11, 63, 89, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tan-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; color: var(--blue); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tan-dark); margin-bottom: 0.4em; font-weight: 600; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header-inner { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-wordmark { text-decoration: none; color: var(--blue); display: flex; flex-direction: column; line-height: 1.1; }
.wordmark-name { font-family: var(--serif); font-size: 1.5rem; }
.wordmark-sub { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 6px; width: 44px; height: 40px; position: relative; cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 11px; width: 20px; height: 2px; background: var(--blue); transition: transform .2s; }
.nav-toggle-bar { top: 19px; }
.nav-toggle-bar::before { top: -6px; left: 0; }
.nav-toggle-bar::after { top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.site-nav li { position: relative; }
.site-nav a, .site-nav button { display: block; padding: 8px 12px; font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--blue); text-decoration: none; background: none; border: 0; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.site-nav a:hover, .site-nav button:hover, .site-nav a[aria-current="page"] { background: var(--cream-deep); color: var(--blue-deep); }
.site-nav .has-dropdown > button::after { content: " ▾"; font-size: 0.75em; }
.site-nav .dropdown { position: absolute; top: 100%; left: 0; min-width: 170px; background: var(--white); border: 1px solid var(--rule); border-radius: 8px; box-shadow: var(--shadow); padding: 6px; flex-direction: column; display: none; z-index: 60; }
.site-nav .has-dropdown:hover .dropdown, .site-nav .has-dropdown:focus-within .dropdown, .site-nav .has-dropdown.open .dropdown { display: flex; }
.site-nav .nav-phone a { background: var(--blue); color: #fff; margin-left: 8px; }
.site-nav .nav-phone a:hover { background: var(--blue-deep); color: #fff; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow); padding: 8px var(--gutter) 16px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav .dropdown { position: static; display: flex; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .site-nav .has-dropdown > button { display: none; }
  .site-nav .nav-phone a { margin: 10px 0 0; text-align: center; }
}

/* Layout */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter); }
.section.narrow { max-width: var(--narrow); }
.section.tight { padding-top: 0; }
.section + .section { padding-top: 0; }
.section.band { max-width: none; background: var(--white); }
.section.band > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section.band.blue { background: var(--blue); color: #fff; }
.section.band.blue h2, .section.band.blue h3 { color: var(--sand); }
.section.band.blue a { color: #fff; }
.prose p, .prose li { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose .image-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 1.2em 0; }
.prose .image-row img { margin: 0; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0 0; }
.button { display: inline-block; background: var(--tan); color: #fff; font-weight: 600; text-decoration: none; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--tan); transition: background .15s, border-color .15s; font-size: 1rem; cursor: pointer; font-family: inherit; line-height: 1.2; }
.button:hover { background: var(--tan-dark); border-color: var(--tan-dark); color: #fff; }
.button-secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.button-secondary:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.band.blue .button-secondary { color: #fff; border-color: var(--sand); }
.band.blue .button-secondary:hover { background: var(--sand); color: var(--blue); }

/* Home hero */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; place-items: center; overflow: hidden; background: var(--blue-deep); color: #fff; text-align: center; }
.hero-slides { position: absolute; inset: 0; }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero-slides img.is-active { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,42,60,0.25) 0%, rgba(7,42,60,0.55) 100%); }
.hero-text { position: relative; z-index: 1; padding: 80px var(--gutter); max-width: 760px; }
.hero-text .eyebrow { color: var(--sand); }
.hero-text h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 0.3em; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.hero-text p { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 34em; margin: 0 auto 1.4em; text-shadow: 0 1px 12px rgba(0,0,0,0.4); }
.hero-text .cta-row { justify-content: center; }
.hero .button-secondary { color: #fff; border-color: #fff; }
.hero .button-secondary:hover { background: #fff; color: var(--blue); }

/* Page hero (inner pages) */
.page-hero { position: relative; min-height: 320px; max-height: 480px; height: 44vh; background: var(--blue-deep); overflow: hidden; }
.page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.page-hero-text { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) 32px; color: #fff; }
.page-hero-text .eyebrow { color: var(--sand); }
.page-hero-text h1 { color: #fff; margin: 0; text-shadow: 0 2px 20px rgba(0,0,0,0.45); }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,42,60,0.05) 30%, rgba(7,42,60,0.6) 100%); }
.page-title { max-width: var(--max); margin: 0 auto; padding: clamp(32px, 6vw, 64px) var(--gutter) 0; }
.page-title h1 { margin-bottom: 0.2em; }

/* Facts band */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; text-align: center; }
.facts .value { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--sand); line-height: 1; }
.facts .label { color: rgba(255,255,255,0.85); font-size: 0.95rem; margin-top: 6px; }

/* Cottage cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-body p { margin: 0; color: var(--muted); }
.card-body .button { align-self: flex-start; margin-top: 10px; }

/* Fact list (cottage pages) */
.fact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 2em 0 0; padding: 0; }
.fact-list div { background: var(--white); border-radius: 8px; padding: 14px 16px; border: 1px solid var(--rule); }
.fact-list dt { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.fact-list dd { margin: 4px 0 0; font-weight: 600; color: var(--blue); }

/* Photo grids */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.photo-grid a { display: block; border-radius: 8px; overflow: hidden; background: var(--cream-deep); }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s ease; }
.photo-grid a:hover img, .photo-grid a:focus-visible img { transform: scale(1.03); }
.photo-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px var(--gutter) 16px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.photo-strip a { flex: 0 0 auto; width: min(70vw, 320px); scroll-snap-align: start; border-radius: 8px; overflow: hidden; }
.photo-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lightbox::backdrop { background: rgba(7, 42, 60, 0.92); }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 40px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox figcaption { color: #fff; margin-top: 12px; font-size: 0.95rem; min-height: 1.4em; opacity: 0.9; }
.lightbox button { position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,0.28); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox figure { padding: 56px 10px 70px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 12px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

/* Testimonials */
.testimonial-grid { columns: 3 290px; column-gap: 22px; }
.testimonial-grid .testimonial { break-inside: avoid; margin-bottom: 22px; }
.testimonial { margin: 0; background: var(--white); border-left: 4px solid var(--sand); border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 24px; box-shadow: var(--shadow); }
.testimonial-title { font-family: var(--serif); font-size: 1.25rem; color: var(--blue); margin-bottom: 0.5em; }
.testimonial p:not(.testimonial-title) { font-size: 1rem; }
.testimonial footer { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.testimonial cite { font-style: normal; font-weight: 600; color: var(--ink); }
.testimonial-from::before { content: " · "; }

/* Tables (rates and availability) */
.table-wrap { overflow-x: auto; margin: 1em 0 2em; }
table.rates, table.availability { border-collapse: collapse; width: 100%; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rates caption, .availability caption { text-align: left; font-family: var(--serif); font-size: 1.4rem; color: var(--blue); padding: 0 0 10px; caption-side: top; }
.rates th, .rates td, .availability th, .availability td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--rule); }
.rates th, .availability th { background: var(--blue); color: #fff; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em; }
.rates td.num, .rates th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rates tr:last-child td, .availability tr:last-child td { border-bottom: 0; }
.rates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; margin: 1.5em 0; }
.availability { max-width: 560px; }
.availability tbody th { background: transparent; color: var(--ink); font-weight: 600; font-size: 1rem; letter-spacing: 0; }
.availability td.cell { text-align: center; font-weight: 600; width: 32%; }
.availability td.cell span { display: inline-block; min-width: 7.5em; padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; }
.availability .is-reserved span { background: #f6ddd8; color: #8c3b2d; }
.availability .is-pending span { background: #f9ecc9; color: #7a5a0f; }
.availability .is-available span { background: #dcefe3; color: #2d6a46; }
.legend { display: flex; flex-wrap: wrap; gap: 14px 22px; list-style: none; padding: 0; margin: 0 0 1em; font-size: 0.95rem; }
.legend span { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; }
.legend .is-reserved span { background: var(--reserved); }
.legend .is-pending span { background: var(--pending); }
.legend .is-available span { background: var(--available); }
.notes { background: var(--white); border-radius: var(--radius); padding: 20px 24px 8px; border: 1px solid var(--rule); }
.notes ul { margin: 0; }
.notes li { margin-bottom: 0.6em; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.1fr 0.9fr; } }
.form { display: flex; flex-direction: column; gap: 16px; }
.form > p { margin: 0; }
.form label { display: block; font-weight: 600; margin-bottom: 4px; }
.form input, .form textarea { width: 100%; font: inherit; padding: 11px 13px; border: 1px solid #c9bfb1; border-radius: 8px; background: var(--white); color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form textarea { min-height: 160px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form .two { grid-template-columns: 1fr; } }
.form .hp { position: absolute; left: -9999px; top: 0; height: 0; overflow: hidden; }
.form .req { color: var(--reserved); }
.contact-aside { background: var(--white); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); align-self: start; }
.contact-aside h2 { font-size: 1.4rem; }
.contact-aside .big { font-size: 1.35rem; font-weight: 600; }
.map { border-radius: var(--radius); margin-top: 20px; }
.notice { background: #dcefe3; color: #2d6a46; border-radius: var(--radius); padding: 16px 20px; }

/* Footer */
.site-footer { background: var(--blue-deep); color: rgba(255,255,255,0.85); margin-top: 40px; }
.site-footer a { color: #fff; }
.site-footer-inner { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.footer-name { font-family: var(--serif); font-size: 1.5rem; color: #fff; margin-bottom: 0.3em; }
.footer-heading { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); font-weight: 600; margin-bottom: 0.8em; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 28px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slides img { transition: none; }
  .photo-grid img { transition: none; }
}
