/* ==========================================================================
   604 Beach House — design tokens
   Palette: whitewashed board + deep water teal + weathered driftwood,
   with hibiscus/citrus used only as sparing accents.
   Type: Fraunces (soft, wonky, hand-painted-sign display) + Karla (warm body)
   Signature motif: the "tide line" — a hand-drawn wave rule used instead of
   hairlines to divide sections and underline the active nav item.
   ========================================================================== */

:root {
  /* color */
  --sand:        #eef2ec;   /* whitewashed board — cooler/greener than a cream default */
  --sand-deep:   #e2e8de;
  --ink:         #1d3330;   /* near-black, tinted pine-teal */
  --ink-soft:    #3d5450;
  --deep-water:  #16414b;   /* primary dark */
  --lagoon:      #3e8e96;   /* primary accent, links, active states */
  --lagoon-soft: #cfe4e2;
  --seafoam:     #a8cbb7;
  --driftwood:   #b08968;
  --driftwood-soft: #e6dccb;
  --hibiscus:    #e15b64;   /* CTA / one hit of warmth — use sparingly */
  --citrus:      #f3a63d;   /* small badges / highlights only */
  --white:       #fffdf8;

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-utility: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.9rem + 1.75vw, 3.25rem);
  --step-4: clamp(3rem, 2.4rem + 3vw, 4.5rem);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 6px 18px -8px rgba(22, 65, 75, 0.28);
  --shadow-lift: 0 14px 34px -12px rgba(22, 65, 75, 0.35);

  --content-w: 1080px;
}

/* prefers-reduced-motion respected globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--lagoon); text-decoration-color: var(--seafoam); text-underline-offset: 3px; }
a:hover { color: var(--deep-water); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  color: var(--deep-water);
  margin: 0 0 0.4em;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; color: var(--ink); }

p { margin: 0 0 1em; }
.eyebrow {
  font-family: var(--font-utility);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--driftwood);
}

/* visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--citrus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout shell ---------- */
.wrap { max-width: var(--content-w); margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(238, 242, 236, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--sand-deep);
}
.site-header .wrap { max-width: 1360px; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--deep-water);
  display: grid; place-items: center;
  flex: none;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 80, "WONK" 1;
  color: var(--deep-water);
  font-size: 1.28rem;
  line-height: 1;
}
.brand-name small { display: block; font-family: var(--font-utility); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--driftwood); font-weight: 400; text-transform: uppercase; margin-top: 3px; }

.nav-toggle {
  display: none;
  background: var(--deep-water);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  width: 42px; height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
}

.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  display: inline-block;
  padding: 8px 9px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
  position: relative;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--deep-water); background: var(--lagoon-soft); }
.site-nav a[aria-current="page"] { color: var(--deep-water); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 3px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 8' preserveAspectRatio='none'%3E%3Cpath d='M0 4 Q7.5 0 15 4 T30 4 T45 4 T60 4' fill='none' stroke='%233e8e96' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x center / 30px 6px;
}

@media (max-width: 1150px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 64px 0 auto 0;
    background: var(--white);
    flex-direction: column;
    padding: 10px 20px 18px;
    border-bottom: 1px solid var(--sand-deep);
    box-shadow: var(--shadow-lift);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; font-size: 1.02rem; }
}

/* ---------- tide divider (signature element) ---------- */
.tide {
  width: 100%; height: 34px;
  display: block;
  color: var(--sand);
}
.tide.flip { transform: scaleY(-1); }
.tide--onwater { color: var(--deep-water); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--deep-water), #1c5560 70%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero .wrap { padding: 56px 20px 8px; }
.hero-kicker { color: var(--seafoam); }
.hero h1 { color: var(--white); }
.hero p.lead { color: #dcece9; max-width: 54ch; font-size: 1.1rem; }
.hero-photo-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 3px; margin: 28px 0 0;
}
.hero-photo-strip .ph {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(135deg, #1c5560, #1c5560 10px, #205f6b 10px, #205f6b 20px);
  display: flex; align-items: flex-end; padding: 8px;
  font-family: var(--font-utility); font-size: 0.66rem; color: #bfe0dc;
}

/* ---------- sections / cards ---------- */
.section { padding: 46px 0; }
.section--tight { padding: 30px 0; }
.section-head { max-width: 62ch; margin-bottom: 28px; }

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.card--postcard {
  border: 1px dashed var(--driftwood);
  background: var(--white);
}
.card h3, .card h4 { margin-bottom: 6px; }
.card-name-link { color: var(--deep-water); text-decoration: none; border-bottom: 2px solid var(--seafoam); }
.card-name-link:hover { color: var(--lagoon); border-bottom-color: var(--lagoon); }
.map-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-utility);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--driftwood);
  text-decoration: none;
  margin-top: 10px;
}
.map-link:hover { color: var(--deep-water); }
.map-link svg { width: 13px; height: 13px; flex: none; }
.tag {
  display: inline-block;
  font-family: var(--font-utility);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep-water);
  background: var(--lagoon-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin: 0 6px 6px 0;
}

