/* ==========================================================================
   Sound Yacht Charters
   Rebuilt from the approved design (docs/approved-design.html).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy: #1a2348;
  --navy-2: #232e5c;
  --rule-dark: #333f72;
  --rule-dark-2: #3a467a;
  --blue: #3872b5;
  --link: #2c5f9c;
  --sky: #9cc0ea;
  --mist: #eef3f9;
  --mist-2: #dfe7f2;
  --line: #cfd9e8;
  --input-border: #9fb2cc;
  --text-muted: #3b4466;
  --text-muted-2: #4a5576;
  --on-navy: #c3cfe4;
  --on-navy-link: #d6e2f1;
  --nav-hover: #cfe0f5;
  --white: #ffffff;
  --error: #b3261e;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --container: 1280px;
  --gutter: 32px;
  --section-y: 112px;
  --radius: 4px;
  --radius-pill: 999px;
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --section-y: 72px;
  }
}

/* ---------- Base ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--link); }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.on-navy :focus-visible { outline-color: var(--sky); }

img { max-width: 100%; }
picture { display: block; }
input, select, textarea, button { font: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }

section[id], header[id] { scroll-margin-top: 24px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  box-sizing: border-box;
}

.section > .container {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section--mist { background: var(--mist); }

.on-navy {
  background: var(--navy);
  color: var(--white);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
}
.split--top { align-items: flex-start; }
.split--center { align-items: center; }

/* ---------- Type ---------- */
.eyebrow {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--link);
}
.on-navy .eyebrow { color: var(--sky); }

.h1,
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
}
.h1 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.02;
}
.h2 {
  margin-bottom: 20px;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
}
.h2--flush { margin-bottom: 0; }

.lead {
  margin-bottom: 18px;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 26px;
  background: var(--white);
  color: var(--navy);
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: var(--navy); }

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn--outline:hover { color: var(--white); }

.btn--navy {
  min-height: 52px;
  padding: 0 32px;
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
}
.btn--navy:hover { color: var(--white); background: var(--navy-2); }
.btn--navy[disabled] { opacity: 0.7; cursor: progress; }

/* ---------- Wave divider ---------- */
.wave {
  line-height: 0;
  background: var(--white);
}
.wave svg {
  display: block;
  width: 100%;
  height: 90px;
}
.wave__crest { fill: var(--blue); }
.wave__body { fill: var(--navy); }

.wave--hero {
  position: relative;
  background: none;
}
.wave--hero svg { height: 72px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* Photo ratio (1659 × 948) between 460 and 820px tall. The design used
     aspect-ratio + min-height, which forced an 805px min-width on phones. */
  height: clamp(460px, calc(100vw * 948 / 1659), 820px);
  display: flex;
  flex-direction: column;
  background: var(--navy);
  overflow: hidden;
}
.hero > picture {
  position: absolute;
  inset: 0;
}
.hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.hero__scrim {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 140px;
  background: linear-gradient(rgba(16, 24, 56, 0.55), rgba(16, 24, 56, 0));
}
.hero__spacer { flex: 1; }

/* ---------- Site nav ---------- */
.site-nav {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 24px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.site-nav a {
  color: var(--white);
  text-decoration: none;
}
.site-nav a:hover { color: var(--nav-hover); }

.site-nav__logo {
  display: block;
  line-height: 0;
}
.site-nav__logo img {
  width: 260px;
  height: auto;
}

.site-nav__actions,
.site-nav__menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-nav__menu {
  padding: 0;
  list-style: none;
}

.site-nav .site-nav__cta {
  padding: 12px 20px;
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius-pill);
}
.site-nav .site-nav__cta:hover { color: var(--navy); }

.site-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.site-nav__icon-close,
.site-nav__toggle[aria-expanded="true"] .site-nav__icon-open { display: none; }
.site-nav__toggle[aria-expanded="true"] .site-nav__icon-close { display: block; }

@media (max-width: 800px) {
  .site-nav { flex-wrap: nowrap; gap: 16px; }
  .site-nav__logo { flex: 0 1 auto; min-width: 0; }
  .site-nav__logo img { width: 200px; }
  .site-nav__actions { flex-wrap: nowrap; gap: 10px; }
  .site-nav__cta { white-space: nowrap; }

  /* JS enhances the menu into a toggled panel; without JS it simply wraps. */
  .js .site-nav__toggle { display: inline-flex; }
  .js .site-nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    background: var(--navy);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(10, 16, 40, 0.35);
    font-size: 17px;
  }
  .js .site-nav__menu.is-open { display: flex; }
  .js .site-nav__menu a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 20px;
  }
  .js .site-nav__menu li + li { border-top: 1px solid var(--rule-dark); }

  .no-js .site-nav { flex-wrap: wrap; }
  .no-js .site-nav__actions { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .site-nav__logo img { width: 140px; }
  .site-nav .site-nav__cta {
    padding: 10px 14px;
    font-size: 14px;
    letter-spacing: 0;
  }
  .site-nav__actions { gap: 8px; }
  .site-nav__toggle { width: 44px; height: 44px; }
}

