/* CaribSailing — Sun-Bleached Lifestyle */

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* Sun-Bleached palette */
  --bone: #F3EDE0;
  --bone-warm: #E8DFCC;
  --bone-deep: #DDD2BC;
  --terracotta: #C8553D;
  --terracotta-deep: #A8442F;
  --ocean: #2C4A5C;
  --ocean-deep: #1E3340;
  --sun: #E8A552;
  --ink: #1F1B16;
  --ink-muted: #5A4F44;

  /* Legacy aliases — keep existing component CSS working with new aesthetic */
  --navy-dark: var(--ocean-deep);
  --navy-primary: var(--terracotta);
  --navy-light: var(--ocean);
  --light-blue: var(--bone-warm);
  --blue-accent: var(--terracotta);
  --background-light: var(--bone);
  --white: var(--bone);
  --grey-light: var(--bone-warm);
  --grey-medium: var(--ink-muted);
  --grey-dark: var(--ink);
  --text-primary: var(--ink);
  --text-body: var(--ink);
  --text-muted: var(--ink-muted);
  --text-light: var(--bone);
  --hover-navy: var(--terracotta-deep);
  --active-blue: var(--terracotta);
  --bg-light: var(--bone);
  --bg-white: var(--bone);
  --text-dark: var(--ink);
  --blue-light: var(--bone-warm);

  /* Shadows — warm low-opacity, never the cold navy of before */
  --shadow-light: 0 1px 3px rgba(31, 27, 22, 0.08);
  --shadow-medium: 0 4px 16px rgba(31, 27, 22, 0.10);
  --shadow-heavy: 0 12px 40px rgba(31, 27, 22, 0.14);
  --shadow-blue: 0 4px 24px rgba(200, 85, 61, 0.20);
  --shadow-soft: 0 2px 8px rgba(31, 27, 22, 0.06);

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bone);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  font-feature-settings: 'liga', 'kern';
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  position: relative;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 0.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

em, .italic, h1 em, h2 em, h3 em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

p {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.7;
}

.text-muted {
  color: var(--ink-muted) !important;
}

.dark-bg,
.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg h4, .dark-bg p {
  color: var(--bone);
}

.dark-bg .text-muted {
  color: rgba(243, 237, 224, 0.7) !important;
}

/* Linkable headers */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id] {
  scroll-margin-top: 100px;
  cursor: pointer;
  transition: color 0.3s ease;
}

h1[id]:hover, h2[id]:hover, h3[id]:hover,
h4[id]:hover, h5[id]:hover, h6[id]:hover {
  color: var(--terracotta);
}

h1[id]:hover::after, h2[id]:hover::after, h3[id]:hover::after {
  content: "·";
  font-size: 0.7em;
  margin-left: 0.4rem;
  opacity: 0.5;
  color: var(--terracotta);
}

/* ============================================================
   FILM GRAIN OVERLAY
   ============================================================ */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0 0.07 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@media (prefers-reduced-motion: reduce) {
  .grain-overlay { display: none; }
}

