/* ============================================================
   CodsView Beach House
   Palette: desaturated 70s photo print
   ============================================================ */

:root {
  --bg:      #efe6d0;
  --bg-2:    #e6dabf;
  --ink:     #3a2f1a;
  --ink-soft:#6a5c40;
  --a:       #a67c00;   /* mustard */
  --b:       #6b7a3a;   /* avocado */
  --c:       #c04e1a;   /* burnt sienna */
  --rule:    rgba(58, 47, 26, 0.18);
  --card:    rgba(255, 252, 244, 0.55);
  --shadow:  0 1px 2px rgba(58,47,26,.06), 0 12px 40px -18px rgba(58,47,26,.35);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Karla", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 78rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #1c1a14;
    --bg-2:    #24211a;
    --ink:     #ece2cb;
    --ink-soft:#a89b7e;
    --a:       #d9a83c;
    --b:       #9aab5e;
    --c:       #e2703a;
    --rule:    rgba(236, 226, 203, 0.18);
    --card:    rgba(255, 250, 235, 0.05);
    --shadow:  0 1px 2px rgba(0,0,0,.4), 0 16px 44px -20px rgba(0,0,0,.8);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.68;
  font-weight: 380;
  overflow-x: hidden;
}

/* ---- grain overlay (background axis) ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: screen; opacity: 0.05; }
}

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

a { color: inherit; }

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

/* ============================================================
   Scroll progress strip (motion axis) — a printed edge, not chrome
   ============================================================ */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--a), var(--c) 55%, var(--b));
  z-index: 10000;
  animation: fill linear both;
  animation-timeline: scroll(root block);
}
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--serif);
  font-variation-settings: "wdth" 92, "opsz" 30;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}
.wordmark span {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}
.wordmark.small { font-size: 1.35rem; }

.topnav {
  display: none;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topnav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.topnav a:hover { color: var(--ink); border-bottom-color: var(--c); }

.book-btn {
  margin-left: auto;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background .25s ease, color .25s ease;
}
.book-btn:hover { background: var(--ink); color: var(--bg); }

@media (min-width: 860px) {
  .topnav { display: flex; }
  .book-btn { margin-left: 0; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  background: var(--c);
  color: #fff8ec;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--c);
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--bg); }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.9rem, 11vw, 7.5rem);
  font-variation-settings: "wdth" 78, "opsz" 144, "SOFT" 0;
  animation: breathe 7s ease-in-out infinite;
}

h2 {
  font-size: clamp(2rem, 5.6vw, 3.9rem);
  font-variation-settings: "wdth" 88, "opsz" 100;
  margin-bottom: 1.1rem;
}
h2.breathe { animation: breathe 8s ease-in-out infinite; }

h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-variation-settings: "wdth" 96, "opsz" 40;
  margin-bottom: 0.4rem;
}

@keyframes breathe {
  0%, 100% { font-variation-settings: "wdth" 74, "opsz" 120; }
  50%      { font-variation-settings: "wdth" 122, "opsz" 120; }
}

.kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c);
  margin: 0 0 0.9rem;
}
.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--a);
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-variation-settings: "wdth" 96;
  line-height: 1.45;
  max-width: 34ch;
  margin: 1.2rem 0 1.8rem;
}
.section-lede {
  max-width: 62ch;
  color: var(--ink-soft);
  margin: 0 0 2.6rem;
}
.drop::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--c);
  font-variation-settings: "wdth" 80, "opsz" 144;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-2);
}
.hero-img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.02);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(28, 22, 10, 0.88) 0%,
    rgba(28, 22, 10, 0.55) 38%,
    rgba(28, 22, 10, 0.08) 72%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) clamp(2rem, 6vw, 4.5rem);
  max-width: 60rem;
  color: #f6efdd;
}
.hero-copy .eyebrow { color: #e8c46a; }
.hero-copy .lede { color: #e9e0cb; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.hero-actions .btn.ghost { color: #f6efdd; border-color: rgba(246,239,221,.6); }
.hero-actions .btn.ghost:hover { background: #f6efdd; color: #241d0e; border-color: #f6efdd; }

/* ============================================================
   Intro
   ============================================================ */
.intro { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.intro-grid {
  display: grid;
  gap: 1.4rem 3rem;
  margin-top: 1.6rem;
}
.intro-grid p { margin: 0; max-width: 68ch; }
.intro-grid p + p { color: var(--ink-soft); }
@media (min-width: 900px) {
  .intro-grid {
    grid-template-columns: 1.15fr 1fr;
    grid-template-rows: auto auto;
  }
  .intro-grid .drop { grid-row: span 2; font-size: 1.12rem; color: var(--ink); }
}

/* ============================================================
   Gallery — compact alternating sequence
   ============================================================ */
.gallery {
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  background: var(--bg-2);
}
.gallery h2 { margin-bottom: clamp(2rem, 5vw, 3.4rem); }

.shots {
  display: grid;
  gap: clamp(2.2rem, 5vw, 3.6rem);
}

.shot {
  margin: 0;
  display: grid;
  gap: 1rem;
  align-items: center;
}

.shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow);
  filter: saturate(0.85) contrast(1.03);
  transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .6s ease;
}
.shot:hover img { transform: scale(1.012); filter: saturate(0.95) contrast(1.04); }

.shot figcaption {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-left: 2px solid var(--c);
  padding-left: 0.9rem;
}

@media (min-width: 820px) {
  .shot {
    grid-template-columns: 1.35fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
  }
  .shot.flip img { order: 2; }
  .shot.flip figcaption { order: 1; }
}

/* ============================================================
   Rooms
   ============================================================ */
.rooms {
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  background: var(--bg);
}
.room-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.room-list li {
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 0;
  display: grid;
  gap: 0.35rem 2rem;
}
.room-no {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--c);
  font-variation-settings: "wdth" 80;
}
.room-meta {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}
.room-list p:last-child { margin: 0; max-width: 60ch; color: var(--ink-soft); }

@media (min-width: 820px) {
  .room-list li {
    grid-template-columns: 4rem 1fr 1.1fr;
    align-items: start;
    padding: 2rem 0;
  }
  .room-list li h3 { margin: 0; }
  .room-list li .room-meta { grid-column: 2; margin: 0; }
  .room-list li p:last-child { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
}

/* ============================================================
   Outside
   ============================================================ */
.outside { background: var(--bg-2); }
.outside-copy { padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.outside-grid {
  display: grid;
  gap: 2rem 3rem;
  margin-top: 1.4rem;
}
.outside-grid p { margin: 0; color: var(--ink-soft); }
@media (min-width: 760px) {
  .outside-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Practical
   ============================================================ */
.practical { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.practical-grid {
  display: grid;
  gap: 2.4rem 3.5rem;
}
@media (min-width: 760px) {
  .practical-grid { grid-template-columns: 1fr 1fr; }
}
.practical .col h3 {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1rem;
}
.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.ticks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.62rem;
  height: 1px;
  background: var(--c);
}
.ticks strong { color: var(--ink); font-weight: 600; }

.book-band {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.4rem;
  align-items: center;
}
.book-band p { margin: 0.4rem 0 0; color: var(--ink-soft); max-width: 52ch; }
@media (min-width: 800px) {
  .book-band { grid-template-columns: 1fr auto; }
}

/* ============================================================
   Area
   ============================================================ */
.area {
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  background: var(--bg-2);
}
.area-grid {
  display: grid;
  gap: 2rem 3.5rem;
  margin-top: 1.4rem;
}
.area-grid p { margin: 0; max-width: 62ch; }
.area-grid h3 { margin-bottom: 1rem; }
@media (min-width: 860px) {
  .area-grid { grid-template-columns: 1.1fr 1fr; }
}

/* ============================================================
   Closing
   ============================================================ */
.closing {
  padding: clamp(4rem, 12vw, 9rem) 0;
  text-align: center;
  background: var(--bg);
}
.closing-line {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  font-variation-settings: "wdth" 84, "opsz" 100;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0 auto 2rem;
  text-wrap: balance;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  gap: 1.6rem;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:last-child { text-align: right; }
}
.muted {
  color: var(--ink-soft);
  font-size: 0.86rem;
  margin: 0.5rem 0 0;
}
.muted a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.attribution {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.78rem;
}
.attribution a { color: var(--ink-soft); }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  h1, h2.breathe { animation: none; font-variation-settings: "wdth" 92, "opsz" 120; }
  .progress { animation: none; transform: scaleX(1); opacity: 0.5; }
  .shot img { transition: none; }
  .shot:hover img { transform: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
