/* ============================================================
   SURFSIDE OCEAN — design tokens (single source; off-token = defect)
   Conviction: the Oregon Coast shot like an expedition —
   sea-fog cinema over driftwood paper, one buoy-orange accent.
   ============================================================ */
@font-face {
  font-family: "Fraunces";
  src: url(fonts/fraunces-var.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url(fonts/fraunces-var-italic.woff2) format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url(fonts/inter-tight-var.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* color — PNW coast, no pure white/black */
  --ground: #f4f1ea;
  --ground-2: #e9e5da;
  --ground-3: #d9d3c4;
  --ink: #22323a;
  --ink-faded: rgba(34, 50, 58, 0.62);
  --deep: #0d1418;
  --deep-2: #16222a;
  --paper-on-deep: #ece7db;
  --accent: #e8622c;
  --hairline: rgba(34, 50, 58, 0.18);

  /* type */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --display-tune: "opsz" 144, "SOFT" 0, "WONK" 0;
  --size-hero: clamp(3.25rem, 11vw, 12.5rem);
  --size-h2: clamp(2.25rem, 4vw, 3.5rem);
  --size-h3: clamp(1.375rem, 2vw, 1.75rem);
  --size-body: 1.1875rem;
  --size-label: 0.75rem;
  --track-label: 0.14em;

  /* space */
  --sect: clamp(7rem, 18vw, 20rem);
  --sect-half: clamp(3.5rem, 9vw, 10rem);
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --measure: 48ch;
  --container: 75rem;

  /* motion (transcribed from reference stylesheet) */
  --ease-wd: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.5, 1, 0.89, 1);
  --ease-img: cubic-bezier(0.16, 1, 0.3, 1);
  --t-house: 0.45s var(--ease-wd);
  --t-micro: 0.3s var(--ease-out);

  --radius-pill: 100rem;
  --radius-md: 0.5rem;
}

/* ============ reset-ish ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 460;
  font-size: var(--size-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* grain — one texture system (G4): fog grain on paper grounds */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

.label {
  font-size: var(--size-label);
  font-weight: 560;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faded);
}
.display {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
}

/* ============ nav ============ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad-x);
  color: var(--paper-on-deep);
  transition: var(--t-house);
}
.site-nav.is-scrolled {
  background: rgba(13, 20, 24, 0.55);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}
.nav-brand {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 560;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav-brand em { font-style: italic; font-weight: 460; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: var(--size-label);
  font-weight: 560;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size var(--t-micro);
}
.nav-links a:hover, .nav-links a:focus-visible { background-size: 100% 1px; }
.nav-phone { font-size: var(--size-label); letter-spacing: 0.06em; text-decoration: none; font-weight: 560; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ============ hero ============ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--deep);
  color: var(--paper-on-deep);
  display: flex;
  align-items: flex-end;
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}
.hero.is-live .hero-media { animation: hero-drift 26s var(--ease-img) both; }
@keyframes hero-drift { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,20,24,.55) 0%, rgba(13,20,24,0) 40%);
}
.hero-inner {
  position: relative;
  width: 100%;
  padding: 0 var(--pad-x) 9vh;
}
/* hidden state lives only in the keyframes (backwards fill): if animations
   are frozen or JS fails, the computed static style is fully visible */
.hero.is-live .hero-reveal {
  animation: rise-open 1s var(--ease-wd) 0.15s backwards;
}
@keyframes rise-open {
  from { clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); transform: translateY(3rem); }
  to   { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translateY(0); }
}
.hero h1 { font-weight: 460; line-height: 1; }
.hero-place {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 560;
  font-size: var(--size-hero);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero-sub {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-style: italic;
  font-weight: 460;
  font-size: var(--size-h3);
  letter-spacing: 0;
  text-transform: none;
}
/* sea-fog dissolve out of the hero */
.fog-seam {
  position: relative;
  height: clamp(8rem, 18vw, 16rem);
  margin-top: -1px;
  background:
    linear-gradient(to bottom, rgba(13,20,24,1) 0%, rgba(13,20,24,0) 45%),
    linear-gradient(to top, var(--ground) 30%, rgba(244,241,234,0) 100%),
    var(--deep-2);
}
.fog-seam::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='260'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.05' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.957 0 0 0 0 0.945 0 0 0 0 0.918 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='900' height='260' filter='url(%23f)'/%3E%3C/svg%3E");
  background-size: 900px 260px;
  opacity: 0.75;
  mix-blend-mode: screen;
}

/* ============ sections ============ */
main { display: block; }
.passage {
  padding: var(--sect) var(--pad-x);
  text-align: center;
}
.passage .label { display: block; margin-bottom: 2.5rem; }
.passage-lede {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 460;
  font-size: var(--size-h2);
  line-height: 1.15;
  max-width: 24ch;
  margin: 0 auto 2rem;
  letter-spacing: -0.01em;
}
.passage-lede em { font-style: italic; }
.passage p:not(.passage-lede) {
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--ink-faded);
}

/* full-bleed opener band with title over image */
.opener {
  position: relative;
  height: clamp(24rem, 70vh, 44rem);
  overflow: hidden;
  color: var(--paper-on-deep);
  display: grid;
  place-items: center;
  background: var(--deep-2);
}
.opener img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-img);
}
.opener::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(13, 20, 24, 0.28);
}
.opener h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 560;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
}

