/* 26 Schoolhouse — public site design system (B2.1).
   Direction: "airy coastal modern" — white space, large full-width
   photography, restrained type (WEBSITE_BRIEF Decisions).
   No webfonts: the perf budget (mobile LCP < 2.5s) and the future CSP both
   prefer zero font payload. Display serif rides ui-serif (New York on Apple,
   where most guests browse); body is the system sans stack.
   Every text/background pair here is WCAG 2.1 AA checked (≥4.5:1 normal,
   ≥3:1 large); keep it that way when adding colors. */

/* ---------------------------------------------------------------- tokens */
:root {
    /* palette */
    --paper: #FCFBF8;        /* warm off-white page ground */
    --sand: #F3EDE2;         /* band background */
    --ink: #1C2B33;          /* headings; 13.5:1 on paper */
    --slate: #3D4E58;        /* body text; 8:1 on paper */
    --muted: #5B6B73;        /* secondary text; 5.2:1 on paper */
    --sea: #0E606B;          /* links, accents; 6:1 on paper */
    --sea-deep: #0A4952;     /* link hover, button hover */
    --dusk: #A14C26;         /* sunset accent; 5.5:1 on paper */
    --line: #E2DCD0;         /* hairline borders */
    --ink-bg: #14232B;       /* dark band ground */
    --paper-on-ink: #F5F3EE; /* text on dark; 12.9:1 on ink-bg */

    /* type */
    --font-display: ui-serif, 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    --step-0: 1rem;
    --step-1: clamp(1.125rem, 0.4vw + 1rem, 1.25rem);
    --step-2: clamp(1.35rem, 1vw + 1rem, 1.6rem);
    --step-3: clamp(1.7rem, 2vw + 1rem, 2.2rem);
    --step-4: clamp(2.1rem, 3vw + 1rem, 2.9rem);
    --step-5: clamp(2.6rem, 5vw + 1rem, 4.1rem);

    /* rhythm */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2.5rem;
    --space-5: 4rem;
    --section: clamp(4rem, 9vw, 7rem);
    --container: 72rem;
    --measure: 65ch;
    --radius: 4px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--step-1);
    line-height: 1.65;
    color: var(--slate);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 var(--space-3);
    letter-spacing: -0.01em;
    text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }

p { margin: 0 0 var(--space-3); max-width: var(--measure); }
ul, ol { max-width: var(--measure); }

a {
    color: var(--sea);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}
a:hover { color: var(--sea-deep); }

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

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: var(--space-5) 0;
}

/* Keyboard focus must survive every background in the system, including
   photographs: a sea ring with a paper halo reads on light, dark and image. */
:focus-visible {
    outline: 3px solid var(--sea);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(252, 251, 248, 0.85);
    border-radius: 2px;
}
.on-dark :focus-visible, .hero :focus-visible {
    outline-color: var(--paper-on-ink);
    box-shadow: 0 0 0 5px rgba(20, 35, 43, 0.6);
}

/* --------------------------------------------------------------- helpers */
.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--sea);
    margin: 0 0 var(--space-2);
}
.on-dark .eyebrow { color: var(--paper-on-ink); opacity: 0.85; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-2);
    z-index: 100;
    background: var(--ink);
    color: var(--paper-on-ink);
    padding: var(--space-1) var(--space-2);
    border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { top: 0; color: var(--paper-on-ink); }

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    padding: 0.8em 1.6em;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--sea);
    color: #fff;                     /* 6:1 on --sea */
    transition: background-color 0.15s ease;
}
.btn:hover { background: var(--sea-deep); color: #fff; }
.btn--ghost {
    background: transparent;
    color: var(--sea);
    border-color: var(--sea);
}
.btn--ghost:hover { background: var(--sea); color: #fff; }
.on-dark .btn--ghost {
    color: var(--paper-on-ink);
    border-color: var(--paper-on-ink);
}
.on-dark .btn--ghost:hover { background: var(--paper-on-ink); color: var(--ink); }

/* ------------------------------------------------------------------ logo */
/* The egret mark: bird only, paired with the typeset name (owner decision
   2026-08-01 — the letterhead's hand-lettered text stays off the web).
   Traced from the manage app's letterhead PNG; renders via CSS mask so it
   takes currentColor — ink in the header, paper in the footer — from one
   cached SVG. Hidden where mask isn't supported rather than showing a
   solid rectangle. */
.egret-mark {
    display: none;
    background: currentColor;
    flex: none;
    aspect-ratio: 687 / 1077;
    -webkit-mask: url("egret-bird.615a5b008136.svg") no-repeat center / contain;
    mask: url("egret-bird.615a5b008136.svg") no-repeat center / contain;
}
@supports (mask-image: url('')) or (-webkit-mask-image: url('')) {
    .egret-mark { display: inline-block; }
}

/* ---------------------------------------------------------------- header */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    padding-block: var(--space-3);
    flex-wrap: wrap;
}
.site-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: var(--step-2);
    color: var(--ink);
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.site-header__brand:hover { color: var(--sea-deep); }
.site-header__tagline {
    display: block;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.15rem;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    margin: 0;
    padding: 0;
    max-width: none;
}
.site-nav a {
    font-family: var(--font-body);
    font-size: var(--step-0);
    color: var(--slate);
    text-decoration: none;
    padding-block: 0.25em;
}
.site-nav a:hover { color: var(--sea-deep); text-decoration: underline; }
.site-nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
    border-bottom: 2px solid var(--sea);
}

