/* Wake — single stylesheet. System fonts only, no external CDN. */
:root {
  --brand: #0d7d8c;
  --brand-deep: #0a5b66;
  --brand-ink: #07343b;
  --accent: #f2a65a;
  --accent-deep: #e08a39;
  --ink: #12222b;
  --muted: #5b6b73;
  --faint: #5f7177;            /* darkened to meet WCAG AA (~5:1 on white) */
  --line: #e3e9ec;
  --bg: #ffffff;
  --bg-soft: #f4f8f9;
  --bg-deep: #eaf1f3;
  --card: #ffffff;
  --good: #1f9d63;
  --star: #bd7a1e;             /* darkened amber: meets 3:1 non-text contrast */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(16, 40, 50, .08);
  --shadow-lg: 0 24px 60px rgba(16, 40, 50, .16);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);     /* strong ease-out — built-in easings read as weak */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }

/* ---- accessibility: keyboard focus, skip link, screen-reader-only ---- */
:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.skip-link {
  position: absolute; left: 8px; top: -56px; z-index: 100;
  background: var(--brand); color: #fff; padding: .6em 1.05em; border-radius: 0 0 10px 10px;
  font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 0; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }

/* ---- modal (login window) ---- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(7, 52, 59, .5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms ease;
}
.modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-card {
  position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px 24px; width: 100%; max-width: 400px;
  transform: scale(0.96); transition: transform 220ms var(--ease-out);  /* modals keep center origin */
}
.modal.open .modal-card { transform: scale(1); }
.modal-close { position: absolute; top: 8px; right: 12px; background: transparent; border: 0; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--ink); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 650; cursor: pointer;
  padding: .8em 1.4em; border-radius: 999px; border: 1px solid transparent;
  transition: transform 120ms var(--ease-out), box-shadow .15s ease, background .15s ease;
  text-decoration: none; white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { text-decoration: none; transform: translateY(-1px); }
}
.btn:active { transform: scale(0.97); }                 /* felt press — confirms the tap was heard */
.btn:disabled, .btn[disabled] { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-accent { background: var(--accent); color: #3a2410; }
.btn-accent:hover { background: var(--accent-deep); color: #3a2410; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-lg { padding: 1em 1.7em; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---- top nav ---- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.3rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 26px; height: 26px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* Plain nav links only — never the "List your boat" .btn (its own styles must
   win, or the hover bg clobbers the button into white-on-near-white). */
.nav-links a:not(.btn) { color: var(--ink); font-weight: 600; padding: .5em .8em; border-radius: 8px; }
.nav-links a:not(.btn):hover { background: var(--bg-soft); text-decoration: none; }

/* ---- hero ---- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(242,166,90,.18), transparent 55%),
    linear-gradient(180deg, var(--bg-deep), var(--bg-soft));
  border-bottom: 1px solid var(--line);
}
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; padding: 64px 0 70px; }
.hero h1 span { color: var(--brand-deep); }
.hero .lede { font-size: 1.18rem; color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-trust { margin-top: 22px; color: var(--muted); font-size: .92rem; }
.hero-art { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.6); }

/* ---- search bar (hero) ---- */
.searchbar {
  margin-top: 26px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 8px; display: flex; gap: 8px; box-shadow: var(--shadow); max-width: 520px;
}
.searchbar input { flex: 1; border: 0; font: inherit; padding: .7em .8em; border-radius: 10px; background: var(--bg-soft); transition: box-shadow 150ms ease, background 150ms ease; }
.searchbar input:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--brand); }