/* ============================================================
   SCROLL REVEAL HOOK
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(243, 237, 224, 0.92);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: var(--shadow-soft);
  z-index: 1000;
  padding: 0.65rem 0;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(31, 27, 22, 0.06);
}

@media (min-width: 1024px) {
  .header {
    left: 50%;
    right: auto;
    top: 1rem;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 1200px;
    border-radius: 3px;
    box-shadow: var(--shadow-light);
    border-bottom: none;
  }

  .header.scrolled {
    background: rgba(243, 237, 224, 0.98);
    box-shadow: var(--shadow-medium);
  }
}

@media (max-width: 1280px) and (min-width: 769px) {
  .header {
    left: 1rem;
    right: 1rem;
    top: 1rem;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0;
    border-radius: 3px;
    box-shadow: var(--shadow-light);
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .header {
    left: 0;
    right: 0;
    top: 0;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: var(--shadow-soft);
  }
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.logo {
  height: 44px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover { transform: scale(1.03); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav a, .nav-dropdown {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: 'opsz' 24, 'SOFT' 80;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.65rem 1.15rem;
  letter-spacing: 0.005em;
  transition: color 0.25s ease;
  position: relative;
  text-shadow: none;
  white-space: nowrap;
}

.nav > *:not(:last-child) { border-right: none; }

.nav > *:hover { background: transparent; }

.nav > *:hover a, .nav > *:hover .nav-dropdown-toggle {
  color: var(--terracotta);
  background: transparent !important;
  text-shadow: none;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown:hover > .nav-dropdown-toggle {
  color: var(--terracotta);
  background: transparent !important;
  text-shadow: none;
}

.nav-dropdown:hover { background: transparent; }

.nav-dropdown .nav-dropdown-toggle {
  border-radius: 0;
  transition: color 0.25s ease;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.nav-dropdown-toggle {
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  text-decoration: none;
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
  font-family: inherit;
  font-style: inherit;
  padding: 0;
  background: none;
  border: none;
  text-shadow: inherit;
  transition: inherit;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: rgba(243, 237, 224, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-medium);
  border-radius: 3px;
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
  z-index: 1001;
  border: 1px solid rgba(31, 27, 22, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown:hover .nav-dropdown-toggle {
  border-bottom: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1.15rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-style: normal;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0;
  transition: all 0.2s ease;
  border-radius: 0;
  background: none;
  text-shadow: none;
  transform: none;
  border-bottom: none;
}

.nav-dropdown-menu a:last-child { border-bottom: none; }

.nav-dropdown-menu a:hover {
  background: rgba(200, 85, 61, 0.08);
  color: var(--terracotta);
  text-shadow: none;
  transform: none;
}

.nav a.active, .nav-dropdown.active > .nav-dropdown-toggle {
  color: var(--terracotta);
  text-shadow: none;
  font-weight: 500;
  position: relative;
}

.nav a.active::after, .nav-dropdown.active > .nav-dropdown-toggle::after {
  content: '';
  position: absolute;
  bottom: 0.3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 1px;
  background: var(--terracotta);
  border-radius: 0;
}

/* Language Selector */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-btn {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--ink-muted);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  transition: all 0.25s ease;
  cursor: pointer;
}

.lang-btn:hover,
.lang-btn.active {
  background: var(--ink);
  color: var(--bone);
  border-color: var(--ink);
  box-shadow: none;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bone-warm);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-medium);
  padding: 0.4rem 0;
  border-top: 1px solid rgba(31, 27, 22, 0.08);
  border-bottom: none;
}

.mobile-nav::before { content: none; }

.mobile-nav.active { display: block; }

.mobile-nav a {
  display: block;
  padding: 0.9rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(31, 27, 22, 0.06);
  transition: all 0.2s ease;
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: 'opsz' 24, 'SOFT' 80;
  font-size: 1.1rem;
  font-weight: 400;
  text-shadow: none;
  position: relative;
  z-index: 1;
}

.mobile-nav a:hover {
  background: rgba(200, 85, 61, 0.08);
  color: var(--terracotta);
  text-shadow: none;
}

/* Header CTA button — visually distinct from nav links. */
.nav .nav-cta {
  background: var(--terracotta);
  color: var(--bone);
  border: 1px solid var(--terracotta);
  border-radius: 2px;
  padding: 0.55rem 1.25rem;
  margin-left: 0.5rem;
  font-style: italic;
  font-variation-settings: 'opsz' 24, 'SOFT' 80;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
}

.nav .nav-cta:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  color: var(--bone);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 85, 61, 0.22);
}

.mobile-nav .nav-cta {
  background: var(--terracotta);
  color: var(--bone);
  margin: 0.5rem 1.25rem;
  border-radius: 2px;
  text-align: center;
  border-bottom: none;
}

.mobile-nav .nav-cta:hover {
  background: var(--terracotta-deep);
  color: var(--bone);
}

/* ============================================================
   MAIN / SECTIONS
   ============================================================ */
.main { /* hero floats under header — no top padding */ }