/* Mobile: nav collapses behind a disclosure button only when JS is present
   (html.js). Without JS the list simply stacks — nothing is unreachable. */
.nav-toggle { display: none; }
@media (max-width: 44rem) {
    html.js .nav-toggle {
        display: inline-block;
        background: none;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        font: inherit;
        color: var(--ink);
        padding: 0.4em 0.9em;
        cursor: pointer;
    }
    html.js .site-nav { display: none; flex-basis: 100%; }
    html.js .site-nav.open { display: block; }
    html.js .site-nav ul { flex-direction: column; gap: var(--space-2); }
}

/* ------------------------------------------------------------------ hero */
.hero {
    position: relative;
    display: grid;
    min-height: min(82vh, 46rem);
    overflow: hidden;
    background: var(--ink-bg);
}
.hero__media, .hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Legibility scrim: photographs can't guarantee contrast, the gradient can.
   Bottom-weighted so the image stays open above the headline. */
.hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(12, 22, 28, 0.72) 0%,
        rgba(12, 22, 28, 0.28) 45%,
        rgba(12, 22, 28, 0.08) 100%);
}
.hero__content {
    position: relative;
    align-self: end;
    width: 100%;
    padding-block: var(--space-5);
    color: var(--paper-on-ink);
}
.hero__content h1 {
    color: #fff;
    margin-bottom: var(--space-2);
    text-shadow: 0 1px 24px rgba(12, 22, 28, 0.35);
}
.hero__lede {
    font-size: var(--step-2);
    line-height: 1.4;
    max-width: 34ch;
    margin-bottom: var(--space-4);
    text-shadow: 0 1px 16px rgba(12, 22, 28, 0.45);
}

/* Interior pages get a shorter hero: a title band, not the homepage
   statement piece. Sized a touch taller so more of the photo shows
   (owner review 2026-08-05). */
.hero--page { min-height: clamp(16rem, 44vh, 28rem); }
.hero--page .hero__content { padding-block: var(--space-4); }
.hero--page h1 { font-size: var(--step-4); }

/* Tighten the gap between a header (photo hero or light header) and the
   first content below it — the full section top-padding left too much
   air (owner review 2026-08-05). */
.hero + .section, .hero + .stream,
.page-head + .section, .page-head + .stream {
    padding-top: var(--space-4);
}

