/* ============================================================
   CARAVELIO — feuille de style
   Premium · dark-first · mobile-first · zéro dépendance
   ============================================================ */

:root {
  /* palette */
  --navy-900: #06101f;
  --navy-800: #0a1628;
  --navy-700: #0d1e36;
  --ocean-600: #123a63;
  --ocean-500: #1b4d7a;
  --gold: #d4af6a;
  --gold-soft: #c9a24b;
  --offwhite: #f4f1ea;
  --gray-300: #c4cdd9;
  --gray-400: #97a3b4;
  --gray-500: #6b7888;
  --line: rgba(212, 175, 106, 0.16);
  --line-soft: rgba(244, 241, 234, 0.08);

  /* surfaces */
  --bg: var(--navy-800);
  --bg-alt: var(--navy-900);
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(212, 175, 106, 0.06);
  --text: var(--offwhite);
  --text-muted: var(--gray-400);

  /* type */
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* layout */
  --maxw: 1180px;
  --maxw-narrow: 760px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--navy-900); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 2.5rem); }
.narrow { max-width: var(--maxw-narrow); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: var(--navy-900); padding: 0.6rem 1rem; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(8, 17, 32, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); }
.brand-mark { color: var(--gold); display: inline-flex; }
.brand-name { font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.22em; font-size: 0.95rem; }

