/* Captain of Arion — xtremsailing.com */

:root {
  --bg: #0a0a0a;
  --ink: #f4f1ea;
  --ink-soft: #d8d3c8;
  --ink-faint: #9b9588;
  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --topbar-h: 72px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; overflow-x: hidden; }

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

/* — Topbar — */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
  transition: background-color .35s ease, backdrop-filter .35s ease;
}

.topbar.is-stuck {
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.topbar-inner {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 36px;
}

.nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding: 8px 0;
  transition: color .2s ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* Mobile menu button */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  padding: 8px 6px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: absolute;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: 16px 32px 24px;
  gap: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-mobile a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-mobile a:last-child { border-bottom: 0; }

/* — Hero slideshow — */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #000;
}

.slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.6s ease, transform 8s ease;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Vignette + dégradé bas pour lisibilité */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.35) 100%),
    linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 35%);
  pointer-events: none;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 32px 16vh;
  text-align: center;
  pointer-events: none;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(13px, 1.2vw, 15px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}

/* — Dots — */

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.dot {
  width: 32px;
  height: 2px;
  border-radius: 0;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background .3s ease, width .3s ease;
}

.dot.is-active { background: rgba(255,255,255,0.95); width: 56px; }
.dot:hover { background: rgba(255,255,255,0.8); }

/* — Mobile — */

@media (max-width: 820px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .topbar-inner { padding: 0 20px; }
  .brand { font-size: 18px; }
  .hero-overlay { padding-bottom: 14vh; }
  .dots { bottom: 24px; }
  .dot { width: 24px; }
  .dot.is-active { width: 40px; }
}

/* — Reduced motion — */

@media (prefers-reduced-motion: reduce) {
  .slide { transition: opacity .3s ease, transform 0s; transform: none; }
  .slide.is-active { transform: none; }
}