/* ----------------------------------------------------------------- bands */
.section { padding-block: var(--section); }
.band { padding-block: var(--section); }
.band--sand { background: var(--sand); }
.band--ink { background: var(--ink-bg); color: var(--paper-on-ink); }
.band--ink h2, .band--ink h3 { color: #fff; }
.band--ink a { color: var(--paper-on-ink); }

/* Full-bleed photo band (the homepage sunset band): image behind, scrim,
   text bottom-left. Reuses the hero grammar at a shorter height. */
.band--photo {
    position: relative;
    display: grid;
    min-height: clamp(18rem, 45vw, 30rem);
    overflow: hidden;
    background: var(--ink-bg);
    color: var(--paper-on-ink);
}
.band--photo .hero__content { padding-block: var(--space-4); }
.band--photo h2 { color: #fff; }

/* --------------------------------------------------------------- gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--space-2);
    grid-auto-flow: dense;
}
.gallery__item { margin: 0; position: relative; }
.gallery__item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
}
/* Portrait frames span two rows so mixed orientation reads designed,
   not ragged. */
.gallery__item--tall { grid-row: span 2; }
.gallery__item--tall img { aspect-ratio: 3 / 4.1; }
.gallery__caption {
    font-size: 0.9375rem;         /* review 2026-08-04: was too small */
    color: var(--slate);          /* was --muted (5.2:1); --slate is 8:1 */
    padding-top: var(--space-1);
}

/* ----------------------------------------------------------------- prose */
.prose { max-width: var(--measure); }
.prose img { border-radius: var(--radius); margin-block: var(--space-4); }
.prose blockquote {
    margin: var(--space-4) 0;
    padding-left: var(--space-3);
    border-left: 3px solid var(--sea);
    font-family: var(--font-display);
    font-size: var(--step-2);
    color: var(--ink);
}

/* ----------------------------------------------------------------- forms */
label {
    display: block;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--space-1);
}
input:not([type=checkbox]):not([type=radio]), textarea, select {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--muted);
    border-radius: var(--radius);
    padding: 0.55em 0.75em;
    width: 100%;
    max-width: 28rem;
}
.field { margin-bottom: var(--space-3); }
.field__help { font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; }

/* ---------------------------------------------------- stream field blocks */
.stream-block { margin-block: var(--space-4); }
.stream > .band--photo, .stream > section.band--photo { margin-block: var(--space-5); }

.video-embed {
    aspect-ratio: 16 / 9;
    max-width: 56rem;
    background: var(--ink-bg);
    border-radius: var(--radius);
    overflow: hidden;
}
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.news-card {
    display: block;
    text-decoration: none;
    color: inherit;
}
.news-card img { border-radius: var(--radius); margin-bottom: var(--space-2); }
.news-card__title {
    font-size: var(--step-2);
    margin-bottom: var(--space-1);
    color: var(--ink);
}
.news-card:hover .news-card__title { color: var(--sea-deep); text-decoration: underline; }

/* ---------------------------------------------------- rates + availability */
.rates-scroll { overflow-x: auto; }
/* Owner 2026-08-01: headers centered over their columns. The table sizes
   to its content (not 100% width) so columns stay snug and each centered
   header visibly sits over its values; data cells center to match. */
.rates-table {
    width: auto;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.rates-table th, .rates-table td {
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid var(--line);
    text-align: center;
    white-space: nowrap;
}
.rates-table thead th, .rates-table thead th.num {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}
.rates-table tbody th { color: var(--ink); }
.rates-table .num { text-align: center; }
.rates-note { margin-top: var(--space-3); }
.rates-stamp { color: var(--muted); font-size: 0.875rem; }
.rates-badge {
    background: var(--dusk); color: #fff;
    font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: var(--radius);
}

.avail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--space-4) var(--space-4);
}
.avail-month { border-collapse: collapse; width: 100%; }
.avail-month caption {
    font-family: var(--font-display);
    font-size: var(--step-1);
    color: var(--ink);
    text-align: left;
    padding-bottom: var(--space-1);
}
.avail-month th, .avail-month td {
    text-align: center;
    padding: 0.3rem 0;
    font-size: 0.875rem;
    width: 14.3%;
}
.avail-month thead th { color: var(--muted); font-weight: 600; }
.avail-month td.avail-reserved {
    background: color-mix(in srgb, var(--dusk) 22%, transparent);
    border-radius: 3px;
    color: var(--slate);   /* AA on the tinted cell */
}
.avail-month td.avail-past { color: var(--muted); }
.avail-legend { color: var(--muted); font-size: 0.9rem; }
.avail-chip {
    display: inline-block; width: 0.9em; height: 0.9em;
    border: 1px solid var(--line); border-radius: 3px;
    background: var(--paper); vertical-align: -0.1em; margin-left: 1rem;
}
.avail-chip:first-child { margin-left: 0; }
.avail-chip--reserved {
    background: color-mix(in srgb, var(--dusk) 22%, transparent);
}

/* --------------------------------------------------------------- inquiry */
.inquiry-form { max-width: 34rem; }
.field-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.field-row .field { flex: 1 1 12rem; }
.form-errors {
    background: color-mix(in srgb, var(--dusk) 12%, var(--paper));
    border: 1px solid var(--dusk);
    border-radius: var(--radius);
    color: var(--ink);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
}
.errorlist { color: var(--dusk); list-style: none; padding: 0; margin: 0.25rem 0 0; font-size: 0.875rem; }
/* Honeypot: off-canvas, not display:none — some bots skip invisible fields. */
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.cf-turnstile { margin-bottom: var(--space-3); }