/* ---------- Intro ---------- */
.intro__inner {
  padding-top: 40px;
  padding-bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
}
.intro__heading {
  flex: 1 1 520px;
  min-width: 0;
}
.intro__body {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 480px;
}
.intro__body p {
  margin-bottom: 24px;
  color: var(--on-navy);
}

/* ---------- Quick facts ---------- */
.facts__grid {
  margin: 0 auto;
  padding-top: 32px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule-dark);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.fact {
  display: flex;
  flex-direction: column-reverse;
}
.fact__value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
}
.fact__label {
  margin-top: 6px;
  font-size: 14px;
  color: var(--on-navy);
}

/* ---------- The experience ---------- */
.experience__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 64px;
  margin-bottom: 48px;
}
.experience__heading { flex: 1 1 360px; }
.experience__lead {
  flex: 1 1 420px;
  max-width: 560px;
  margin-bottom: 0;
}

.day {
  margin: 0 0 56px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 32px;
}
@media (min-width: 600px) { .day { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .day { grid-template-columns: repeat(4, 1fr); } }
.day__stop {
  padding-top: 18px;
  border-top: 2px solid var(--line);
}
.day__when {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link);
}
.day__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}
.day__text {
  font-size: 16px;
  color: var(--text-muted);
}

/* 4-column mosaic: one 2x2 feature, four tiles, a full-width strip. */
.mosaic {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 240px;
  gap: 16px;
}
@media (min-width: 640px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .mosaic__item--feature,
  .mosaic__item--wide { grid-column: 1 / -1; }
  .mosaic__item--feature { grid-row: span 2; }
}
@media (min-width: 960px) {
  .mosaic { grid-template-columns: repeat(4, 1fr); }
  .mosaic__item--feature { grid-column: span 2; }
}
.mosaic__item {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--mist);
}
.mosaic__item picture { height: 100%; }
.mosaic__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mosaic__place {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 16px 12px;
  background: linear-gradient(to top, rgba(26, 35, 72, 0.78), rgba(26, 35, 72, 0));
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.credits {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted-2);
}
.credits a { color: inherit; }

/* ---------- The yacht ---------- */
.section--yacht > .container { padding-bottom: calc(var(--section-y) - 16px); }
.yacht__main {
  flex: 1 1 440px;
  min-width: 0;
}
.lead--last { margin-bottom: 32px; }

.checklist {
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 28px;
  font-size: 16px;
}
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.checklist .icon {
  flex: none;
  margin-top: 3px;
  color: var(--blue);
}

.spec-box {
  flex: 1 1 400px;
  min-width: 0;
  padding: 40px;
  background: var(--mist);
  border-radius: var(--radius);
}
.spec-box__title {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th,
.spec-table td { padding: 12px 0; }
.spec-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted-2);
}
.spec-table td {
  text-align: right;
  font-weight: 700;
}

/* ---------- Charters ---------- */
.section--charters > .container {
  padding-top: calc(var(--section-y) - 40px);
}
.charters__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}
.charters__heading { max-width: 640px; }
.charters__intro {
  max-width: 420px;
  color: var(--on-navy);
}