/* tide-line hairline divider */
.tideline {
  display: block;
  width: min(28rem, 70vw);
  margin: 0 auto;
  color: var(--hairline);
}

/* ============ rooms ============ */
.cards {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sect-half) var(--pad-x) var(--sect);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--ground-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--ground-3); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-img); }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { padding: 1.75rem 1.75rem 2rem; }
.card-body h3 {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 560;
  font-size: var(--size-h3);
  margin-bottom: 0.6rem;
}
.card-body p { font-size: 1rem; color: var(--ink-faded); }
.card-body .label { display: block; margin-bottom: 0.9rem; color: var(--accent); }

/* amenity ledger */
.ledger {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--pad-x) var(--sect);
  list-style: none;
}
.ledger li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.ledger li:first-child { border-top: 1px solid var(--hairline); }
.ledger .what {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 460;
  font-size: 1.25rem;
}
.ledger .how { font-size: 0.9375rem; color: var(--ink-faded); text-align: right; }

/* ============ coast map ============ */
.coast {
  background: var(--ground-2);
  padding: var(--sect) var(--pad-x);
}
.coast-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
@media (max-width: 900px) { .coast-grid { grid-template-columns: 1fr; } }
.coast-map { width: 100%; height: auto; }
.coast-map .shore { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0.55; }
.coast-map .water { fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0.14; }
.coast-map text {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--ink);
}
.marker { fill: var(--accent); }
.marker-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  transform-origin: center;
  transform-box: fill-box;
  animation: pulsed 2.6s ease-out infinite;
}
@keyframes pulsed {
  0% { opacity: 1; transform: scale(1); }
  59.9% { opacity: 0; transform: scale(5); }
  60%, 100% { opacity: 0; transform: scale(1); }
}
.coast-list { list-style: none; }
.coast-list li { padding: 1.4rem 0; border-bottom: 1px solid var(--hairline); }
.coast-list h3 {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 560;
  font-size: var(--size-h3);
}
.coast-list .dist { color: var(--accent); font-size: var(--size-label); font-weight: 560; letter-spacing: var(--track-label); text-transform: uppercase; }
.coast-list p { font-size: 1rem; color: var(--ink-faded); margin-top: 0.35rem; }

/* ============ planning strip ============ */
.plan { padding: var(--sect) 0; }
.plan-head { text-align: center; padding: 0 var(--pad-x); margin-bottom: 3.5rem; }
.plan-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(17rem, 22rem);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem var(--pad-x) 1.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--ground-3) transparent;
}
.step {
  scroll-snap-align: start;
  background: var(--ground-2);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem 2.25rem;
}
.step-num {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-style: italic;
  font-weight: 460;
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 1.1rem;
}
.step h3 {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 560;
  font-size: var(--size-h3);
  margin-bottom: 0.5rem;
}
.step p { font-size: 1rem; color: var(--ink-faded); }

/* ============ quote passage ============ */
.quote { background: var(--deep); color: var(--paper-on-deep); }
.quote .passage-lede { max-width: 28ch; }
.quote .label { color: rgba(236, 231, 219, 0.55); }
.quote p:not(.passage-lede) { color: rgba(236, 231, 219, 0.72); }

/* ============ booking band + footer ============ */
.book {
  background: var(--deep);
  color: var(--paper-on-deep);
  text-align: center;
  padding: var(--sect-half) var(--pad-x) var(--sect-half);
}
.book .passage-lede { margin-bottom: 2.5rem; }
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--size-label);
  font-weight: 620;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-on-deep);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 1.1rem 2.4rem;
  transition: var(--t-micro);
}
.btn:hover, .btn:focus-visible { background: transparent; color: var(--accent); }
.book .meta { margin-top: 2rem; font-size: 0.9375rem; color: rgba(236, 231, 219, 0.6); }
.book .meta a { color: inherit; }

footer {
  background: var(--deep);
  color: rgba(236, 231, 219, 0.6);
  padding: 3rem var(--pad-x) 4rem;
  border-top: 1px solid rgba(236, 231, 219, 0.14);
}
.foot-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  font-size: 0.9375rem;
}
footer a { color: inherit; text-decoration-color: rgba(236,231,219,.3); }
footer .brand {
  font-family: var(--font-display);
  font-variation-settings: var(--display-tune);
  font-weight: 560;
  font-size: 1.25rem;
  color: var(--paper-on-deep);
}

/* ============ floating booking dock ============ */
.dock {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(160%);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(13, 20, 24, 0.72);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(236, 231, 219, 0.16);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  color: var(--paper-on-deep);
  transition: transform var(--t-house);
}
.dock.is-in { transform: translateX(-50%) translateY(0); }
.dock .dock-note { font-size: 0.875rem; white-space: nowrap; }
.dock .btn { padding: 0.8rem 1.6rem; }
@media (max-width: 560px) { .dock .dock-note { display: none; } }

/* ============ reveals (JS adds .js; no-JS renders final state) ============ */
.js .reveal {
  opacity: 0;
  transform: translateY(3rem);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--stagger, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ============ reduced motion: final states, instantly ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .hero.is-live .hero-media { animation: none; transform: none; }
  .hero.is-live .hero-reveal { animation: none; clip-path: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
  .marker-pulse { animation: none; opacity: 0; }
}
