/* quietchalet.com — "Evening". See planning/quietchalet/design.md.
   Dark spruce ground, birch text, amber from the fire. Fraunces for display, Manrope for body.
   Left-aligned throughout. One motion moment (the hero), scroll-snap on desktop only. */

:root {
  --spruce: #101814;
  --bark: #1B241F;
  --birch: #F2EEE6;
  --amber: #E0A458;
  --moss: #7E8F7A;
  --hair: rgba(242, 238, 230, 0.14);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --wrap: 68rem;
  --gutter: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--spruce); color: var(--birch);
  font: 400 1.0625rem/1.6 var(--body);
  padding-bottom: 4rem; /* sticky bar on phones */
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--birch); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.05;
  font-variation-settings: "opsz" 144; margin: 0 0 0.75rem; color: var(--birch);
}
h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; font-weight: 500; color: var(--amber); margin-bottom: 0.5rem; }
p { margin: 0 0 1rem; max-width: 62ch; }
.lead { font-size: 1.125rem; color: var(--birch); }
.muted { color: var(--moss); }
.small { font-size: 0.875rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: var(--gutter); top: -3rem; background: var(--amber); color: var(--spruce); padding: 0.5rem 0.75rem; z-index: 40; }
.skip:focus { top: 0.5rem; }

/* Buttons: one filled, the rest outlined */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: 0.6rem 1.25rem; border-radius: 4px; border: 1px solid var(--amber);
  background: var(--amber); color: var(--spruce); font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--birch); border-color: var(--birch); color: var(--spruce); }
.btn.ghost { background: transparent; color: var(--birch); border-color: var(--hair); }
.btn.ghost:hover { border-color: var(--birch); background: transparent; color: var(--birch); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 0 0 1rem; }
.actions .link { font-weight: 600; }

/* Header: transparent over the hero, spruce after */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--gutter); transition: background-color 250ms ease;
}
.top.solid { background: rgba(16, 24, 20, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.125rem; color: var(--birch); text-decoration: none; white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: 1.25rem; }
.top nav a:not(.btn) { display: none; color: var(--birch); text-decoration: none; font-size: 0.9375rem; opacity: 0.85; }
.top nav a:not(.btn):hover { opacity: 1; text-decoration: underline; }
.top nav .btn { min-height: 2.25rem; padding: 0.4rem 0.9rem; font-size: 0.875rem; white-space: nowrap; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; background: var(--bark) center / cover no-repeat; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16, 24, 20, 0.92) 0%, rgba(16, 24, 20, 0.55) 40%, rgba(16, 24, 20, 0.05) 75%),
              linear-gradient(to bottom, rgba(16, 24, 20, 0.55) 0%, rgba(16, 24, 20, 0) 22%);
}
.hero-text {
  position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: 6rem var(--gutter) 2.5rem;
  opacity: 0; transform: translateY(14px); animation: arrive 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 150ms forwards;
}
@keyframes arrive { to { opacity: 1; transform: none; } }
.hero h1 { max-width: 12ch; margin-bottom: 1rem; }
.line { font-size: 1.0625rem; max-width: 44ch; margin-bottom: 1.5rem; }

/* Right now at the house */
.now {
  display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.25rem; padding: 0.4rem 1rem 0.4rem 0.55rem;
  border: 1px solid rgba(242, 238, 230, 0.16); border-radius: 999px; font-size: 0.875rem; color: var(--birch);
  background: rgba(16, 24, 20, 0.62);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(242, 238, 230, 0.06) inset, 0 6px 24px rgba(16, 24, 20, 0.35);
  text-shadow: 0 1px 2px rgba(16, 24, 20, 0.6);
}
.now[hidden] { display: none; }
.now .now-temp { font-weight: 600; }
.now-glyph { display: inline-flex; flex: none; width: 1.6rem; height: 1.6rem; color: var(--amber); }
.now-glyph svg { width: 100%; height: 100%; }

/* Chapters */
.chapters { display: block; }
.chapter { position: relative; min-height: 78svh; display: flex; align-items: flex-end; overflow: hidden; }
.chapter picture { position: absolute; inset: 0; background: var(--bark) center / cover no-repeat; }
.chapter img { width: 100%; height: 100%; object-fit: cover; }
.chapter::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(16, 24, 20, 0.9) 0%, rgba(16, 24, 20, 0.35) 45%, rgba(16, 24, 20, 0) 75%); }
.chapter-text { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 2rem var(--gutter) 2.25rem; }
.chapter-text h2 { color: var(--amber); margin-bottom: 0.5rem; }
.chapter-text p { max-width: 40ch; margin: 0; }
.all-photos { padding-top: 1.5rem; padding-bottom: 0.5rem; }