/* ------------------------------------------------------------ guest area */
.guest-pages {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--space-2);
}
.guest-pages a {
    display: block;
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: var(--step-2);
    color: var(--ink);
}
.guest-pages a:hover { border-color: var(--sea); color: var(--sea-deep); }

/* ---------------------------------------------------------- instructions */
.instructions-heading { margin-top: var(--space-5); }
.instruction-list {
    list-style: none;
    padding: 0;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: var(--space-2);
}
.instruction-list li {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: var(--space-2) var(--space-3);
}
.instruction-list a {
    display: block;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
}
.instruction-list a:hover { color: var(--sea-deep); text-decoration: underline; }
.instruction-meta { padding-top: var(--space-3); }

/* Print: clean instruction cards — the owner prints and posts these.
   Chrome/site furniture disappears; content goes black-on-white. */
@media print {
    .site-header, .site-footer, .no-print, .hero__scrim { display: none !important; }
    .hero, .hero--page {
        min-height: 0;
        background: none;
        color: #000;
    }
    .hero__media { display: none; }
    .hero__content { position: static; padding: 0; color: #000; }
    .hero__content h1 { color: #000; text-shadow: none; }
    .hero__lede { color: #000; text-shadow: none; }
    body { background: #fff; color: #000; }
    .stream-block { margin-block: 1rem; }
    .video-embed { display: none; }   /* a video can't print — the page text stands alone */
    a { color: #000; text-decoration: none; }
}

/* ---------------------------------------------------------------- footer */
.site-footer {
    background: var(--ink-bg);
    color: var(--paper-on-ink);
    padding-block: var(--space-5);
    margin-top: var(--section);
}
.site-footer a { color: var(--paper-on-ink); }
.site-footer__grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-5);
    justify-content: space-between;
}
.site-footer__brand {
    font-family: var(--font-display);
    font-size: var(--step-2);
    color: #fff;
}
.site-footer nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
}
.site-footer__meta {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: var(--space-4);
}

/* ── Light page header (no-photo pages; replaces the dark hero band) ── */
.page-head {
    padding: var(--space-5) 0 var(--space-2);
    border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: var(--step-4); margin: 0; }
.page-head__lede {
    color: var(--muted);
    font-size: var(--step-1);
    margin: var(--space-1) 0 0;
    max-width: 44rem;
}

/* ── News timeline ──────────────────────────────────────────────────── */
.timeline-year { margin-bottom: var(--space-4); }
.timeline-year__heading {
    font-size: var(--step-2);
    color: var(--ink);
    border-bottom: 2px solid var(--sea);
    display: inline-block;
    padding-bottom: 0.25rem;
    margin: 0 0 var(--space-2);
}
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}
.timeline__entry {
    display: flex;
    gap: var(--space-2);
    align-items: baseline;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
}
.timeline__date {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    flex: 0 0 4.5rem;
    font-size: 0.9375rem;
}
.timeline__link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}
.timeline__link:hover { color: var(--sea-deep); text-decoration: underline; }
.timeline__entry { align-items: center; }
.timeline__thumb-link { flex: 0 0 auto; line-height: 0; }
.timeline__thumb {
    width: 5rem;
    height: 3.75rem;
    object-fit: cover;
    border-radius: var(--radius);
}

/* ── Inquiry CTA (closing conversion band; review 2026-08-04) ───────── */
.cta-band { text-align: center; }
.cta-band > .container > p { max-width: 46rem; margin-inline: auto; }
.cta-band__actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-3);
}
.btn--lg {
    font-size: var(--step-1);
    padding: 0.85rem 1.6rem;
}
.rates-cta { margin-top: var(--space-3); }

/* Child-page index (e.g. the Kitchen's recipes) — a linked list under the
   body, two columns where there's room. */
.child-index { padding-top: 0; }
.child-index__list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: var(--space-5);
}
.child-index__list li {
    break-inside: avoid;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line);
}
.child-index__list a { text-decoration: none; }
.child-index__list a:hover { text-decoration: underline; }
@media (max-width: 40rem) {
    .child-index__list { columns: 1; }
}
/* Card variant — used when children carry a hero image (e.g. recipes). */
.child-index__cards {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
