/* ---- Self-hosted fonts (variable woff2, latin) ---- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-italic-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

::selection { background: #12A4C9; color: #0D1A33; }

/* ---------- Mobile form fields ----------
   iOS Safari auto-zooms the page whenever a focused field is under 16px,
   so bump the fields (not the surrounding text) on phone widths. */
@media (max-width: 639px) {
  input, select, textarea { font-size: 16px !important; }
}

/* ---------- Narrow-screen overflow guard ----------
   Grid and flex children default to `min-width: auto`, so a wide item — a
   <select> sized by its longest option, a long email address — can push the
   whole track past the viewport and scroll the page sideways. */
select { min-width: 0; }
@media (max-width: 1023px) {
  .grid > *, form > * { min-width: 0; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: #12A4C9;
  color: #0D1A33;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 1rem; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .7s ease-out, transform .7s ease-out; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity .7s ease-out, transform .7s ease-out; }
.reveal-left.is-visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity .7s ease-out, transform .7s ease-out; }
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }

/* Below lg the columns are stacked full-width, so a ±40px horizontal offset
   hangs off the viewport and scrolls the page sideways until the reveal fires.
   Slide these in vertically instead. */
@media (max-width: 1023px) {
  .reveal-left, .reveal-right { transform: translateY(36px); }
}
.reveal-stagger > * { opacity: 0; transform: translateY(30px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* Header scrolled state */
#site-header.scrolled nav { padding-top: .55rem; padding-bottom: .55rem; }

/* Animated wave divider — three foam layers scrolling at different speeds */
.wave-divider { line-height: 0; height: 70px; }
@media (min-width: 640px) { .wave-divider { height: 100px; } }

.wave-svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}
/* Each layer tiles two identical paths (1440 wide) and slides one full
   tile so the loop is seamless. */
.wave-move { will-change: transform; }
.wave-move--back  { animation: wave-scroll 22s linear infinite; }
.wave-move--mid   { animation: wave-scroll 15s linear infinite reverse; }
.wave-move--front { animation: wave-scroll 10s linear infinite; }

.wave-svg--back  path { fill: rgba(210, 231, 239, 0.45); } /* frosted blue */
.wave-svg--mid   path { fill: rgba(231, 247, 250, 0.70); } /* light cyan, soft */
.wave-svg--front path { fill: #E7F7FA; }                   /* matches section below */

@keyframes wave-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-1440px); }
}

/* Between-section animated wave dividers (colour set per instance via --wave-fill) */
.section-wave { position: relative; height: 56px; line-height: 0; overflow: hidden; }
@media (min-width: 640px) { .section-wave { height: 90px; } }
.section-wave .wave-svg--back  path { fill: var(--wave-fill); opacity: .4; }
.section-wave .wave-svg--mid   path { fill: var(--wave-fill); opacity: .65; }
.section-wave .wave-svg--front path { fill: var(--wave-fill); }

/* Hero gradient overlay */
/* The base gradient is at its thinnest (.35) around 40% height — exactly where the
   eyebrow and headline sit, and exactly where the yacht's white hull is brightest,
   leaving the aqua eyebrow at ~1.2:1. Rather than darken the whole hero, a feathered
   scrim sits behind the text block only; the image stays open around it. */
.hero-overlay {
  background:
    radial-gradient(ellipse 105% 55% at 50% 28%,
      rgba(13,26,51,.84) 0%, rgba(13,26,51,.60) 45%, rgba(13,26,51,0) 88%),
    linear-gradient(180deg, rgba(13,26,51,.55) 0%, rgba(13,26,51,.35) 40%, rgba(13,26,51,.92) 100%);
}

/* Boat card image zoom handled by Tailwind group hover; keep ratio stable */
.card-img { transition: transform .6s ease; }
.group:hover .card-img { transform: scale(1.08); }

/* Lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13,26,51,.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s ease;
}
#lightbox.open { opacity: 1; visibility: visible; }

/* Guest reels — horizontal strip below the hero */
.reel-track {
  scrollbar-width: thin;
  scrollbar-color: rgba(22,57,90,.28) transparent;
  scroll-padding-left: 1.5rem;
}
.reel-track::-webkit-scrollbar { height: 6px; }
.reel-track::-webkit-scrollbar-track { background: transparent; }
.reel-track::-webkit-scrollbar-thumb { background: rgba(22,57,90,.22); border-radius: 6px; }
.reel-track::-webkit-scrollbar-thumb:hover { background: rgba(22,57,90,.4); }

