/* ============================================================
   Reef Pass Marine — design tokens
   ============================================================ */
:root {
  /* brand accents — constant across themes */
  --coral: #ff6a4d;
  --coral-dark: #e6512f;
  --sun: #f2b84b;
  --sea-glass: #8fc7b8;
  --ink: #072024;

  /* raw palette (used to build theme-aware roles below) */
  --deep-reef: #0b2b30;
  --deep-reef-2: #0e3339;
  --lagoon: #135e63;
  --lagoon-soft: #1c7278;
  --foam: #f3efe4;
  --foam-dim: #d9d3c2;

  /* theme roles — dark theme is the default */
  --bg: var(--deep-reef);
  --bg-alt: var(--deep-reef-2);
  --surface: var(--deep-reef);
  --surface-alt-start: var(--lagoon);
  --surface-alt-end: rgb(19 94 99 / 0.35);
  --surface-tint: rgb(var(--line) / 0.04);
  --text: var(--foam);
  --text-dim: var(--foam-dim);
  --label: var(--sea-glass);
  --nav-bg: rgb(var(--nav-tint) / 0.72);
  --highlight: var(--sun);
  --icon-accent: var(--sun);

  /* RGB triplets for alpha-composited borders/overlays, theme-aware */
  --line: 243 239 228;      /* foam, for hairline borders on dark surfaces */
  --nav-tint: 11 43 48;     /* deep-reef, for the nav blur backdrop */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --max-w: 1180px;
  --radius: 14px;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

:root[data-theme="light"] {
  --bg: #f6f3ea;
  --bg-alt: #ebe5d5;
  --surface: #fffdf8;
  --surface-alt-start: #dff0ec;
  --surface-alt-end: rgb(143 199 184 / 0.25);
  --text: #0b2b30;
  --text-dim: #3c5457;
  --label: #12767a;
  --line: 11 43 48;         /* deep-reef, for hairline borders on light surfaces */
  --nav-tint: 246 243 234;  /* bg color, for the nav blur backdrop */
  --highlight: var(--coral-dark);
  --icon-accent: var(--coral-dark);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--label);
  display: inline-block;
}

button, .btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 28px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--coral);
  color: var(--ink);
}
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-2px); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgb(var(--line) / 0.3);
}
.btn-ghost:hover { border-color: var(--sea-glass); background: rgb(143 199 184 / 0.08); }

/* theme toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid rgb(var(--line) / 0.25);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-left: 8px;
}
.theme-toggle:hover { border-color: var(--sea-glass); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

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

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(var(--line) / 0.08);
  transition: background var(--transition), border-color var(--transition);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.logo svg { width: 30px; height: 30px; }

.nav-right { display: flex; align-items: center; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.92rem;
}

.nav-links a {
  opacity: 0.85;
  transition: opacity var(--transition);
  position: relative;
}
.nav-links a:hover { opacity: 1; }

.nav-cta { display: none; }
@media (min-width: 720px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px;
}
@media (max-width: 719px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 76px; left: 0; right: 0;
  background: var(--bg-alt);
  padding: 20px 24px 28px;
  gap: 18px;
  border-bottom: 1px solid rgb(var(--line) / 0.08);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 76px;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgb(7 20 22 / 0.88) 0%, rgb(7 20 22 / 0.62) 42%, rgb(7 20 22 / 0.25) 68%, rgb(7 20 22 / 0.15) 100%),
    linear-gradient(0deg, rgb(7 20 22 / 0.55) 0%, transparent 30%);
}

.contour-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
  z-index: 1;
}

.contour-bg path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1;
  opacity: 0.25;
}
.contour-bg path.hl { stroke: var(--sun); opacity: 0.4; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding-top: 60px;
  padding-bottom: 80px;
}

.hero h1 {
  font-size: clamp(2.2rem, 8vw, 4.4rem);
  line-height: 1.08;
  margin-bottom: 22px;
  color: #f3efe4;
}
.hero h1 em {
  font-style: italic;
  color: var(--sun);
}

.hero p.lede {
  font-size: 1.15rem;
  color: #d9d3c2;
  max-width: 540px;
  margin-bottom: 34px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

.instrument {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  border-top: 1px solid rgb(243 239 228 / 0.2);
  padding-top: 24px;
  max-width: 640px;
}

.instrument-item .val {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: #f3efe4;
}
.instrument-item .lbl {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sea-glass);
  margin-top: 2px;
}

/* ============================================================
   Section shells
   ============================================================ */