/* Blocks */
.block { padding: 3.5rem 0; border-top: 1px solid var(--hair); }
.block h2 { margin-bottom: 0.5rem; }
.block .lead { margin-bottom: 1.5rem; }

/* Dates: a strip of days */
.dates-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.strip-nav { display: none; gap: 0.5rem; margin: 0 0 0.75rem; }
.round { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 999px; border: 1px solid var(--hair); background: transparent; color: var(--birch); cursor: pointer; }
.round:hover { border-color: var(--birch); }
.round:disabled { opacity: 0.3; cursor: default; }
.strip-cal { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x proximity; padding: 0.5rem var(--gutter) 1rem; scroll-padding-left: var(--gutter); margin-bottom: 0.5rem; scrollbar-width: thin; scrollbar-color: var(--moss) transparent; }
.strip-cal[hidden] { display: none; }
.month { flex: 0 0 auto; scroll-snap-align: start; padding-right: 1.25rem; }
.month h3 { font-family: var(--display); font-weight: 500; font-size: 1.125rem; color: var(--birch); margin: 0 0 0.5rem 0.25rem; position: sticky; left: var(--gutter); display: inline-block; }
.days { display: flex; gap: 0.25rem; }
.day {
  width: 2.6rem; height: 3.6rem; border-radius: 4px; background: var(--bark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  font-variant-numeric: tabular-nums; cursor: default; position: relative;
}
.day .n { font: 600 1rem/1 var(--body); }
.day .w { font-size: 0.6875rem; color: var(--moss); }
.day.free .n { color: var(--amber); }
.day.blocked { background: transparent; border: 1px solid var(--hair); }
.day.blocked .n { color: var(--moss); text-decoration: line-through; }
.day.past { opacity: 0.35; }
.day.today { outline: 1px solid var(--amber); outline-offset: -1px; }
.day[tabindex]:focus-visible { outline: 2px solid var(--amber); }
.cal-key { display: flex; gap: 1.25rem; margin: 0 0 1.25rem; padding: 0 var(--gutter); list-style: none; font-size: 0.875rem; color: var(--moss); }
.cal-key .k-free { color: var(--amber); font-weight: 600; }
.cal-key .k-blocked { text-decoration: line-through; }
.tip {
  position: absolute; z-index: 15; transform: translate(-50%, -100%); margin-top: -0.5rem;
  background: var(--birch); color: var(--spruce); font-size: 0.8125rem; line-height: 1.2; white-space: nowrap;
  padding: 0.4rem 0.6rem; border-radius: 4px; pointer-events: none;
}
.tip::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 0.35rem solid transparent; border-top-color: var(--birch); }

/* Ledger */
.ledger { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--hair); }
.ledger > div { display: grid; grid-template-columns: 1fr; gap: 0.15rem 1.5rem; padding: 0.9rem 0; border-bottom: 1px solid var(--hair); }
.ledger dt { color: var(--amber); font-weight: 600; }
.ledger dd { margin: 0; max-width: 60ch; }