.reel-card { transition: transform .35s ease, box-shadow .35s ease; }
.reel-card:hover { transform: translateY(-4px); }
.reel-card:focus-visible { outline: 3px solid #12A4C9; outline-offset: 3px; }

/* Reel player (portrait video, so it's sized off the viewport height) */
#reel-lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13,26,51,.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s ease;
}
#reel-lightbox.open { opacity: 1; visibility: visible; }
.reel-stage { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.reel-player {
  max-height: 72vh;
  max-width: min(92vw, 420px);
  width: auto;
  border-radius: 1rem;
  background: #0D1A33;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.7);
}

@media (prefers-reduced-motion: reduce) {
  .reel-card:hover { transform: none; }
}

/* Blog article typography */
.prose-cyprus { color: #16395A; line-height: 1.75; font-size: 1.0625rem; }
.prose-cyprus p { margin: 0 0 1.25rem; }
.prose-cyprus h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #0D1A33;
  margin: 2.25rem 0 0.9rem;
  line-height: 1.25;
}
.prose-cyprus ul { margin: 0 0 1.25rem; padding-left: 1.25rem; list-style: none; }
.prose-cyprus ul li { position: relative; padding-left: 1.4rem; margin-bottom: 0.5rem; }
.prose-cyprus ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #16A6A0;
}
.prose-cyprus a { color: #0C7A6E; text-decoration: underline; }
.prose-cyprus a:hover { color: #16A6A0; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0D1A33; }
::-webkit-scrollbar-thumb { background: #12A4C9; border-radius: 10px; }

/* ---------- First-visit cinematic intro ---------- */
html.intro-lock, html.intro-lock body { overflow: hidden !important; height: 100%; }

#intro-overlay {
  position: fixed; inset: 0; z-index: 200; overflow: hidden; background: #0D1A33;
  animation: intro-out 0.9s cubic-bezier(.65,0,.35,1) 2.05s forwards;
}
#intro-overlay .intro-img,
#intro-overlay .intro-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
#intro-overlay .intro-img { transform: scale(1.14); animation: intro-zoom 3s ease-out forwards; }
#intro-overlay .intro-video { opacity: 0; transition: opacity .6s ease; }
#intro-overlay .intro-video.show { opacity: 1; }
#intro-overlay .intro-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 42%, rgba(8,23,38,0) 28%, rgba(8,23,38,.5) 100%),
    linear-gradient(180deg, rgba(13,26,51,.5) 0%, rgba(13,26,51,.12) 42%, rgba(13,26,51,.88) 100%);
}
#intro-overlay .intro-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 1.5rem;
}
#intro-overlay .intro-mark { color: #C9A24A; opacity: 0; animation: intro-rise .9s ease-out .15s forwards; }
#intro-overlay .intro-title {
  font-family: 'Playfair Display', serif; color: #fff; font-weight: 700;
  font-size: clamp(2rem, 6vw, 4rem); margin-top: .4rem;
  opacity: 0; animation: intro-rise 1s ease-out .35s forwards;
}
#intro-overlay .intro-title span { color: #12A4C9; }
#intro-overlay .intro-tag {
  color: rgba(255,255,255,.78); font-size: clamp(.7rem, 2.4vw, .95rem);
  letter-spacing: .3em; text-transform: uppercase; margin-top: .85rem;
  opacity: 0; animation: intro-rise 1s ease-out .55s forwards;
}
#intro-overlay .intro-line {
  margin-top: 1.6rem; width: min(220px, 60vw); height: 2px; border-radius: 2px;
  background: rgba(255,255,255,.18); overflow: hidden;
  opacity: 0; animation: intro-rise .6s ease-out .6s forwards;
}
#intro-overlay .intro-line span { display: block; height: 100%; width: 0; background: #C9A24A; animation: intro-load 1.7s ease-in-out .6s forwards; }

@keyframes intro-zoom { to { transform: scale(1.26) translateY(-1.5%); } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes intro-load { to { width: 100%; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.08); } }

/* ---------- Premium CTA buttons: gradient + subtle motion ---------- */
/* Scoped to real buttons/links so badges, chips and avatars stay flat. */
/* Zero-specificity so Tailwind's positioning utilities (.fixed, .absolute, .sticky)
   still win — the sheen only needs *a* containing block, not `relative` specifically. */