section { position: relative; padding: 110px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .hero-content { padding-top: 40px; padding-bottom: 56px; }
  .instrument { gap: 20px 28px; }
  .hero-ctas { gap: 12px; }
  .btn, button { padding: 13px 22px; font-size: 0.9rem; }
}

.divider {
  height: 64px;
  width: 100%;
  overflow: hidden;
}
.divider svg { width: 100%; height: 100%; }
.divider path { stroke: var(--sea-glass); stroke-width: 1; fill: none; opacity: 0.4; }

/* ============================================================
   Services
   ============================================================ */
.services { background: var(--bg-alt); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: linear-gradient(160deg, var(--surface-alt-start), var(--surface-alt-end));
  border: 1px solid rgb(143 199 184 / 0.18);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform var(--transition), border-color var(--transition);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--sea-glass); }

.service-card .icon { width: 40px; height: 40px; margin-bottom: 22px; color: var(--icon-accent); }
.service-card .data-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 10px;
}
.service-card h3 { font-size: 1.35rem; margin-bottom: 10px; color: var(--text); }
.service-card p { color: var(--text-dim); font-size: 0.96rem; }

/* ============================================================
   Gallery
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgb(var(--line) / 0.12);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.4,0,.2,1);
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px;
  background: linear-gradient(0deg, rgb(7 20 22 / 0.82), transparent);
  color: #f3efe4;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ============================================================
   Fleet
   ============================================================ */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.boat-card {
  background: var(--surface);
  border: 1px solid rgb(var(--line) / 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.boat-illustration {
  height: 180px;
  background: linear-gradient(180deg, var(--lagoon-soft), var(--deep-reef-2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.boat-illustration svg { width: 68%; }

.boat-body { padding: 26px; }
.boat-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.boat-body .sub { color: var(--label); font-size: 0.85rem; margin-bottom: 18px; }

.spec-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 8px 0;
  border-top: 1px solid rgb(var(--line) / 0.08);
  color: var(--text-dim);
}
.spec-row span:last-child { color: var(--text); }

/* ============================================================
   Booking
   ============================================================ */
.booking { background: var(--bg-alt); }
.booking-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .booking-layout { grid-template-columns: 1fr; }
}

.form-card {
  background: var(--surface);
  border: 1px solid rgb(var(--line) / 0.1);
  border-radius: var(--radius);
  padding: 36px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid rgb(var(--line) / 0.16);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sea-glass);
  outline: none;
}
.field textarea { resize: vertical; min-height: 90px; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid rgb(var(--line) / 0.2);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  user-select: none;
}
.chip input { display: none; }
.chip:has(input:checked) {
  background: rgb(255 106 77 / 0.16);
  border-color: var(--coral);
  color: var(--coral-dark);
}

.form-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

#form-status {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--label);
}

/* payment aside */
.pay-aside h3 { font-size: 1.25rem; margin-bottom: 14px; }
.pay-aside > p { color: var(--text-dim); margin-bottom: 26px; font-size: 0.95rem; }

.pay-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.pay-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border: 1px solid rgb(var(--line) / 0.2);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--text);
  background: var(--surface-tint);
}

.step-list { list-style: none; margin: 0; padding: 0; }
.step-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgb(var(--line) / 0.1);
  font-size: 0.92rem;
  color: var(--text-dim);
}
.step-list li .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-item { margin-bottom: 22px; }
.contact-item .lbl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 6px;
}
.contact-item .val { font-size: 1.05rem; }
.contact-item a:hover { color: var(--coral-dark); }

.map-embed {
  border: 1px solid rgb(var(--line) / 0.15);
  border-radius: var(--radius);
  min-height: 320px;
  overflow: hidden;
  background: var(--bg-alt);
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
  filter: grayscale(0.15) contrast(1.02);
}
:root[data-theme="dark"] .map-embed iframe { filter: invert(92%) hue-rotate(180deg) contrast(0.88) brightness(0.95); }

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid rgb(var(--line) / 0.1);
  padding: 40px 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
