/* ============================================================
   THE CEDAR HOUSE — design tokens
   Brand: "Soft Moss" (see cedar-house-brand-spec.md)
   Palette: moss ground, honeyed cedar accents, cream text
   Type: Fraunces (display) / Inter (body) / JetBrains Mono (spec labels)

   Legacy token names kept (--ink, --fog, --dune, --pine...) so every
   downstream rule below still resolves correctly — only the values
   changed to the Soft Moss palette. New spec-named aliases point at
   the same values for anyone cross-referencing the brand spec file.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --ink: #565f4c;        /* = --moss, primary ground */
  --ink-soft: #484f3d;    /* = --moss-panel, alt section ground */
  --fog: #ece4d3;         /* = --cream, primary text */
  --fog-dim: #c8c2ac;     /* muted cream, secondary/paragraph text */
  --cedar: #a9642f;       /* secondary accent — links, CTAs, held dates */
  --dune: #cdb88e;        /* tertiary label tone — spec values, month titles */
  --pine: #484f3d;        /* = --moss-panel, info-box / stamp ground */

  --moss: #565f4c;
  --moss-deep: #3a3527;
  --moss-panel: #484f3d;
  --cream: #ece4d3;
  --cedar-honey: #b6763a; /* sun mark + accent — buttons, underline accents, icon fills */
  --on-cedar: #241c14;    /* near-black text for use on cedar/cedar-honey backgrounds */

  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  --max: 1180px;
  --edge: clamp(1.5rem, 5vw, 5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--fog);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

/* Label/eyebrow treatment (locked: 4d) — mono-caps labels read low-contrast
   in cedar/cedar-honey on moss. Text itself goes cream (high contrast); the
   accent color moves to a short underline rule instead. */
.eyebrow, .spec-row .tag, .hero .descriptor {
  color: var(--cream);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::after, .hero .descriptor::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  margin-top: 7px;
  background: var(--cedar-honey);
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 400;
  color: var(--fog);
  margin-bottom: 0.4rem;
}

p { color: var(--fog-dim); max-width: 62ch; }

hr.line {
  border: none;
  border-top: 1px solid rgba(231, 226, 216, 0.14);
  margin: 0;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(58, 53, 39, 0.85);
  border-bottom: 1px solid rgba(231, 226, 216, 0.1);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.nav .mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- sunmark (sun-over-horizon glyph) ---------- */

.sunmark {
  position: relative;
  width: 22px;
  height: 15px;
  overflow: hidden;
  flex-shrink: 0;
}
.sunmark .sun {
  position: absolute;
  left: 3px;
  top: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cedar-honey);
}
.sunmark .horizon {
  position: absolute;
  left: 0;
  top: 10px;
  width: 22px;
  height: 1.5px;
  background: var(--cream);
}

.sunmark.lg {
  display: block;
  width: 40px;
  height: 26px;
  margin: 1.3rem 0 0;
}
.sunmark.lg .sun { left: 6px; top: 2px; width: 28px; height: 28px; }
.sunmark.lg .horizon { top: 17px; width: 40px; height: 2px; }

.nav ul {
  list-style: none;
  display: flex;
  gap: 1.9rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--fog-dim);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav a:hover { color: var(--cream); }

.nav .cta {
  border: 1px solid var(--cedar-honey);
  color: var(--cream) !important;
  padding: 0.5rem 1rem;
  border-radius: 2px;
}

.nav .cta:hover {
  background: var(--cedar);
  color: var(--on-cedar) !important;
}

.nav-toggle { display: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(58,53,39,0.45) 0%, rgba(58,53,39,0.68) 55%, rgba(58,53,39,0.9) 100%),
    url('images/hero.jpg') center 65% / cover no-repeat;
}

.sun-arc {
  position: absolute;
  top: 8%;
  left: 0;
  width: 100%;
  height: 60%;
  opacity: 0.55;
  pointer-events: none;
}