.section:not(.hero) { padding-top: 5rem; }
.section { padding: 5rem 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HERO — lower-left editorial composition
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
  filter: sepia(0.10) saturate(1.06) contrast(0.96) brightness(0.94);
  animation: kenBurns 32s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1.2%, 1%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image { animation: none; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(31, 27, 22, 0.08) 0%,
      rgba(31, 27, 22, 0.55) 60%,
      rgba(31, 27, 22, 0.85) 100%),
    linear-gradient(115deg,
      rgba(232, 165, 82, 0.18) 0%,
      rgba(200, 85, 61, 0.10) 45%,
      transparent 90%);
  z-index: 1;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  padding: 0 1.5rem 5rem;
  color: var(--bone);
  position: relative;
  z-index: 2;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: 'opsz' 24, 'SOFT' 100;
  font-size: 1.2rem;
  color: var(--sun);
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  font-weight: 400;
  color: var(--bone);
  margin-bottom: 1.5rem;
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
  max-width: 16ch;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.hero h1 em {
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  color: var(--sun);
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  color: rgba(243, 237, 224, 0.92);
  max-width: 48ch;
  line-height: 1.55;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(243, 237, 224, 0.25);
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(243, 237, 224, 0.80);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.hero-trust-strip span { white-space: nowrap; }

/* Scroll-down indicator */
.scroll-down-indicator {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 3;
  cursor: pointer;
  will-change: transform;
  animation: subtleBounce 3.2s ease-in-out infinite;
}

.scroll-icon {
  background: rgba(243, 237, 224, 0.14);
  border: 1px solid rgba(243, 237, 224, 0.5);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: none;
  transition: all 0.25s ease;
  color: var(--bone);
}

.scroll-icon:hover {
  background: rgba(243, 237, 224, 0.30);
  transform: scale(1.05);
  box-shadow: none;
  color: var(--bone);
}

.scroll-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

@keyframes subtleBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

@media (max-width: 768px) {
  .scroll-down-indicator {
    right: 1.25rem;
    bottom: 1.5rem;
  }
  .scroll-icon {
    width: 38px;
    height: 38px;
  }
  .scroll-icon svg {
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-down-indicator { animation: none; }
}

/* ============================================================
   CTA BUTTONS
   ============================================================ */
.cta-btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: var(--terracotta);
  color: var(--bone);
  text-decoration: none;
  border-radius: 2px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  border: 1px solid var(--terracotta);
  cursor: pointer;
  box-shadow: none;
}

.cta-btn:hover {
  background: var(--terracotta-deep);
  border-color: var(--terracotta-deep);
  color: var(--bone);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 85, 61, 0.22);
}

.cta-btn.secondary {
  background: transparent;
  color: var(--bone);
  border: 1px solid rgba(243, 237, 224, 0.6);
}

.cta-btn.secondary:hover {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}

/* On bone backgrounds, secondary needs ink not bone */
section:not(.hero):not(.dark-bg) .cta-btn.secondary,
.dark-bg ~ .section .cta-btn.secondary {
  color: var(--ink);
  border-color: var(--ink-muted);
}

section:not(.hero):not(.dark-bg) .cta-btn.secondary:hover {
  background: var(--ink);
  color: var(--bone);
  border-color: var(--ink);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .header-container { padding: 0 1rem; }

  .lang-selector { gap: 0.25rem; }
  .lang-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.7rem;
  }

  .hero-content {
    padding: 0 1.25rem 3rem;
  }

  .hero h1 { font-size: clamp(2.25rem, 8vw, 3.25rem); }
  .hero p { font-size: 1rem; }
  .hero-eyebrow { font-size: 1.05rem; }

  h1 { font-size: clamp(2rem, 7vw, 2.5rem); }
  h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
  h3 { font-size: 1.2rem; }

  .section { padding: 3.5rem 0; }
  .section:not(.hero) { padding-top: 3.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; }
  .cta-btn {
    padding: 0.75rem 1.4rem;
    font-size: 0.9rem;
  }
  .hero-trust-strip {
    gap: 1rem;
    font-size: 0.72rem;
  }
}