/* ---- section headers ---- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 750; color: var(--brand); margin-bottom: 8px; }

/* ---- boat grid + cards ---- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* featured boats carousel (homepage) — native scroll-snap, no library */
.carousel { position: relative; }
.car-viewport { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px 2px 10px; }
.car-viewport::-webkit-scrollbar { display: none; }
.car-viewport.dragging { scroll-behavior: auto; scroll-snap-type: none; cursor: grabbing; }
.car-viewport > .card { scroll-snap-align: start; flex: 0 0 calc((100% - 44px) / 3); }
.car-arrow { position: absolute; top: 38%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand); font-size: 1.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 3; box-shadow: 0 4px 14px rgba(15,42,48,.12); transition: opacity .2s ease, transform .15s var(--ease-out), background .15s ease; }
.car-arrow.prev { left: -8px; } .car-arrow.next { right: -8px; }
.car-arrow:disabled { opacity: 0; pointer-events: none; }
.car-arrow:focus-visible, .car-dot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.car-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.car-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .2s ease, transform .2s var(--ease-out); }
.car-dot.active { background: var(--brand); transform: scale(1.3); }
@media (hover: hover) and (pointer: fine) { .car-arrow:hover { transform: translateY(-50%) scale(1.06); background: var(--bg-soft); } }
@media (max-width: 820px) { .car-viewport > .card { flex-basis: calc((100% - 22px) / 2); } }
@media (max-width: 560px) { .car-viewport > .card { flex-basis: 84%; } .car-arrow { display: none; } }
/* Flat, image-led cards (no surrounding box) — the rounded photo carries it. */
.card {
  display: flex; flex-direction: column; background: transparent;
  border: 0; border-radius: 0; box-shadow: none; color: inherit;
  transition: transform .12s var(--ease-out);
}
.card:active { transform: scale(0.99); }
.card .thumb {
  aspect-ratio: 5 / 3; background: var(--bg-deep);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-2px); text-decoration: none; }
  .card:hover .thumb { box-shadow: var(--shadow-lg); }
}
.card .body { padding: 12px 2px 2px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card .name { font-weight: 750; font-size: 1.06rem; letter-spacing: -0.01em; }
.card .lake { color: var(--muted); font-size: .9rem; }
.card .specrow { color: var(--faint); font-size: .85rem; margin-top: 2px; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price b { font-size: 1.12rem; }
.price .per { color: var(--muted); font-weight: 500; font-size: .85rem; }
.rate-pill { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; font-size: .9rem; color: var(--ink); }
.rate-pill .star { color: var(--star); }
.pill { display: inline-block; padding: .2em .7em; border-radius: 999px; background: var(--bg-deep); color: var(--brand-deep); font-size: .76rem; font-weight: 650; }
/* In a boat card, the category reads as subtle text (no tinted chip) so it blends with the white card. */
.card .pill { background: transparent; color: var(--muted); padding: 0; border-radius: 0; }

/* ---- filters (browse) ---- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer;
  padding: .5em 1em; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: transform .12s var(--ease-out), background .15s ease, border-color .15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .chip:hover { background: var(--bg-soft); }
}
.chip:active { transform: scale(0.97); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.search-input { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 999px; padding: .6em 1.1em; font: inherit; transition: border-color 150ms ease, box-shadow 150ms ease; }
.search-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 125, 140, .15); }
.result-count { color: var(--muted); font-size: .92rem; margin-left: auto; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---- loading skeletons (browse grid) — preserve grid rhythm while loading ---- */
.skeleton-card { display: flex; flex-direction: column; }
.skeleton-card .sk-thumb { aspect-ratio: 5 / 3; border-radius: var(--radius); background: var(--bg-deep); }
.skeleton-card .sk-line { height: 12px; border-radius: 6px; background: var(--bg-deep); margin-top: 10px; }
.skeleton-card .sk-line.short { width: 45%; }
@keyframes skPulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: no-preference) {
  .skeleton-card .sk-thumb, .skeleton-card .sk-line { animation: skPulse 1.2s ease-in-out infinite; }
}

/* ---- how it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step .n { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-deep); color: var(--brand-deep); font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }

/* ---- boat detail ---- */
.detail { display: grid; grid-template-columns: 1.45fr .9fr; gap: 34px; align-items: start; padding: 40px 0 70px; }
.detail .gallery { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.detail h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.detail .sub { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--muted); margin-bottom: 18px; }
.specgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0 8px; }
.specgrid .item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.specgrid .k { color: var(--faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.specgrid .v { font-weight: 700; }
.features { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.owner-line { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 750; }

/* ---- booking / forms ---- */
.bookcard {
  position: sticky; top: 84px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-lg);
}
.bookcard .price-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.bookcard .price-top b { font-size: 1.7rem; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: .82rem; font-weight: 650; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7em .8em; font: inherit; background: #fff; color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 125, 140, .15); }
.field textarea { min-height: 84px; resize: vertical; }
/* radio rows (pickup/delivery chooser) — reset from the full-width .field input look */
.radio { display: flex; align-items: center; gap: 8px; font-size: .92rem; padding: 4px 0; cursor: pointer; font-weight: 500; color: var(--ink); }
.radio input { width: auto; border: 0; padding: 0; margin: 0; box-shadow: none; flex: none; accent-color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.linebreak { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.pricerow { display: flex; justify-content: space-between; margin: 6px 0; color: var(--muted); }
.pricerow.total { color: var(--ink); font-weight: 750; font-size: 1.08rem; }
.note { font-size: .82rem; color: var(--faint); margin-top: 10px; }
.flash { border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px; font-weight: 600; display: none; }
.flash.ok { display: block; background: #e7f6ee; color: #0c6b3f; border: 1px solid #bce6cf; }
.flash.err { display: block; background: #fdecec; color: #9a2222; border: 1px solid #f3c9c9; }

/* ---- list-your-boat ---- */
.list-grid { display: grid; grid-template-columns: 1fr .95fr; gap: 34px; align-items: start; padding: 40px 0 70px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.estimator { background: linear-gradient(180deg, var(--bg-deep), #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.est-figure { font-size: 2.5rem; font-weight: 820; color: var(--brand-deep); letter-spacing: -0.02em; }
.est-sub { color: var(--muted); margin-top: -4px; }
.est-break { margin-top: 16px; }
.range { width: 100%; }
output.val { font-weight: 750; color: var(--ink); }

/* ---- footer ---- */
/* Scope footer styles to the actual <footer> — the boat card price row also
   uses class "foot", and the dark background was leaking onto it. */
footer.foot { background: var(--brand-ink); color: #cfe2e6; padding: 40px 0; margin-top: 20px; }
footer.foot a { color: #fff; }
.foot-in { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer.foot .brand { color: #fff; }
footer.foot small { color: #9fc1c7; }

/* ---- responsive ---- */
@media (max-width: 940px) {
  .hero-in { grid-template-columns: 1fr; padding: 44px 0 50px; }
  .hero-art { order: -1; }
  .grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .detail, .list-grid { grid-template-columns: 1fr; }
  .bookcard, .estimator { position: static; }
}
@media (max-width: 600px) {
  .grid, .steps { grid-template-columns: 1fr; }
  .nav-links a.hide-sm { display: none; }
  .specgrid { grid-template-columns: 1fr 1fr; }
}

/* ---- entrance motion (only when motion is welcome) ----
   Gated behind no-preference so reduced-motion users get the calm static layout
   (elements stay visible — never stuck at opacity:0). */
@keyframes riseIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flashIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  /* hero + how-it-works: a calm staggered rise on first paint (rare view → delight is licensed) */
  .hero h1, .hero .lede, .searchbar, .hero-trust, .steps .step {
    opacity: 0; animation: riseIn 360ms var(--ease-out) forwards;
  }
  .hero .lede { animation-delay: 60ms; }
  .searchbar { animation-delay: 110ms; }
  .hero-trust { animation-delay: 160ms; }
  .steps .step:nth-child(2) { animation-delay: 70ms; }
  .steps .step:nth-child(3) { animation-delay: 140ms; }
  /* browse grid: stagger ONLY on the first paint — filter re-renders stay instant */
  .grid.first-load .card { opacity: 0; animation: riseIn 300ms var(--ease-out) forwards; }
  .grid.first-load .card:nth-child(2) { animation-delay: 40ms; }
  .grid.first-load .card:nth-child(3) { animation-delay: 80ms; }
  .grid.first-load .card:nth-child(4) { animation-delay: 120ms; }
  .grid.first-load .card:nth-child(5) { animation-delay: 160ms; }
  .grid.first-load .card:nth-child(n+6) { animation-delay: 200ms; }
  /* booking success + flash messages settle in rather than hard-cut */
  .confirm-in { animation: riseIn 240ms var(--ease-out); }
  .flash.ok, .flash.err { animation: flashIn 180ms var(--ease-out); }
}

/* ---- respect reduced-motion preferences ----
   Kill entrance/looping animations, but KEEP transitions so opacity/colour/focus
   cues that aid comprehension survive (reduced ≠ none). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* brand logo image (replaces the old inline wave mark) */
.brand-logo{height:26px;width:auto;display:block}
.foot .brand-logo{height:24px;filter:brightness(0) invert(1)}
@media (max-width:560px){.brand-logo{height:22px}}