/* Flex rather than grid so a short last row sits centred. 3 / 2 / 1 columns. */
.card-grid {
  --cols: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
@media (min-width: 640px) { .card-grid { --cols: 2; } }
@media (min-width: 960px) { .card-grid { --cols: 3; } }
.card-grid > .card {
  box-sizing: border-box;
  flex: 0 0 calc((100% - (var(--cols) - 1) * 24px) / var(--cols));
  min-width: 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px;
  background: var(--navy-2);
  border-radius: var(--radius);
}
.card__icon { color: var(--sky); }
.card__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
}
.card__text {
  flex: 1;
  color: var(--on-navy);
}
.card__foot {
  padding-top: 14px;
  border-top: 1px solid var(--rule-dark-2);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.card--light {
  background: var(--white);
  color: var(--navy);
}
.card--light .card__icon { color: var(--link); }
.card--light .card__text { color: var(--text-muted); }
.card--light .card__foot {
  border-top-color: var(--line);
  color: var(--link);
  text-decoration: none;
}
.card--light a.card__foot:hover { color: var(--navy); }

/* ---------- Gallery ---------- */
.h2--gallery { margin-bottom: 40px; }

/* Flex so a short last row sits centred. 3 / 2 / 1 columns. */
.gallery-grid {
  --cols: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
@media (min-width: 640px) { .gallery-grid { --cols: 2; } }
@media (min-width: 960px) { .gallery-grid { --cols: 3; } }
.gallery-grid > * {
  flex: 0 0 calc((100% - (var(--cols) - 1) * 16px) / var(--cols));
  min-width: 0;
}

.gallery__img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
}
.gallery__img--left { object-position: 22% 50%; } /* keep Gary in frame */

.gallery__link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
}
.gallery__link .gallery__img { transition: transform 0.4s ease; }
@media (hover: hover) {
  .gallery__link:hover .gallery__img { transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .gallery__link .gallery__img { transition: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 19, 40, 0.96);
  color: var(--white);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(14, 19, 40, 0.6); }
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 64px 72px 24px;
  box-sizing: border-box;
  max-width: 100%;
  max-height: 100%;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox__caption {
  max-width: 720px;
  font-size: 15px;
  text-align: center;
  color: var(--on-navy);
}
.lightbox__count {
  margin-right: 8px;
  font-weight: 700;
  color: var(--white);
}
.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev,
.lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
@media (max-width: 640px) {
  .lightbox__figure { padding: 64px 12px 84px; }
  .lightbox__img { max-height: calc(100dvh - 190px); }
  .lightbox__prev,
  .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
}

.photo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  background: var(--mist);
  border: 1px dashed var(--input-border);
  border-radius: var(--radius);
  color: var(--text-muted-2);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.about__photo {
  flex: 0 1 400px;
  min-width: 0;
}
.about__img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: 66% 40%; /* keep Gary & Jeanette in frame */
  border-radius: var(--radius);
}

/* ---------- About ---------- */
.about__body {
  flex: 1 1 480px;
  min-width: 0;
}
.about__bio { margin-bottom: 28px; }

.credentials {
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Request ---------- */
.request__intro {
  flex: 1 1 340px;
  min-width: 0;
}
.request__lead { margin-bottom: 0; }


.request-form-wrap {
  flex: 1 1 560px;
  min-width: 0;
}

.request-form,
.request-success {
  box-sizing: border-box;
  padding: 40px;
  background: var(--mist);
  border-radius: var(--radius);
}
.request-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 24px;
}
.request-form[hidden],
.request-success[hidden] { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}
.field--full { grid-column: 1 / -1; }
.field__req { color: var(--link); }

.field input,
.field select,
.field textarea {
  min-height: 48px;
  padding: 0 14px;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 400;
}
.field textarea {
  min-height: 0;
  padding: 12px 14px;
  resize: vertical;
}
.field [aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}
.field__error {
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
}
.field__error[hidden] { display: none; }

.request-form__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.request-form__note {
  font-size: 14px;
  color: var(--text-muted-2);
}
.request-form__status {
  grid-column: 1 / -1;
  color: var(--error);
  font-size: 15px;
  font-weight: 600;
}
.request-form__status[hidden] { display: none; }

.request-success { min-height: 240px; }
.request-success:focus { outline: none; }
.request-success__title {
  margin-bottom: 12px;
  line-height: 1.1;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}
.request-success p { color: var(--text-muted); }

@media (max-width: 640px) {
  .request-form,
  .request-success,
  .spec-box { padding: 28px 20px; }
}

/* ---------- Footer ---------- */
.site-footer {
  color: var(--on-navy);
  font-size: 15px;
}
.site-footer a {
  color: var(--on-navy-link);
  text-decoration: none;
}
.site-footer a:hover { color: var(--white); }

.site-footer__top {
  padding-top: 40px;
  padding-bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}
.site-footer__top img {
  width: 240px;
  height: auto;
}
.site-footer__nav {
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-weight: 600;
}
.site-footer__bottom {
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule-dark);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

/* ---------- Thanks page ---------- */
.thanks__logo {
  display: inline-block;
  margin-bottom: 64px;
  line-height: 0;
}
.thanks__logo img { width: 260px; height: auto; }
.thanks .h1 { margin-bottom: 20px; }
.thanks__text {
  max-width: 560px;
  margin-bottom: 32px;
  color: var(--text-muted);
}
.thanks .btn {
  background: var(--navy);
  color: var(--white);
}
