@font-face {
  font-family: "Bitter";
  src: url("/demo/bitter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("/demo/work-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --spruce: #1E3B34;
  --spruce-soft: #2E5248;
  --fog: #E4EAE7;
  --paper: #F6F8F7;
  --slate: #4D6B78;
  --amber: #E0A23A;
  --amber-deep: #B97D17;
  --ink: #15211E;
  --muted: #4A5A56;
  --line: #C7D2CE;

  /* sky colours change with the selected season */
  --sky-top: #8DB8CD;
  --sky-bottom: #E8DDB5;
  --orb: #FFF1C4;
  --ridge-far: #6F8F98;
  --ridge-mid: #3F6159;
  --lake-top: #5E8A99;
  --lake-bottom: #2C4C52;

  --serif: "Bitter", Georgia, serif;
  --sans: "Work Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

body[data-season="shoulder"] {
  --sky-top: #6E6F8F;
  --sky-bottom: #E8A87C;
  --orb: #FBD9A6;
  --ridge-far: #77707F;
  --ridge-mid: #3D4D4B;
  --lake-top: #7C7A8E;
  --lake-bottom: #2F3E45;
}
body[data-season="winter"] {
  --sky-top: #9DB0C2;
  --sky-bottom: #E9EEF2;
  --orb: #FFFFFF;
  --ridge-far: #B9C7D1;
  --ridge-mid: #7F95A1;
  --lake-top: #A9BBC6;
  --lake-bottom: #5D7482;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: var(--spruce); text-underline-offset: 3px; }
a:hover { color: var(--amber-deep); }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

h1, h2 {
  font-family: var(--serif);
  color: var(--spruce);
  line-height: 1.1;
  margin: 0;
}

.demo-note {
  margin: 0;
  padding: 10px var(--gutter);
  background: var(--spruce);
  color: #DDE7E3;
  font-size: 0.875rem;
}
.demo-note a { color: #FFE2A8; }

/* hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 40px;
  overflow: hidden;
  isolation: isolate;
}
.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.sky-top { stop-color: var(--sky-top); transition: stop-color 0.8s ease; }
.sky-bottom { stop-color: var(--sky-bottom); transition: stop-color 0.8s ease; }
.lake-top { stop-color: var(--lake-top); transition: stop-color 0.8s ease; }
.lake-bottom { stop-color: var(--lake-bottom); transition: stop-color 0.8s ease; }
.orb { fill: var(--orb); transition: fill 0.8s ease; }
.ridge-far { fill: var(--ridge-far); transition: fill 0.8s ease; }
.ridge-mid { fill: var(--ridge-mid); transition: fill 0.8s ease; }
.trees { fill: var(--spruce); }
.cabin path { fill: var(--spruce); }
.window { fill: var(--amber); }
.glow { fill: var(--amber); opacity: 0.35; }
.shore { stroke: var(--spruce); stroke-width: 3; }

.hero-text {
  max-width: 34rem;
  margin-top: 120px;
  padding: 28px 28px 30px;
  background: rgba(246, 248, 247, 0.92);
  border-left: 6px solid var(--amber);
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.lede {
  margin: 14px 0 22px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 30rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 13px 22px;
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: #EBB253; color: var(--ink); }
.btn-ghost { border-color: var(--spruce); color: var(--spruce); }
.btn-ghost:hover { background: var(--spruce); color: var(--paper); }

/* season switch */
.season-switch {
  align-self: flex-start;
  margin: 18px 0 0;
  padding: 6px;
  border: 0;
  background: var(--spruce);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.season-switch legend {
  float: left;
  padding: 9px 10px 9px 8px;
  color: #CFDCD7;
  font-size: 0.875rem;
}
.season-switch label {
  position: relative;
  padding: 8px 14px;
  border-radius: 4px;
  color: #E6EEEA;
  font-size: 0.9375rem;
  cursor: pointer;
}
.season-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.season-switch label:has(input:checked) {
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
}
.season-switch label:has(input:focus-visible) {
  outline: 3px solid #FFE2A8;
  outline-offset: 1px;
}

/* sections */
main { padding: 0 var(--gutter); }
main > section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 0 0;
}
.section-head { max-width: 40rem; margin-bottom: 28px; }
.section-head h2, .info h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 700; }
.section-head p { margin: 10px 0 0; color: var(--muted); }

/* rate table */
.rate-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-top: 3px solid var(--spruce);
}
.rate-table th, .rate-table td {
  padding: 18px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.rate-table thead th {
  font: 600 0.9375rem/1.3 var(--sans);
  color: var(--spruce);
}
.rate-table thead th span {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--muted);
}
.rate-table tbody th strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--spruce);
}
.rate-table tbody th span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 24rem;
}
.rate-table td {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  transition: background-color 0.4s ease, color 0.4s ease;
}
.rate-table [data-col].on { background: #FBEFD6; color: var(--ink); }
.rate-table thead th.on { box-shadow: inset 0 4px 0 var(--amber); }
.table-note { margin: 14px 0 0; font-size: 0.9375rem; color: var(--muted); }

@media (max-width: 680px) {
  .rate-table thead { display: none; }
  .rate-table, .rate-table tbody, .rate-table tr { display: block; }
  .rate-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    border-bottom: 1px solid var(--line);
  }
  .rate-table th, .rate-table td { border-bottom: 0; }
  .rate-table td { display: none; padding-left: 8px; }
  .rate-table td.on { display: block; background: transparent; }
  .rate-table td.on::after {
    content: " / night";
    font: 400 0.8125rem var(--sans);
    color: var(--muted);
  }
}

/* request form */
.request {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 16px;
  background: var(--paper);
  padding: 28px;
  border-top: 3px solid var(--spruce);
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: span 2; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #9FB0AA;
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
}
.field input[aria-invalid="true"] { border-color: #A2381F; box-shadow: 0 0 0 1px #A2381F; }

.estimate {
  grid-column: 1 / -1;
  display: block;
  padding: 14px 16px;
  background: var(--fog);
  border-left: 4px solid var(--slate);
  font-size: 1rem;
}
.estimate strong { font-family: var(--serif); font-size: 1.2rem; }
.request .btn { grid-column: 1 / 2; justify-self: start; }
.form-msg { grid-column: 2 / -1; margin: 0; align-self: center; font-weight: 500; }
.form-msg.error { color: #A2381F; }
.form-msg.sent { color: var(--spruce); }

@media (max-width: 760px) {
  .request { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; }
  .field.wide { grid-column: 1 / -1; }
  .request .btn, .form-msg { grid-column: 1 / -1; }
}

/* info */
.info dl { margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.info dt { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--spruce); }
.info dd { margin: 6px 0 0; color: var(--muted); max-width: 34rem; }
@media (max-width: 680px) { .info dl { grid-template-columns: 1fr; } }

.foot {
  margin-top: 88px;
  padding: 32px var(--gutter) 40px;
  background: var(--spruce);
  color: #DDE7E3;
}
.foot p { max-width: 44rem; margin: 0; }
.foot a { color: #FFE2A8; }

@media (max-width: 520px) {
  .hero { padding-bottom: 24px; }
  .hero-text { padding: 22px 20px; margin-top: 260px; }
  .scene { height: 62%; }
  .hero { background: var(--lake-bottom); }
  .season-switch legend { width: 100%; padding-bottom: 2px; }
}