.sun-arc path {
  fill: none;
  stroke: var(--cedar);
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.sun-arc circle {
  fill: var(--cedar);
  offset-path: path('M -40 260 Q 640 -60 1320 260');
  animation: travel 26s linear infinite;
}

@keyframes travel {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  margin-top: 1rem;
  max-width: 14ch;
}

.hero .descriptor {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-top: 1.1rem;
  text-transform: uppercase;
}

.hero .lede {
  margin-top: 2rem;
  font-size: 1.05rem;
  max-width: 46ch;
}

.hero-actions {
  margin-top: 2.6rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--cedar);
  color: var(--on-cedar);
  font-weight: 600;
}
.btn-primary:hover { background: #a4611f; }

.btn-ghost {
  border-color: rgba(231, 226, 216, 0.28);
  color: var(--fog);
}
.btn-ghost:hover { border-color: var(--cedar-honey); color: var(--cream); }

/* ---------- sections ---------- */

section {
  padding: 6.5rem 0;
  border-bottom: 1px solid rgba(231, 226, 216, 0.08);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

/* ---------- under-construction flag ---------- */

.uc-flag {
  color: var(--cedar-honey);
  margin-left: 0.15em;
}

.uc-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--fog-dim);
  margin-top: 0.6rem;
}

.uc-note b { color: var(--cedar-honey); font-weight: 700; }

/* ---------- story ---------- */

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-grid p + p { margin-top: 1.1rem; }

.story-panel {
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(231, 226, 216, 0.14);
  background: url('images/story-dusk.jpg') center / cover no-repeat;
  position: relative;
}

/* ---------- spec sheet (amenities) ---------- */

.spec-sheet {
  border-top: 1px solid rgba(231, 226, 216, 0.18);
}

.spec-row {
  display: grid;
  grid-template-columns: 1.1fr 2.1fr 2.4fr 0.8fr;
  gap: 2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(231, 226, 216, 0.1);
  align-items: baseline;
}

.spec-row .tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec-row .tag::after {
  content: '';
  display: block;
  width: 14px;
  height: 2px;
  margin-top: 4px;
  background: var(--cedar-honey);
}

.spec-row .label {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--fog);
}

.spec-row .detail {
  font-size: 0.92rem;
  color: var(--fog-dim);
}

.spec-row .val {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--dune);
  text-align: right;
}

.good-to-know {
  margin-top: 2.5rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid rgba(231, 226, 216, 0.14);
  background: var(--pine);
  font-size: 0.9rem;
}

.good-to-know .eyebrow { margin-bottom: 0.5rem; }
.good-to-know p + p { margin-top: 1rem; }

/* In-copy links. Base `a` inherits color, so body links need an explicit
   treatment. Cream carries legibility, cedar-honey underlines it, matching
   the label rule above. */
.good-to-know a, .rules-copy a {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--cedar-honey);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.good-to-know a:hover, .rules-copy a:hover { text-decoration-color: var(--cream); }

/* ---------- house rules ---------- */

.rules {
  background: var(--ink-soft);
}

.rules-copy p {
  max-width: 68ch;
  font-size: 1.02rem;
  color: var(--fog);
}
.rules-copy p + p { margin-top: 1.3rem; }

/* ---------- legal document (terms) ---------- */

.legal h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 400;
  color: var(--fog);
}

.legal-lede {
  max-width: 62ch;
  margin-top: 1.4rem;
  font-size: 1.02rem;
  color: var(--fog);
}

.legal-doc {
  counter-reset: sec;
  list-style: none;
  margin-top: 3.5rem;
}

.legal-doc > li {
  counter-increment: sec;
  border-top: 1px solid rgba(231, 226, 216, 0.12);
  margin-top: 2.2rem;
  padding-top: 2.2rem;
}
.legal-doc > li:first-child { margin-top: 0; }

.legal-doc > li > h2 {
  display: flex;
  gap: 0.9rem;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--fog);
  margin-bottom: 0.9rem;
}

.legal-doc > li > h2::before {
  content: counter(sec);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cedar-honey);
  padding-top: 0.35rem;
  min-width: 1.6rem;
  flex-shrink: 0;
}

.legal-doc p {
  max-width: 70ch;
  padding-left: 2.5rem;
  font-size: 0.95rem;
  color: var(--fog-dim);
}
.legal-doc p + p { margin-top: 0.9rem; }

.legal-doc a {
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--cedar-honey);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Unresolved values. Deliberately loud so nothing ships half-filled. */
.tbd {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--cedar-honey);
  background: rgba(182, 118, 58, 0.14);
  border: 1px dashed rgba(182, 118, 58, 0.55);
  padding: 0.1em 0.45em;
  border-radius: 2px;
  white-space: nowrap;
}

.legal-updated {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fog-dim);
}

/* ---------- gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-grid .tile {
  aspect-ratio: 1;
  border: 1px solid rgba(231, 226, 216, 0.12);
  position: relative;
  overflow: hidden;
}

.gallery-grid .tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-grid .tile:hover img { transform: scale(1.04); }

.gallery-grid .tile span {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--cream);
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  background: rgba(58, 53, 39, 0.72);
}

.gallery-grid .tile.wide { grid-column: span 2; }

/* ---------- availability ---------- */

