@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/BarlowCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #102836;
  --ink: #142e3a;
  --teal: #8dd9d7;
  --paper: #f4f7f5;
  --gutter: clamp(20px, 5vw, 64px);
  font: 100%/1.5 Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, figure { margin: 0; }
img { display: block; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #057e88; outline-offset: 4px; }
.wrap { max-width: 1280px; padding-inline: var(--gutter); margin-inline: auto; }
.hero { background: var(--navy); color: white; }
.hero :focus-visible, .viewer :focus-visible { outline-color: var(--teal); }
html { scroll-padding-top: 90px; }
.site-header {
  --bar-height: 82px;
  --bar-background: #fff;
  --bar-border: #10283626;
  --bar-text: var(--navy);
  --bar-focus: var(--navy);
  --logo-width: clamp(128px, 44vw, 204px);
  position: sticky;
  top: 0;
  z-index: 2;
  height: 82px;
  pointer-events: none;
}
.site-header.is-compact {
  --bar-height: 58px;
  --bar-background: var(--navy);
  --bar-border: #b9d5d736;
  --bar-text: #eef7f8;
  --bar-focus: var(--teal);
  --logo-width: clamp(112px, 39vw, 176px);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--bar-height);
  background: var(--bar-background);
  border-bottom: 1px solid var(--bar-border);
  transition: height .2s ease;
}
.logo-filters { position: absolute; }
.site-header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: var(--bar-height); padding-block: 7px 5px; transition: height .2s ease; }
.site-header .logo { width: var(--logo-width); height: auto; filter: url("#logo-on-white"); transition: width .2s ease; }
.site-header.is-compact .logo { filter: none; }
.site-header a { display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(.75rem, 2.6vw, .875rem); color: var(--bar-text); pointer-events: auto; }
.site-header a:focus-visible { outline-color: var(--bar-focus); }
@media (prefers-reduced-motion: reduce) {
  .site-header::before, .site-header-inner, .site-header .logo { transition: none; }
}