.qa {
  border-left: 4px solid var(--seafoam);
  padding: 4px 0 4px 16px;
  margin: 0 0 20px;
}
.qa .q { font-weight: 700; color: var(--deep-water); margin: 0 0 4px; }
.qa .a { margin: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--deep-water);
  color: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.98rem;
}
.btn:hover { background: #123a43; color: var(--white); }
.btn--hibiscus { background: var(--hibiscus); }
.btn--hibiscus:hover { background: #c9424b; }
.btn--ghost { background: transparent; color: var(--deep-water); border: 2px solid var(--deep-water); }
.btn--ghost:hover { background: var(--lagoon-soft); color: var(--deep-water); }

.placeholder-note {
  font-family: var(--font-utility);
  font-size: 0.78rem;
  color: var(--driftwood);
  background: var(--driftwood-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 0 0 20px;
}

/* forms */
label { display: block; font-weight: 700; margin: 0 0 6px; font-size: 0.92rem; color: var(--deep-water); }
input[type="text"], input[type="password"], input[type="email"], textarea, select {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  border: 1.5px solid var(--sand-deep);
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
textarea { min-height: 100px; resize: vertical; }
.field-error { color: var(--hibiscus); font-size: 0.85rem; margin-top: -10px; margin-bottom: 14px; display: none; }

.gate-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--deep-water) 0%, #1c5560 55%, var(--sand) 55%);
  padding: 20px;
}
.gate-card {
  width: 100%; max-width: 420px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 32px 28px;
  text-align: center;
}
.gate-card .brand-mark { margin: 0 auto 14px; }
.gate-card h1 { font-size: var(--step-2); margin-bottom: 4px; }
.gate-card p { color: var(--ink-soft); }

footer.site-footer {
  background: var(--deep-water);
  color: #cfe4e2;
  margin-top: 40px;
}
footer.site-footer .wrap { padding: 30px 20px 34px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer.site-footer a { color: #eaf4f2; }
.compass { width: 26px; height: 26px; opacity: 0.85; }
.foot-note { font-family: var(--font-utility); font-size: 0.74rem; color: #9fc4bf; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--citrus); color: var(--ink); padding: 10px 16px; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.house-guide-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px;
}
.house-guide-nav a {
  font-family: var(--font-utility);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--deep-water);
  background: var(--white);
  border: 1px solid var(--sand-deep);
  padding: 8px 12px;
  border-radius: 999px;
}
.house-guide-nav a[aria-current="page"] { background: var(--deep-water); color: var(--white); border-color: var(--deep-water); }

.video-embed {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--sand-deep);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-family: var(--font-utility); color: var(--driftwood); font-size: 0.8rem;
  margin: 14px 0;
}

.map-embed {
  width: 100%;
  aspect-ratio: 4/3;
  min-height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--sand-deep);
  background: var(--sand-deep);
  display: grid; place-items: center;
  color: var(--driftwood); font-family: var(--font-utility); font-size: 0.8rem;
  overflow: hidden;
}
@media (min-width: 760px) {
  .map-embed { aspect-ratio: 16/9; min-height: 560px; }
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
}

.entry {
  border-bottom: 1px solid var(--sand-deep);
  padding: 16px 0;
}
.entry:last-child { border-bottom: none; }

.pull-quote {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: var(--step-1);
  color: var(--deep-water);
  border-left: 4px solid var(--citrus);
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  line-height: 1.4;
}
.pull-quote cite {
  display: block;
  font-family: var(--font-utility);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--driftwood);
  margin-top: 10px;
}

