/* ==========================================================================
   Park & Breakfast — design system
   The Siding at Bakerville (working name) · concept preview
   Lightly Victorian-railway: Fraunces display, brass accents, pine chrome.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --pine: #1e3a2a;
  --pine-deep: #142a1e;
  --cream: #f6f0e2;
  --paper: #fffdf7;
  --brass: #b8892f;
  --brass-dark: #96701f;
  --charcoal: #26231e;
  --winter: #8fb3c9;
  --winter-deep: #33566b;
  --aspen: #d9a13b;
  --rust: #8a4a2b;
  --line: #d8cfba;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 10px;
  --max-width: 1080px;
  --shadow-soft: 0 2px 10px rgba(38, 35, 30, 0.08);
  --shadow-lift: 0 8px 28px rgba(20, 42, 30, 0.18);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--paper);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--pine-deep);
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--pine);
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brass-dark);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

section + section {
  margin-top: 3rem;
}

/* Text helpers */
.muted { opacity: 0.72; }
.small { font-size: 0.85rem; }

/* Kicker — railway-poster eyebrow above headings */
.kicker {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin-bottom: 0.6rem;
}

/* --------------------------------------------------------------------------
   3. Header
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--pine-deep);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 3px solid var(--brass);
  position: sticky;
  top: 0;
  z-index: 999;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cream);
}

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

.brand-mark {
  width: 40px;
  height: 40px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-name em {
  font-style: italic;
  color: var(--brass);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
}

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--cream);
  border-bottom-color: var(--brass);
}

/* --------------------------------------------------------------------------
   4. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--pine-deep);
  color: var(--cream);
  text-align: center;
  padding: 2.25rem 1.25rem;
  border-top: 3px solid var(--brass);
}

.site-footer p {
  margin: 0.3em 0;
}

.site-footer a {
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   5. Password gate overlay (DOM-injected by js/app.js)
   -------------------------------------------------------------------------- */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--pine-deep);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.25rem;
  text-align: center;
}

.gate-overlay img {
  width: 84px;
  height: 84px;
  margin-bottom: 0.25rem;
}

.gate-overlay h1 {
  color: var(--cream);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0;
}

.gate-overlay .kicker {
  color: var(--brass);
  margin-bottom: 0;
}

.gate-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.gate-form input[type="password"] {
  font: inherit;
  padding: 0.6rem 0.9rem;
  min-width: 220px;
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--charcoal);
}

.gate-form input[type="password"]:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

.gate-error {
  color: var(--aspen);
  font-size: 0.9rem;
  min-height: 1.4em;
  margin: 0;
}

.gate-error.shake {
  animation: gate-shake 0.4s ease;
}

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  margin: 0 calc(50% - 50vw) 0;
  /* full-bleed: break out of the centered main column */
}

.hero img {
  width: 100%;
  height: min(62vh, 540px);
  object-fit: cover;
}

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 5vh, 3rem);
  transform: translateX(-50%);
  width: min(92%, 620px);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 1.5rem 1.75rem;
}

.hero-copy h1,
.hero-copy h2 {
  margin-bottom: 0.35em;
}

.hero-copy p:last-child {
  margin-bottom: 0;
}

/* Give heroes breathing room before the next section */
.hero + section,
.hero + * {
  margin-top: 3rem;
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-top: 0;
}

.card .price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pine);
  margin: 0.25rem 0 0.5rem;
}

.card > *:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   8. Tables
   -------------------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  background: var(--pine-deep);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--brass);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:nth-child(even) {
  background: var(--paper);
}

/* --------------------------------------------------------------------------
   9. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: var(--brass);
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--brass-dark);
  border-color: var(--brass-dark);
  color: #fff;
}

.btn:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.btn-outline {
  background: transparent;
  color: var(--brass-dark);
  border: 1px solid var(--brass);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--brass);
  color: #fff;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  max-width: 420px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pine-deep);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(184, 137, 47, 0.25);
}

.form-error {
  color: var(--rust);
  font-size: 0.88rem;
}

.form-success {
  color: var(--pine);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   11. Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22em 0.75em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--charcoal);
  margin-right: 0.35rem;
}

.badge-forever {
  background: var(--pine);
  border-color: var(--pine-deep);
  color: var(--cream);
}

.badge-gift {
  background: var(--brass);
  border-color: var(--brass-dark);
  color: #fff;
}

.badge-done {
  background: var(--pine);
  border-color: var(--pine-deep);
  color: var(--cream);
}

.badge-pending {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}

.status-table td:first-child {
  white-space: nowrap;
}

.legal-callout {
  background: var(--cream);
  border: 1px solid var(--rust);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.legal-callout strong:first-child {
  color: var(--rust);
}

/* --------------------------------------------------------------------------
   12. Season theming
   -------------------------------------------------------------------------- */
/* Winter: cool alpine tint */
body.theme-winter .kicker {
  color: var(--winter-deep);
}

body.theme-winter .hero img {
  filter: saturate(0.9) brightness(1.02);
}

body.theme-winter .hero-copy {
  border-top: 4px solid var(--winter-deep);
}

body.theme-winter .card {
  border-top: 3px solid var(--winter);
}

body.theme-winter .data-table thead th {
  border-bottom-color: var(--winter);
}

/* Summer: warm aspen-gold accents */
body.theme-summer .kicker {
  color: var(--aspen);
}

body.theme-summer .hero-copy {
  border-top: 4px solid var(--aspen);
}

body.theme-summer .card {
  border-top: 3px solid var(--aspen);
}

body.theme-summer .data-table thead th {
  border-bottom-color: var(--aspen);
}

/* Season toggle — pill switch between summer/winter pages */
.season-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0.25rem;
  gap: 0.25rem;
  margin: 1rem 0;
}

.season-toggle a,
.season-toggle button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.season-toggle .is-active,
.season-toggle [aria-current] {
  background: var(--pine);
  color: var(--cream);
}

body.theme-winter .season-toggle .is-active,
body.theme-winter .season-toggle [aria-current] {
  background: var(--winter-deep);
}

body.theme-summer .season-toggle .is-active,
body.theme-summer .season-toggle [aria-current] {
  background: var(--aspen);
  color: var(--pine-deep);
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 1rem;
  }

  .site-nav {
    width: 100%;
    gap: 0.25rem 1rem;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .hero img {
    height: min(48vh, 360px);
  }

  .hero-copy {
    position: static;
    transform: none;
    width: auto;
    margin: -2.5rem 1rem 0;
  }

  main {
    padding: 1.75rem 1rem 3rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.55rem 0.7rem;
    font-size: 0.92rem;
  }
}

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