/* Nearby */
.seasons { display: grid; gap: 2rem; }
.places { list-style: none; padding: 0; margin: 0; }
.places li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--hair); }
.places a { color: var(--birch); text-decoration-color: var(--moss); }
.places a:hover { color: var(--amber); }
.places b { font-weight: 600; color: var(--birch); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Reviews */
blockquote { margin: 0 0 1.75rem; padding: 0; max-width: 62ch; }
blockquote p { font-family: var(--display); font-weight: 500; font-size: 1.25rem; line-height: 1.4; font-variation-settings: "opsz" 24; }
blockquote footer { color: var(--moss); font-size: 0.875rem; }

/* Enquiry (hidden until /api/config says otherwise) */
#enquiry-form label { display: block; margin-bottom: 0.9rem; font-weight: 600; }
#enquiry-form input, #enquiry-form textarea { display: block; width: 100%; margin-top: 0.3rem; padding: 0.55rem 0.65rem; font: 400 1rem/1.3 var(--body); color: var(--birch); background: var(--bark); border: 1px solid var(--hair); border-radius: 4px; }
#enquiry-form .field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
#enquiry-form .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
#enquiry-form { max-width: 40rem; }

/* Footer */
.foot { border-top: 1px solid var(--hair); padding: 2rem 0 2.5rem; font-size: 0.875rem; color: var(--moss); }
.foot a { margin-right: 1rem; }

/* Sticky bar on phones */
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: 1fr 1fr; background: rgba(16, 24, 20, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--hair); transform: translateY(100%); transition: transform 200ms ease-out; padding-bottom: env(safe-area-inset-bottom); }
.sticky-bar.is-visible { transform: none; }
.sticky-bar a { display: flex; align-items: center; justify-content: center; min-height: 3.5rem; color: var(--amber); font-weight: 600; text-decoration: none; font-size: 0.9375rem; }
.sticky-bar a + a { border-left: 1px solid var(--hair); }

/* Help chat (served by poconos-api at /api/chat/widget.js; structure lives there, look lives here) */
:root {
  --chat-bg: var(--spruce); --chat-ink: var(--birch); --chat-accent: var(--amber); --chat-on-accent: var(--spruce);
  --chat-bubble: var(--bark); --chat-field: var(--bark); --chat-line: var(--hair); --chat-font: var(--body); --chat-radius: 6px;
  --chat-ring: rgba(224, 164, 88, 0.35); --chat-btn-radius: 4px;
  --chat-bar-ink: var(--amber); --chat-bar-line: var(--hair);
}
.sticky-bar .chat-open-bar { font-weight: 600; font-size: 0.9375rem; }
.chat-panel h2 { font-family: var(--display); font-weight: 500; }

/* Lightbox */
.lightbox { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: var(--spruce); color: var(--birch); }
.lightbox::backdrop { background: var(--spruce); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 0.5rem 1rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { font-size: 0.9375rem; margin-top: 0.75rem; padding: 0 1rem; max-width: 60ch; }
.lightbox button { position: absolute; min-width: 2.75rem; min-height: 2.75rem; padding: 0.5rem 0.9rem; border: 1px solid var(--hair); border-radius: 4px; background: rgba(16, 24, 20, 0.7); color: var(--birch); font: 600 0.9375rem var(--body); cursor: pointer; }
.lb-close { top: 0.75rem; right: 0.75rem; }
.lb-prev { bottom: 0.75rem; left: 0.75rem; }
.lb-next { bottom: 0.75rem; right: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text { opacity: 1; transform: none; animation: none; }
  .sticky-bar, .top { transition: none; }
}

/* Tablet and up */
@media (min-width: 700px) {
  .ledger > div { grid-template-columns: 12rem 1fr; }
  .seasons { grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
  #enquiry-form .field-row { grid-template-columns: 1fr 1fr; }
  #enquiry-form .field-row.three { grid-template-columns: 1fr 1fr 1fr; }
}

/* Desktop */
@media (min-width: 900px) {
  body { font-size: 1.125rem; padding-bottom: 0; }
  h1 { font-size: 5.5rem; }
  h2 { font-size: 3rem; }
  .top { padding: 1.1rem 2rem; }
  .top nav a:not(.btn) { display: inline; }
  .hero-text { padding: 8rem var(--gutter) 4rem; }
  .line { font-size: 1.25rem; }
  .chapter { min-height: 100svh; }
  .chapter-text { padding-bottom: 4rem; }
  .chapter.alt .chapter-text { display: flex; flex-direction: column; align-items: flex-end; }
  .chapter.alt .chapter-text h2, .chapter.alt .chapter-text p { width: 30rem; max-width: 100%; }
  .block { padding: 5rem 0; }
  .day { width: 3rem; height: 4rem; }
  .strip-nav:not([hidden]) { display: flex; }
  .strip-cal { padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); scroll-padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
  .cal-key { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding: 0 var(--gutter); }
  .sticky-bar { display: none; }
  .lightbox figure { padding: 3.5rem 5rem 1rem; }
  .lb-prev, .lb-next { top: 50%; bottom: auto; transform: translateY(-50%); }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-snap-type: y proximity; }
    .hero, .chapter { scroll-snap-align: start; }
  }
}