.main-nav { display: none; gap: 2rem; }
.main-nav a {
  position: relative; font-size: 0.92rem; font-weight: 500; color: var(--gray-300);
  padding: 0.25rem 0; transition: color 0.25s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--gold); transition: width 0.3s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-btn {
  appearance: none; border: 0; background: transparent; color: var(--gray-400);
  font-family: var(--font-sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em;
  padding: 0.32rem 0.6rem; border-radius: 999px; cursor: pointer; transition: color 0.2s, background 0.2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active { background: var(--gold); color: var(--navy-900); }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 9px; background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile drawer */
.mobile-nav {
  position: fixed; inset: 74px 0 auto 0; z-index: 99;
  background: var(--navy-900); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.7);
  display: grid; gap: 0.25rem; padding: 1rem clamp(1.25rem, 5vw, 2.5rem) 1.75rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform 0.3s var(--ease), opacity 0.3s;
}
.mobile-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav a { padding: 0.85rem 0.25rem; font-size: 1.05rem; color: var(--gray-300); border-bottom: 1px solid var(--line-soft); }
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  padding: 0.92rem 1.7rem; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold); color: var(--navy-900); box-shadow: 0 10px 30px -12px rgba(212, 175, 106, 0.6); }
.btn-primary:hover { background: #e2c184; box-shadow: 0 16px 38px -12px rgba(212, 175, 106, 0.7); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); background: var(--surface-hover); }

/* ---------------- Hero ---------------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-illus { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--navy-800) 0%, rgba(10,22,40,0.7) 38%, rgba(10,22,40,0.15) 100%),
              linear-gradient(0deg, var(--navy-800) 2%, transparent 35%);
}
.hero-content { position: relative; z-index: 1; padding-top: 90px; padding-bottom: 80px; max-width: 760px; }

.hero-eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 1.4rem;
}
.hero-title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5rem); line-height: 1.04; letter-spacing: -0.01em;
  margin: 0 0 1.5rem; color: var(--offwhite);
}
.hero-subtitle { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); color: var(--gray-300); max-width: 600px; margin: 0 0 2.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; z-index: 1; width: 26px; height: 42px; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: start center; padding-top: 8px; }
.scroll-cue span { width: 3px; height: 8px; border-radius: 2px; background: var(--gold); animation: scrollcue 1.8s var(--ease) infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* hero animations */
.stars circle { animation: twinkle 4s ease-in-out infinite; }
.stars circle:nth-child(2n) { animation-delay: 1.2s; }
.stars circle:nth-child(3n) { animation-delay: 2.4s; }
@keyframes twinkle { 0%,100% { opacity: 0.25; } 50% { opacity: 0.9; } }
.ship { animation: sway 7s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
@keyframes sway { 0%,100% { transform: translate(700px, 620px) rotate(-1.2deg); } 50% { transform: translate(700px, 612px) rotate(1.2deg); } }
.route { stroke-dashoffset: 0; animation: dash 40s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -280; } }

@media (prefers-reduced-motion: reduce) {
  .stars circle, .ship, .route, .scroll-cue span { animation: none; }
}

/* ---------------- Sections ---------------- */
.section { position: relative; padding: clamp(4.5rem, 3rem + 8vw, 9rem) 0; }
.vision { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.augmented { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-kicker { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
.section-title {
  font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); line-height: 1.1; margin: 0 0 1.6rem; color: var(--offwhite);
}
.section-head { margin-bottom: 3rem; max-width: 640px; }

.prose p { color: var(--gray-300); margin: 0 0 1.15rem; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }
.prose .lead { color: var(--text); }
.prose .statement { font-family: var(--font-serif); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); line-height: 1.3; color: var(--offwhite); margin: 0.5rem 0 1.6rem; }
.prose .statement strong { font-weight: 600; }
.prose .statement strong::before { content: "« "; color: var(--gold); }
.prose .statement strong::after { content: " »"; color: var(--gold); }

/* ---------------- Services ---------------- */
.cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.card {
  position: relative; padding: 2rem 1.85rem; border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--gold) 0%, transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s;
}
.card:hover { transform: translateY(-5px); background: var(--surface-hover); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card-icon {
  display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 12px;
  background: rgba(212, 175, 106, 0.1); color: var(--gold); margin-bottom: 1.25rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-family: var(--font-sans); font-size: 1.18rem; font-weight: 600; margin: 0 0 0.7rem; color: var(--offwhite); }
.card p { color: var(--gray-400); font-size: 0.97rem; margin: 0; line-height: 1.6; }

/* ---------------- Founder ---------------- */
.founder-grid { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
.founder-media { display: flex; justify-content: center; }
.founder-photo {
  position: relative; width: min(340px, 80vw); aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(160deg, var(--ocean-600), var(--navy-900));
  display: grid; place-items: center;
}
.founder-photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
.founder-photo img.is-missing { display: none; }
.founder-monogram { font-family: var(--font-serif); font-size: 5rem; font-weight: 600; color: var(--gold); opacity: 0.55; letter-spacing: 0.05em; z-index: 1; }
.founder-photo::after { content: ""; position: absolute; inset: 0; z-index: 3; box-shadow: inset 0 -80px 80px -40px rgba(6,16,31,0.7); pointer-events: none; }
.founder-text .btn { margin-top: 1.8rem; }

/* ---------------- Contact ---------------- */
.contact { text-align: center; }
.contact .section-kicker { text-align: center; }
.contact-lead { color: var(--gray-300); max-width: 52ch; margin: 0 auto 2.4rem; font-size: 1.1rem; }
.contact .hero-cta { justify-content: center; }
.contact-coords { list-style: none; padding: 0; margin: 3rem auto 0; display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: center; }
.contact-coords li { display: grid; gap: 0.3rem; }
.coord-label { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray-500); }
.contact-coords a { color: var(--gold); font-weight: 500; transition: color 0.2s; }
.contact-coords a:hover { color: #e2c184; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line-soft); padding: 3rem 0; }
.footer-inner { display: grid; gap: 1rem; justify-items: center; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); }
.footer-brand .brand-mark { color: var(--gold); }
.footer-brand .brand-name { letter-spacing: 0.22em; font-weight: 600; font-size: 0.9rem; }
.footer-tagline { font-family: var(--font-serif); font-size: 1.25rem; color: var(--gray-300); margin: 0; }
.footer-links { list-style: none; display: flex; gap: 1.5rem; padding: 0; margin: 0.5rem 0 0; }
.footer-links a { color: var(--gray-400); font-size: 0.92rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { color: var(--gray-500); font-size: 0.85rem; margin: 0.5rem 0 0; }

/* ---------------- Reveal on scroll ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.cards .card { transition-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- Responsive ---------------- */
@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 920px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
  .founder-grid { grid-template-columns: 360px 1fr; gap: 4rem; }
  .cards { grid-template-columns: repeat(4, 1fr); }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