.hero {
  --hero-height: clamp(540px, 51vw, 735px);
  position: relative;
  isolation: isolate;
}
.hero-layout {
  position: relative;
  min-height: var(--hero-height);
  display: flex;
  align-items: center;
  padding-block: 54px;
}
.hero-layout::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 50%;
  left: max(12px, calc(var(--gutter) - 36px));
  width: min(53%, clamp(380px, 43vw, 580px));
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("assets/ribventure-x.png") 43% 54% / 155% no-repeat;
  filter: grayscale(1) invert(1);
  opacity: .08;
}
.scene-picture { display: block; }
.scene {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: min(72%, calc(78vw - 119px), calc(var(--hero-height) * 1.35));
  height: 100%;
  object-fit: cover;
  object-position: 50% 79%;
  mask-image: linear-gradient(90deg, transparent, #0001 9%, #0005 17%, #000a 24%, #000e 36%, #000 53%);
}
.preview {
  position: absolute;
  bottom: 16px;
  right: var(--gutter);
  background: var(--navy);
  color: #e7f0f2;
  border: 1px solid #b9d5d780;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .75rem;
}
.hero-copy { width: min(47%, 520px); }
h1, h2 { font-family: "Barlow Condensed", Arial, sans-serif; font-weight: 600; }
h1 { font-size: clamp(2.65rem, 5.6vw, 4rem); line-height: .98; letter-spacing: -.015em; text-wrap: balance; }
h1 span { display: block; }
.location { margin-top: 14px; font-size: clamp(1.15rem, 2.4vw, 1.65rem); color: var(--teal); font-weight: 700; line-height: 1.2; }
.alternative { margin-top: 8px; font-size: .875rem; color: var(--teal); }
.intro { margin-top: 19px; max-width: 33ch; }
.intro { color: #e7f0f2; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 16px; margin-top: 23px; font-size: .875rem; }
.actions a, .footer-content a { display: inline-flex; align-items: center; min-height: 44px; }
.enquire { gap: 9px; padding-inline: 17px; border-radius: 99px; color: var(--navy); background: var(--teal); font-weight: 700; text-decoration: none; }
.enquire:hover { background: #b3eeeb; }
.auction { background: #d9eeeb; }
.auction-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; padding-block: 15px; font-size: .9375rem; }
.auction a { color: #173f4b; }

.fleet { padding-block: clamp(26px, 4vw, 44px); }
.fleet-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 16px; margin-bottom: 15px; }
h2 { font-size: clamp(1.75rem, 2.8vw, 2.15rem); line-height: 1.1; }
.fleet-heading p { font-size: .875rem; color: #344f58; }
.boats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px clamp(18px, 2vw, 24px); }
.photo { display: block; position: relative; border-radius: 8px; cursor: zoom-in; }
.photo img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: inherit; }
.enlarge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 1.2rem;
  line-height: 1;
}
.photo:hover .enlarge, .photo:focus-visible .enlarge { background: var(--teal); color: var(--navy); }
figcaption { margin-top: 7px; font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.boat-subtitle { display: block; margin-top: 3px; color: #344f58; font-size: .875rem; font-weight: 400; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: clamp(28px, 5vw, 54px); }
.options section { border-top: 1px solid #cfdcdb; padding-top: 20px; }
.options h2 { color: #4a959b; }
.options h2 > span { color: var(--navy); }
.options p { margin-top: 7px; max-width: 52ch; color: #344f58; }
footer { border-top: 1px solid #b9d5d736; background: var(--navy); color: #eef7f8; }
.footer-content { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 18px; padding-block: 12px; font-size: .875rem; }
.footer-logo { width: clamp(158px, 28vw, 220px); max-width: 100%; height: auto; filter: url("#footer-logo-on-navy"); }
.footer-content a:focus-visible { outline-color: var(--teal); }

html:has(.viewer[open]) { overflow: hidden; }
.viewer {
  width: min(calc(100% - 24px), 1080px);
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: white;
}
.viewer::backdrop { background: rgb(4 16 24 / .88); }
.viewer-bar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 8px 12px; }
.viewer-bar h2 { grid-column: 2; font-size: 1.35rem; letter-spacing: normal; text-align: center; }
.viewer button { border: 0; border-radius: 99px; min-width: 44px; min-height: 44px; padding: 0 12px; font: inherit; font-weight: 700; color: var(--navy); background: var(--teal); cursor: pointer; white-space: nowrap; }
.viewer .viewer-close { padding: 0; background: transparent; color: white; font-size: 1.75rem; line-height: 1; }
.viewer-stage {
  position: relative;
  height: min(63dvh, calc((100vw - 24px) * .75), 710px);
  container-type: size;
  overflow: auto;
  overscroll-behavior: contain;
  background: #081a24;
  touch-action: pan-y pinch-zoom;
}
.viewer-stage:has(.viewer-zoom-toggle:focus-visible) { outline: 3px solid var(--teal); outline-offset: -3px; }
.viewer-stage.is-zoomed { touch-action: auto; }
.viewer-canvas { width: max-content; min-width: 100%; min-height: 100%; display: grid; place-items: center; }
.viewer .viewer-zoom-toggle { min-width: 0; min-height: 0; border-radius: 0; padding: 0; overflow: hidden; background: transparent; cursor: zoom-in; }
.viewer .viewer-zoom-toggle:focus-visible { outline-offset: -4px; }
.viewer .is-zoomed .viewer-zoom-toggle { cursor: grab; }
.viewer .is-dragging .viewer-zoom-toggle { cursor: grabbing; }
.viewer-image { width: calc(min(100cqw, 100cqh * 4 / 3) * var(--zoom, 1)); aspect-ratio: 4/3; object-fit: contain; user-select: none; }
.viewer-stage:not(.is-zoomed) [data-fit-crop="ocean"] .viewer-image { transform: scale(1.695); transform-origin: 77.74% 60.98%; }
.viewer-image[hidden] { visibility: hidden; }
.viewer-error { position: absolute; inset: 12px; text-align: center; }
.viewer-controls { padding: 8px 12px 10px; }
.viewer-nav { display: grid; grid-template-columns: 100px 4ch 100px; justify-content: center; align-items: center; gap: 8px; }
.photo-count { text-align: center; font-size: .875rem; font-variant-numeric: tabular-nums; }
.viewer-help { margin-top: 8px; color: #e7f0f2; font-size: .8125rem; text-align: center; }
.viewer-help a { display: inline-flex; align-items: center; min-height: 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-height: 600px) and (orientation: landscape) {
  .viewer-stage { height: min(48dvh, calc((100vw - 24px) * .75)); }
}

@media (max-width: 880px) and (min-width: 701px) {
  .hero-copy { width: 45%; }
  h1 { font-size: clamp(2.5rem, 5.5vw, 3.3rem); }
}
@media (max-width: 700px) {
  .preview { top: 16px; bottom: auto; }
  .hero-layout { display: block; min-height: 0; padding-block: 0 32px; }
  .scene {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 9/10;
    object-position: 50% 72%;
    mask-image: linear-gradient(#000 0%, #000 72%, #000f 77%, #000e 85%, #000b 92%, #0005 97%, transparent);
  }
  .hero-copy { width: min(100%, 440px); margin-top: -4px; }
  .hero-layout::before { top: calc(50% - 24px); left: 12px; width: min(88%, 350px); opacity: .064; }
  .boats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
}
@media (max-width: 470px) {
  .scene { aspect-ratio: 4/5; }
  .options { grid-template-columns: 1fr; }
}