/* ---------- departure checklist ---------- */
.checklist-group { margin-bottom: 26px; }
.checklist-group h4 { margin-bottom: 4px; color: var(--deep-water); }
.checklist { margin-top: 10px; }
.checklist-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--sand-deep);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item input[type="checkbox"] {
  width: 21px; height: 21px; margin: 2px 0 0;
  accent-color: var(--lagoon);
  flex: none;
  cursor: pointer;
}
.checklist-item label { flex: 1; cursor: pointer; }
.checklist-item.checked label { text-decoration: line-through; color: var(--ink-soft); }

/* ---------- weather widget ---------- */
.wx-now { margin-bottom: 20px; }
.wx-now-main { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.wx-now-icon svg { width: 62px; height: 62px; display: block; }
.wx-now-temp {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  font-size: var(--step-4);
  color: var(--deep-water);
  line-height: 1;
}
.wx-now-details { min-width: 180px; }
.wx-now-cond { font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.wx-now-meta { margin: 0; color: var(--ink-soft); font-size: 0.85rem; }
.wx-error { color: var(--hibiscus); font-weight: 700; }
.wx-retry {
  display: inline-block; margin-top: 10px;
  background: none; border: 2px solid var(--hibiscus); color: var(--hibiscus);
  border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.85rem; cursor: pointer;
}

.wx-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.wx-day {
  flex: 0 0 108px;
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
}
.wx-day .d { font-family: var(--font-utility); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--driftwood); }
.wx-day svg { width: 32px; height: 32px; margin: 8px auto; display: block; }
.wx-day .hi { font-weight: 700; color: var(--deep-water); }
.wx-day .lo { color: var(--ink-soft); font-size: 0.85rem; margin-left: 4px; }
.wx-day .rain { font-family: var(--font-utility); font-size: 0.66rem; color: var(--lagoon); margin-top: 5px; }
.wx-day-surf { font-size: 1rem; margin: 4px 0 0; letter-spacing: 1px; }

/* ---------- surf check ---------- */
.surf-check { margin-bottom: 18px; }
.surf-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.surf-boards { font-size: 2.4rem; line-height: 1; letter-spacing: 2px; }
.surf-details h3 { margin: 0 0 4px; }
.surf-explain { margin: 0; color: var(--ink-soft); font-size: 0.92rem; max-width: 44ch; }

/* ---------- tide widget ---------- */
.wx-tide-today { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--sand-deep); }
.tide-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tide-chip {
  background: var(--lagoon-soft); color: var(--deep-water);
  border-radius: 999px; padding: 5px 12px;
  font-size: 0.82rem; font-weight: 700;
}
.tide-chip.low { background: var(--sand-deep); color: var(--ink-soft); }

.tide-section { margin-top: 34px; }
.attribution-note {
  font-family: var(--font-utility);
  font-size: 0.78rem;
  color: var(--driftwood);
  margin: 0 0 16px;
}
.tide-table { display: flex; flex-direction: column; gap: 8px; }
.tide-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--sand-deep); border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.tide-row .day {
  flex: 0 0 64px;
  font-family: var(--font-utility); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--driftwood);
}
.tide-events { display: flex; gap: 16px; flex-wrap: wrap; }
.tide-event { font-size: 0.9rem; color: var(--ink-soft); }
.tide-event .type { font-weight: 700; color: var(--lagoon); }
.tide-event.high .type { color: var(--deep-water); }
.tide-event .ht { color: var(--driftwood); font-family: var(--font-utility); font-size: 0.78rem; }

/* ---------- tide table ---------- */
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid--4 { grid-template-columns: 1fr; } }

.tide-day .d { font-family: var(--font-utility); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--driftwood); margin-bottom: 10px; }
.tide-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--sand-deep); }
.tide-row:last-child { border-bottom: none; }
.tide-badge {
  font-family: var(--font-utility);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 8px;
  flex: none;
}
.tide-badge.high { background: var(--lagoon-soft); color: var(--deep-water); }
.tide-badge.low { background: var(--driftwood-soft); color: var(--driftwood); }
.tide-row .t { font-weight: 700; color: var(--ink); font-size: 0.88rem; }
.tide-row .h { margin-left: auto; color: var(--ink-soft); font-size: 0.82rem; }
.entry .who { font-weight: 700; color: var(--deep-water); }
.entry .when { font-family: var(--font-utility); font-size: 0.72rem; color: var(--driftwood); }