.avail-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.month-card .month-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dune);
  margin-bottom: 1rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-grid .dow {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--fog-dim);
  text-align: center;
  padding-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.cal-grid .day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  border: 1px solid rgba(231, 226, 216, 0.08);
  color: var(--fog-dim);
}

.cal-grid .day.avail { color: var(--fog); border-color: rgba(231,226,216,0.2); }
.cal-grid .day.held {
  background: rgba(169, 100, 47, 0.28);
  color: var(--cream);
  border-color: rgba(169, 100, 47, 0.5);
}
.cal-grid .day.empty { border: none; }

.legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--fog-dim);
}
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend i { width: 9px; height: 9px; display: inline-block; border: 1px solid rgba(231,226,216,0.2); }
.legend i.held { background: rgba(169, 100, 47, 0.35); border-color: var(--cedar); }

.cal-note {
  margin-top: 2.2rem;
  font-size: 0.85rem;
}

/* ---------- inquiry form ---------- */

.inquiry { background: var(--ink-soft); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 2rem;
  margin-top: 2.5rem;
}

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dune);
}

.field input,
.field select,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(231, 226, 216, 0.28);
  color: var(--fog);
  font-family: var(--body);
  font-size: 0.98rem;
  padding: 0.6rem 0.1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--cedar);
}

.field select option { background: var(--ink); }

.field textarea { resize: vertical; min-height: 4.5rem; }

.form-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--fog-dim);
}

.field.hint {
  font-size: 0.72rem;
  color: var(--fog-dim);
  font-family: var(--body);
}

.form-actions { margin-top: 2.5rem; }

/* Honeypot. Off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note.is-error { color: var(--cedar-honey); }

/* ---------- week-select (multi-select dropdown) ---------- */

.week-select { position: relative; }

.week-select summary {
  list-style: none;
  cursor: pointer;
  border-bottom: 1px solid rgba(231, 226, 216, 0.28);
  color: var(--fog);
  font-family: var(--body);
  font-size: 0.98rem;
  padding: 0.6rem 1.4rem 0.6rem 0.1rem;
  position: relative;
  transition: border-color 0.2s ease;
}
.week-select summary::-webkit-details-marker { display: none; }
.week-select summary::after {
  content: '\25BE';
  position: absolute;
  right: 0.2rem;
  top: 0.65rem;
  color: var(--cedar-honey);
  font-size: 0.75rem;
}
.week-select[open] summary { border-color: var(--cedar-honey); }
.week-select[open] summary::after { content: '\25B4'; }

.week-list {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--moss-panel);
  border: 1px solid rgba(231, 226, 216, 0.18);
  padding: 0.4rem;
}

.week-option {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.88rem;
  color: var(--fog);
  cursor: pointer;
  border-radius: 2px;
}
.week-option:hover { background: rgba(231, 226, 216, 0.07); }
.week-option input { accent-color: var(--cedar-honey); }
.week-option .wk-label { flex: 1; }
.week-option .wk-star { color: var(--cedar-honey); font-weight: 700; }

/* ---------- footer ---------- */

footer {
  padding: 3.5rem 0;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer .foot-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.monogram {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--moss-deep);
  color: var(--cedar-honey);
  font-family: var(--display);
  font-size: 0.95rem;
}

footer .mark {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

footer .meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--fog-dim);
  letter-spacing: 0.05em;
}

footer .meta a {
  text-decoration: underline;
  text-decoration-color: rgba(182, 118, 58, 0.65);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
footer .meta a:hover { color: var(--cream); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  /* Section links drop away, but the Inquire CTA stays reachable. Most
     inquiries arrive on mobile, so the form always needs a visible path. */
  .nav ul { gap: 0; }
  .nav ul li:not(:last-child) { display: none; }
  .nav .mark { font-size: 0.82rem; letter-spacing: 0.06em; }
  .nav .cta { padding: 0.45rem 0.85rem; font-size: 0.78rem; }

  .story-grid { grid-template-columns: 1fr; }
  .story-panel { order: -1; aspect-ratio: 16/10; }
  .spec-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .spec-row .val { text-align: left; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .tile.wide { grid-column: span 2; }
  .avail-months { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .legal-doc p { padding-left: 0; }
  .legal-doc > li > h2 { gap: 0.6rem; }
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cedar);
  outline-offset: 2px;
}