:where(a.bg-brand-gold, button.bg-brand-gold, a.bg-brand-navy, button.bg-brand-navy) {
  position: relative;
}
a.bg-brand-gold, button.bg-brand-gold,
a.bg-brand-navy, button.bg-brand-navy {
  overflow: hidden;
  isolation: isolate;
  background-size: 200% 200%;
  background-position: 0% 0%;
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s ease, background-position .55s ease;
}
a.bg-brand-gold, button.bg-brand-gold {
  background-image: linear-gradient(135deg, #34BEDC 0%, #12A4C9 55%, #0E93BC 100%);
  box-shadow: 0 6px 16px -3px rgba(18,164,201,.42);
}
a.bg-brand-navy, button.bg-brand-navy {
  background-image: linear-gradient(135deg, #1B4467 0%, #10314F 55%, #0B1B30 100%);
  box-shadow: 0 6px 16px -3px rgba(13,26,51,.38);
}
/* light sheen that sweeps across on hover (sits above the gradient, below the text) */
a.bg-brand-gold::before, button.bg-brand-gold::before,
a.bg-brand-navy::before, button.bg-brand-navy::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -65%;
  width: 45%;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
  pointer-events: none;
}
a.bg-brand-gold:hover, button.bg-brand-gold:hover,
a.bg-brand-navy:hover, button.bg-brand-navy:hover {
  transform: translateY(-2px);
  background-position: 100% 100%;
}
a.bg-brand-gold:hover, button.bg-brand-gold:hover { box-shadow: 0 12px 24px -5px rgba(18,164,201,.5); }
a.bg-brand-navy:hover, button.bg-brand-navy:hover { box-shadow: 0 12px 24px -5px rgba(13,26,51,.52); }
a.bg-brand-gold:hover::before, button.bg-brand-gold:hover::before,
a.bg-brand-navy:hover::before, button.bg-brand-navy:hover::before { left: 120%; }
a.bg-brand-gold:active, button.bg-brand-gold:active,
a.bg-brand-navy:active, button.bg-brand-navy:active { transform: translateY(0); box-shadow: 0 4px 12px -4px rgba(13,26,51,.4); }

@media (prefers-reduced-motion: reduce) {
  #intro-overlay { display: none !important; }
  a.bg-brand-gold, button.bg-brand-gold, a.bg-brand-navy, button.bg-brand-navy { transition: none !important; }
  a.bg-brand-gold:hover, button.bg-brand-gold:hover, a.bg-brand-navy:hover, button.bg-brand-navy:hover { transform: none !important; }
  a.bg-brand-gold::before, button.bg-brand-gold::before, a.bg-brand-navy::before, button.bg-brand-navy::before { display: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ---------- Legal documents (privacy / cookies / terms) ----------
   Tailwind's typography plugin isn't installed, so the long-form prose on the
   legal pages is styled here rather than by tagging every <p> and <li> in the
   markup — those documents are edited as prose and shouldn't need class soup. */
.legal-prose { color: #16395A; font-size: 0.9375rem; line-height: 1.75; }
.legal-prose h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0D1A33;
  margin: 2.75rem 0 1rem;
  scroll-margin-top: 7rem;   /* clears the fixed header when jumping to an anchor */
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose .legal-num { color: #1ECEB6; margin-right: .35rem; }
.legal-prose h3 {
  font-weight: 700;
  color: #0D1A33;
  font-size: 1rem;
  margin: 1.75rem 0 .5rem;
  scroll-margin-top: 7rem;
}
.legal-prose p { margin: 0 0 1rem; }
.legal-prose ul, .legal-prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal-prose ul { list-style: disc; }
.legal-prose ol { list-style: decimal; }
.legal-prose li { margin-bottom: .45rem; }
.legal-prose li::marker { color: #1ECEB6; }
.legal-prose a { color: #0C7A6E; text-decoration: underline; text-underline-offset: 2px; }
.legal-prose a:hover { color: #12A4C9; }
.legal-prose strong { color: #0D1A33; font-weight: 600; }
.legal-prose code { font-size: .85em; background: #E7F7FA; padding: .1rem .3rem; border-radius: .25rem; }

/* Callout for the points that most often cause disputes. */
.legal-prose .legal-note {
  background: #E7F7FA;
  border-left: 3px solid #1ECEB6;
  border-radius: .5rem;
  padding: .9rem 1.1rem;
  margin: 0 0 1.25rem;
}
.legal-prose .legal-note p:last-child { margin-bottom: 0; }

/* Definition list used for the registered-trader details. */
.legal-prose .legal-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .4rem 1.25rem;
  margin: 0 0 1.25rem;
}
.legal-prose .legal-dl dt { color: #16395A; opacity: .65; }
.legal-prose .legal-dl dd { color: #0D1A33; margin: 0; }
@media (max-width: 480px) {
  .legal-prose .legal-dl { grid-template-columns: 1fr; gap: 0 0; }
  .legal-prose .legal-dl dt { margin-top: .6rem; font-size: .8125rem; }
}

/* Cookie table — scrolls inside itself rather than widening the page. */
.legal-table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.legal-prose table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .875rem; }
.legal-prose thead th {
  text-align: left;
  background: #E7F7FA;
  color: #0D1A33;
  font-weight: 600;
  padding: .6rem .75rem;
  white-space: nowrap;
}
.legal-prose tbody td { padding: .6rem .75rem; border-top: 1px solid rgba(22,57,90,.12); vertical-align: top; }
.legal-prose tbody td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; color: #0D1A33; white-space: nowrap; }
