/* ============================================================
   Soy Marinero — Landing page · NIGHT-context sections
   Nav, hero, ranks, bottom CTA, footer.
   ============================================================ */
const SMN = window.SoyMarineroDesignSystem_4bcf40;
const { Badge: NBadge, Button: NButton, Pill: NPill, EmailForm, Compass, StarField, RankBadge, CapitanBanner } = SMN;

/* ---- DaySea — the daylight hero backdrop: a Mediterranean afternoon sea,
   a sleek monohull surfing the horizon under a terracotta spinnaker, and
   gently animated wave crests. Sea is a stretch-to-fit SVG (aspect-ratio
   proof); the boat is a fixed-size SVG pinned relative to the band so it
   never distorts. Drift/shimmer keyframes live in index.html. ---- */
function DaySea({ height = '40vh', fadeOnScroll = true, fadeDistance = 560, style }) {
  const [opacity, setOpacity] = React.useState(1);
  React.useEffect(() => {
    if (!fadeOnScroll) return;
    const onScroll = () => setOpacity(Math.max(0, 1 - window.scrollY / fadeDistance));
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, [fadeOnScroll, fadeDistance]);
  const boatX = '72%';
  return (
    <div style={{ position: 'absolute', left: 0, right: 0, bottom: 0, height, pointerEvents: 'none', opacity, transition: 'opacity 0.4s ease', ...style }}>
      {/* warm haze sitting on the horizon */}
      <div style={{ position: 'absolute', left: 0, right: 0, bottom: '56%', height: '60px', background: 'linear-gradient(to top, rgba(255,252,244,0.85), rgba(255,252,244,0))' }} />

      {/* the boat — sleek monohull, heeled, spinnaker drawing; sits ON the horizon */}
      <svg className="ds-boat" width="150" height="120" viewBox="0 0 150 120" aria-hidden="true" style={{ position: 'absolute', left: boatX, bottom: 'calc(56% - 7px)', transform: 'translateX(-50%)' }}>
        {/* spinnaker — terracotta, ballooning forward (bow to the right) */}
        <path d="M104,14 C128,30 138,62 134,96 L106,98 C112,66 110,38 100,18 Z" fill="var(--terracotta)" opacity="0.92" />
        <path d="M104,14 C120,32 126,64 122,97 L106,98 C112,66 110,38 100,18 Z" fill="var(--saffron)" opacity="0.5" />
        {/* mainsail — white, slightly eased */}
        <path d="M96,8 L99,98 L66,100 C76,72 86,38 96,8 Z" fill="#FDFDFB" />
        <path d="M96,8 L99,98 L84,99 C88,68 92,36 96,8 Z" fill="#E7EBEA" />
        {/* mast */}
        <line x1="97" y1="6" x2="100" y2="100" stroke="#2B3A40" strokeWidth="1.6" />
        {/* hull — low, slim, heeled a touch */}
        <path d="M58,103 L138,99 C141,99 142,101 140,103 C134,109 122,112 108,112 L74,112 C66,112 60,108 58,103 Z" fill="#1F3038" />
        <path d="M58,103 L138,99 C141,99 142,101 140,103 L139,104 L59,106 Z" fill="#FBFBF8" />
        {/* wake */}
        <path d="M10,108 Q36,104 56,107" stroke="rgba(255,255,255,0.75)" strokeWidth="2.4" fill="none" strokeLinecap="round" />
        <path d="M22,113 Q44,110 62,111" stroke="rgba(255,255,255,0.45)" strokeWidth="1.8" fill="none" strokeLinecap="round" />
      </svg>

      {/* sea */}
      <div style={{ position: 'absolute', left: 0, right: 0, bottom: 0, height: '56%', background: 'linear-gradient(to bottom, #8FC0CB 0%, #4D9AA9 34%, #2A7384 68%, #14505E 100%)', borderTop: '1px solid rgba(20,80,94,0.35)' }}>
        <svg style={{ position: 'absolute', inset: 0, width: '100%', height: '100%' }} viewBox="0 0 1600 420" preserveAspectRatio="none" aria-hidden="true">
          <defs>
            <linearGradient id="dsGlit" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0%" stopColor="rgba(255,250,238,0.55)" /><stop offset="100%" stopColor="rgba(255,250,238,0.04)" />
            </linearGradient>
            <filter id="dsBlur" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="5" /></filter>
          </defs>

          {/* sun glitter path under the boat */}
          <polygon points="1130,2 1174,2 1290,420 1010,420" fill="url(#dsGlit)" filter="url(#dsBlur)" opacity="0.5" />

          {/* glints in the glitter path */}
          <g className="mo-sh1" stroke="rgba(255,252,242,0.85)" strokeLinecap="round" fill="none">
            <line x1="1136" y1="18" x2="1178" y2="18" strokeWidth="2.5" />
            <line x1="1118" y1="70" x2="1188" y2="70" strokeWidth="3" />
            <line x1="1130" y1="154" x2="1238" y2="154" strokeWidth="3.5" />
          </g>
          <g className="mo-sh2" stroke="rgba(255,250,238,0.55)" strokeLinecap="round" fill="none">
            <line x1="1156" y1="42" x2="1212" y2="42" strokeWidth="2.5" />
            <line x1="1096" y1="110" x2="1202" y2="110" strokeWidth="3" />
            <line x1="1070" y1="218" x2="1220" y2="218" strokeWidth="4" />
          </g>

          {/* wave crests — drifting gently, denser near the horizon */}
          <g className="ds-w1" stroke="rgba(255,255,255,0.30)" strokeWidth="1.5" fill="none">
            <path d="M-40,30 Q320,22 680,29 T1460,26 T1700,28" />
            <path d="M-80,94 Q380,84 780,92 T1540,87 T1720,90" />
            <path d="M-60,224 Q360,211 800,220 T1560,213 T1740,217" />
          </g>
          <g className="ds-w2" stroke="rgba(255,255,255,0.20)" strokeWidth="1.5" fill="none">
            <path d="M-70,56 Q300,47 700,54 T1500,50 T1700,52" />
            <path d="M-50,148 Q340,137 760,145 T1520,139 T1730,143" />
            <path d="M-90,300 Q380,286 820,296 T1580,288 T1760,293" />
          </g>
          {/* foreground crest, catching the sun */}
          <g className="ds-w1">
            <path d="M-60,368 Q270,352 640,362 T1370,356 L1700,360" stroke="rgba(255,255,255,0.28)" strokeWidth="2" fill="none" />
            <path className="mo-sh2" d="M920,361 Q1070,352 1230,357" stroke="rgba(255,252,242,0.55)" strokeWidth="2.5" strokeLinecap="round" fill="none" />
          </g>
        </svg>
      </div>
    </div>
  );
}

const wrap = { maxWidth: 'var(--content-max)', margin: '0 auto', padding: '0 var(--gutter)' };

/* ---- 1 · NAV (fixed) ---- */
function Nav() {
  const [bg, setBg] = React.useState(null); /* { r,g,b, dark } — null = transparent (top of page) */
  React.useEffect(() => {
    const parseColor = (str) => {
      if (!str) return null;
      const m = str.match(/rgba?\(([^)]+)\)/);
      if (m) {
        const p = m[1].split(',').map((v) => parseFloat(v));
        if (p.length >= 3 && !(p.length === 4 && p[3] === 0)) return [p[0], p[1], p[2]];
        return null;
      }
      const h = str.match(/#([0-9a-fA-F]{6})/);
      if (h) {
        const n = parseInt(h[1], 16);
        return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
      }
      return null;
    };
    const sectionColor = (el) => {
      const cs = getComputedStyle(el);
      return parseColor(cs.backgroundImage) || parseColor(cs.backgroundColor);
    };
    const onScroll = () => {
      if (window.scrollY <= 40) { setBg(null); return; }
      const probe = 70; /* px down from viewport top — just under the nav */
      let best = null;
      document.querySelectorAll('section').forEach((s) => {
        const r = s.getBoundingClientRect();
        if (r.top <= probe && r.bottom > probe) best = s;
      });
      if (!best) return;
      const rgb = sectionColor(best);
      if (!rgb) return;
      const dark = (0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]) < 130;
      setBg({ r: rgb[0], g: rgb[1], b: rgb[2], dark });
    };
    onScroll();
    window.addEventListener('scroll', onScroll, { passive: true });
    return () => window.removeEventListener('scroll', onScroll);
  }, []);

  const grad = bg
    ? `linear-gradient(to bottom, rgba(${bg.r},${bg.g},${bg.b},0.95) 0%, rgba(${bg.r},${bg.g},${bg.b},0.78) 62%, rgba(${bg.r},${bg.g},${bg.b},0) 100%)`
    : 'transparent';
  const ink = bg && bg.dark ? '#FFFFFF' : 'var(--text-day-primary)';

  /* Tools dropdown — Knots + the rank test, which are their own pages */
  const [toolsOpen, setToolsOpen] = React.useState(false);
  React.useEffect(() => {
    if (!toolsOpen) return;
    const close = () => setToolsOpen(false);
    window.addEventListener('click', close);
    return () => window.removeEventListener('click', close);
  }, [toolsOpen]);

  /* language selector */
  const [lang, setLang] = React.useState('EN');
  const [langOpen, setLangOpen] = React.useState(false);
  React.useEffect(() => {
    if (!langOpen) return;
    const close = () => setLangOpen(false);
    window.addEventListener('click', close);
    return () => window.removeEventListener('click', close);
  }, [langOpen]);

  return (
    <nav style={{
      position: 'fixed', top: 0, left: 0, right: 0, zIndex: 100,
      padding: '18px var(--gutter) 22px', display: 'flex', alignItems: 'center', justifyContent: 'space-between',
      background: grad,
      backdropFilter: bg ? 'blur(10px)' : 'none',
      WebkitBackdropFilter: bg ? 'blur(10px)' : 'none',
      transition: 'background 420ms var(--ease-default)',
    }}>
      <div style={{ fontFamily: 'var(--font-display)', fontSize: '20px', fontWeight: 700, color: ink, letterSpacing: '0.01em', whiteSpace: 'nowrap', transition: 'color 420ms var(--ease-default)' }}>
        <em style={{ fontStyle: 'italic', color: 'var(--teal)' }}>Marinero</em>
      </div>
      <div className="sm-nav-right" style={{ display: 'flex', alignItems: 'center', gap: '18px' }}>
        {/* primary nav — the SEO hubs are first-class */}
        <div className="sm-nav-links" style={{ display: 'flex', alignItems: 'center', gap: '18px' }}>
          <a href="knots/index.html" style={{ fontSize: '14px', fontWeight: 500, color: ink, textDecoration: 'none', opacity: 0.78, whiteSpace: 'nowrap', transition: 'color 420ms var(--ease-default)' }}>Knots</a>
          <div className="sm-nav-tools" style={{ position: 'relative' }}>
            <button
              onClick={(e) => { e.stopPropagation(); setToolsOpen((o) => !o); }}
              aria-haspopup="true" aria-expanded={toolsOpen}
              style={{
                display: 'flex', alignItems: 'center', gap: '5px', cursor: 'pointer', background: 'none', border: 'none', padding: 0,
                fontFamily: 'var(--font-body)', fontSize: '14px', fontWeight: 500, color: ink, opacity: 0.78,
                whiteSpace: 'nowrap', transition: 'color 420ms var(--ease-default)',
              }}
            >
              Tools
              <span style={{ fontSize: '9px', opacity: 0.65, transform: toolsOpen ? 'rotate(180deg)' : 'none', transition: 'transform var(--duration-fast) var(--ease-default)' }}>▾</span>
            </button>
            {toolsOpen && (
              <div style={{
                position: 'absolute', top: 'calc(100% + 12px)', right: 0, minWidth: '230px',
                background: 'var(--day-raised)', border: '1px solid var(--day-border)',
                borderRadius: 'var(--radius-md)', boxShadow: 'var(--shadow-md)', padding: '6px',
              }}>
                {[
                  { header: 'Boat & wind' },
                  { label: 'Parts of a sailboat', sub: 'Every part, named', href: 'parts-of-a-sailboat.html' },
                  { label: 'Boat & wind explorer', sub: 'Port, starboard, windward, leeward', href: 'boat-and-wind.html' },
                  { label: 'Points of sail', sub: 'Read the wind clock', href: 'points-of-sail.html' },
                  { header: 'Test yourself' },
                  { label: 'Sailing test', sub: 'What\u2019s your sailing rank?', href: 'sailing-test.html' },
                  { label: 'Name That Knot', sub: 'Spot the knot', href: 'knots/name-that-knot.html' },
                ].map((t) => (
                  t.header ? (
                    <div key={t.header} style={{ fontSize: '10.5px', fontWeight: 700, letterSpacing: '0.11em', textTransform: 'uppercase', color: 'var(--text-day-muted)', padding: '10px 11px 4px' }}>{t.header}</div>
                  ) : (
                    <a key={t.label} href={t.href} style={{
                      display: 'flex', flexDirection: 'column', gap: '1px', textDecoration: 'none',
                      borderRadius: 'var(--radius-sm)', padding: '9px 11px',
                    }}>
                      <span style={{ fontSize: '14px', fontWeight: 600, color: 'var(--text-day-primary)' }}>{t.label}</span>
                      <span style={{ fontSize: '12px', color: 'var(--text-day-muted)' }}>{t.sub}</span>
                    </a>
                  )
                ))}
              </div>
            )}
          </div>
          <a href="sailing-terms.html" style={{ fontSize: '14px', fontWeight: 500, color: ink, textDecoration: 'none', opacity: 0.78, whiteSpace: 'nowrap', transition: 'color 420ms var(--ease-default)' }}>Sailing Terms</a>
        </div>
        {/* language selector */}
        <div className="sm-nav-lang" style={{ position: 'relative' }}>
          <button
            onClick={(e) => { e.stopPropagation(); setLangOpen((o) => !o); }}
            aria-haspopup="listbox" aria-expanded={langOpen} aria-label="Language"
            style={{
              display: 'flex', alignItems: 'center', gap: '6px', cursor: 'pointer',
              background: 'none', borderRadius: 'var(--radius-full)', padding: '5px 12px',
              border: `1px solid ${bg && bg.dark ? 'rgba(255,255,255,0.30)' : 'rgba(26,18,8,0.22)'}`,
              color: ink, fontSize: '13px', fontWeight: 500, fontFamily: 'var(--font-body)',
              transition: 'color 420ms var(--ease-default), border-color 420ms var(--ease-default)',
            }}
          >
            🌐 {lang}
            <span style={{ fontSize: '9px', opacity: 0.65, transform: langOpen ? 'rotate(180deg)' : 'none', transition: 'transform var(--duration-fast) var(--ease-default)' }}>▾</span>
          </button>
          {langOpen && (
            <div role="listbox" style={{
              position: 'absolute', top: 'calc(100% + 10px)', right: 0, minWidth: '170px',
              background: 'var(--day-raised)', border: '1px solid var(--day-border)',
              borderRadius: 'var(--radius-md)', boxShadow: 'var(--shadow-md)', padding: '6px',
            }}>
              {[
                { code: 'EN', label: 'English' },
                { code: 'DE', label: 'Deutsch', soon: true, soonLabel: 'bald!' },
                { code: 'ES', label: 'Español', soon: true, soonLabel: '¡pronto!' },
              ].map((l) => (
                <button
                  key={l.code}
                  role="option" aria-selected={lang === l.code}
                  disabled={l.soon}
                  onClick={() => { if (!l.soon) { setLang(l.code); setLangOpen(false); } }}
                  style={{
                    display: 'flex', alignItems: 'center', justifyContent: 'space-between', width: '100%',
                    background: lang === l.code ? 'rgba(24,168,186,0.10)' : 'none', border: 'none',
                    borderRadius: 'var(--radius-sm)', padding: '8px 10px', cursor: l.soon ? 'default' : 'pointer',
                    fontSize: '14px', fontFamily: 'var(--font-body)', textAlign: 'left',
                    color: l.soon ? 'var(--text-day-muted)' : 'var(--text-day-primary)',
                    fontWeight: lang === l.code ? 600 : 400,
                  }}
                >
                  <span>{l.label}</span>
                  {lang === l.code && <span style={{ color: 'var(--teal)', fontSize: '13px' }}>✓</span>}
                  {l.soon && <span style={{ fontSize: '10.5px', fontStyle: 'italic', color: 'var(--terracotta)' }}>{l.soonLabel}</span>}
                </button>
              ))}
            </div>
          )}
        </div>
        <a href="https://app.soymarinero.com/login" className="sm-nav-login" style={{ fontSize: '14px', fontWeight: 500, color: ink, textDecoration: 'none', opacity: 0.78, transition: 'color 420ms var(--ease-default)' }}>Log in</a>
        <NButton variant="teal" size="sm" onClick={() => { window.location.href = 'https://app.soymarinero.com'; }}>Start free</NButton>
      </div>
    </nav>
  );
}

/* ---- 2 · HERO (100vh, Mediterranean daylight) — sky, sea, spinnaker run ---- */
function Hero() {
  return (
    <section className="sm-hero" style={{
      position: 'relative', minHeight: '100vh', display: 'flex', flexDirection: 'column',
      alignItems: 'center', justifyContent: 'center', textAlign: 'center',
      padding: '112px var(--gutter-mobile) 28vh', overflow: 'hidden',
      background: 'linear-gradient(to bottom, #9FC6DC 0%, #C2DCE8 38%, #ECF3F2 62%)',
    }}>
      <DaySea height="40vh" fadeOnScroll fadeDistance={560} />
      <div style={{ position: 'relative', zIndex: 1, width: '100%', maxWidth: '840px', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
        <h1 style={{
          fontFamily: 'var(--font-display)', fontWeight: 900, fontSize: 'clamp(34px, 5vw, 56px)',
          lineHeight: 1.1, color: 'var(--text-day-primary)', width: '100%', textAlign: 'center', margin: '0 0 20px',
        }}>
          Learn to sail &mdash; and actually be <em style={{ fontStyle: 'italic', color: 'var(--teal-dim)' }}>useful crew.</em>
        </h1>
        <p style={{ fontFamily: 'var(--font-display)', fontStyle: 'italic', fontSize: 'clamp(16px, 2vw, 20px)', color: 'rgba(26,18,8,0.68)', margin: '0 0 24px', width: '100%', textAlign: 'center' }}>
          Yo no soy marinero...
        </p>
        <p style={{ fontSize: '17px', fontWeight: 400, color: 'var(--text-day-primary)', maxWidth: '500px', lineHeight: 1.7, margin: 0, opacity: 0.85 }}>
          Bite-size cards, 10 modules, at your own pace &mdash; 10 minutes a day. Charter booked or not: own it forever.
        </p>
        <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '14px', marginTop: '30px' }}>
          <NButton variant="teal" size="lg" onClick={() => { window.location.href = 'https://app.soymarinero.com'; }} style={{ fontSize: '16px', padding: '16px 40px' }}>Start free</NButton>
          <a href="sailing-test.html"
            style={{ fontSize: '14.5px', fontWeight: 500, color: 'var(--teal-dim)', textDecoration: 'none', borderBottom: '1px solid rgba(13,122,138,0.35)', paddingBottom: '2px' }}>
            What&rsquo;s your sailing rank? Take the 2-min test &rarr;
          </a>
        </div>
      </div>
      <div
        onClick={() => window.scrollTo({ top: window.innerHeight, behavior: 'smooth' })}
        style={{
          position: 'absolute', bottom: '30px', left: '50%', transform: 'translateX(-50%)', zIndex: 1,
          display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '12px', cursor: 'pointer',
          fontSize: '11px', letterSpacing: '0.22em', textTransform: 'uppercase', color: 'rgba(255,255,255,0.85)',
        }}
      >
        Scroll
        <span className="sm-bob" style={{
          width: '11px', height: '11px', borderRight: '1.5px solid rgba(255,255,255,0.9)', borderBottom: '1.5px solid rgba(255,255,255,0.9)',
          transform: 'rotate(45deg)', animation: 'sm-bob 1.8s var(--ease-default) infinite', display: 'block',
        }} />
      </div>
    </section>
  );
}

/* ---- 6 · RANKS — sunlit-shallows azure, dark ink, escalating staircase ---- */
/* boat silhouettes — ink + linen sails, growing with rank */
const BI = 'rgba(8,40,52,0.60)';      /* ink stroke   */
const BH = 'rgba(8,40,52,0.62)';      /* hull fill    */
const BS = '#F4EFE3';                  /* sail fill    */
const BSk = 'rgba(8,40,52,0.35)';     /* sail stroke  */
const BW = 'rgba(255,255,255,0.55)';  /* wave stroke  */

const RANKS = [
  { name: 'Turista', lvl: 1, ink: 'rgba(10,46,58,0.55)', label: 13, xpSize: 11, cls: 'Optimist',
    boat: (
      <svg width="34" height="38" viewBox="0 0 34 38" aria-hidden="true">
        <line x1="13" y1="5" x2="13" y2="27" stroke={BI} strokeWidth="1.5" />
        <path d="M15,7 L28,11 L26,25 L15,25 Z" fill={BS} stroke={BSk} strokeWidth="1" />
        <path d="M4,27 L30,27 L27,33 L7,33 Z" fill={BH} />
        <path d="M2,36 q4,-2.5 8,0 t8,0 t8,0 t8,0" fill="none" stroke={BW} strokeWidth="1.5" strokeLinecap="round" />
      </svg>
    ) },
  { name: 'Marinero', lvl: 2, ink: 'rgba(10,46,58,0.65)', label: 14, xpSize: 11.5, cls: 'Laser',
    boat: (
      <svg width="44" height="44" viewBox="0 0 44 44" aria-hidden="true">
        <line x1="18" y1="4" x2="18" y2="33" stroke={BI} strokeWidth="1.5" />
        <path d="M19,5 L34,31 L19,31 Z" fill={BS} stroke={BSk} strokeWidth="1" />
        <path d="M3,33 L41,33 L37,38 L7,38 Z" fill={BH} />
        <path d="M2,42 q4.5,-2.5 9,0 t9,0 t9,0 t9,0" fill="none" stroke={BW} strokeWidth="1.5" strokeLinecap="round" />
      </svg>
    ) },
  { name: 'Navegante', lvl: 3, ink: 'rgba(10,46,58,0.78)', label: 15, xpSize: 12, cls: 'Day sailer',
    boat: (
      <svg width="56" height="58" viewBox="0 0 56 58" aria-hidden="true">
        <line x1="24" y1="4" x2="24" y2="43" stroke={BI} strokeWidth="1.6" />
        <path d="M25,5 L41,41 L25,41 Z" fill={BS} stroke={BSk} strokeWidth="1" />
        <path d="M22,11 L9,41 L22,41 Z" fill={BS} stroke={BSk} strokeWidth="1" opacity="0.9" />
        <path d="M5,43 L51,43 L46,50 L10,50 Z" fill={BH} />
        <path d="M3,55 q5,-3 10,0 t10,0 t10,0 t10,0 t10,0" fill="none" stroke={BW} strokeWidth="1.5" strokeLinecap="round" />
      </svg>
    ) },
  { name: 'Piloto', lvl: 4, ink: 'rgba(10,46,58,0.88)', label: 16, xpSize: 13, cls: '35ft cruiser',
    boat: (
      <svg width="72" height="72" viewBox="0 0 72 72" aria-hidden="true">
        <line x1="32" y1="4" x2="32" y2="53" stroke={BI} strokeWidth="1.7" />
        <path d="M33,5 L53,51 L33,51 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        <path d="M30,10 L12,51 L30,51 Z" fill={BS} stroke={BSk} strokeWidth="1.1" opacity="0.9" />
        <path d="M23,53 L27,48 L45,48 L49,53 Z" fill={BH} opacity="0.55" />
        <path d="M6,53 L66,53 L60,62 L12,62 Z" fill={BH} />
        <path d="M4,68 q5.5,-3 11,0 t11,0 t11,0 t11,0 t11,0 t11,0" fill="none" stroke={BW} strokeWidth="1.6" strokeLinecap="round" />
      </svg>
    ) },
  { name: 'Oficial', lvl: 5, ink: '#0A2E3A', label: 17.5, xpSize: 14, cls: '50ft cruiser',
    boat: (
      <svg width="88" height="90" viewBox="0 0 88 90" aria-hidden="true">
        <line x1="40" y1="4" x2="40" y2="67" stroke={BI} strokeWidth="1.8" />
        <path d="M41,5 L66,65 L41,65 Z" fill={BS} stroke={BSk} strokeWidth="1.2" />
        <path d="M37,9 L13,65 L37,65 Z" fill={BS} stroke={BSk} strokeWidth="1.2" opacity="0.9" />
        <path d="M28,67 L33,61 L56,61 L61,67 Z" fill={BH} opacity="0.55" />
        <path d="M6,67 L82,67 L75,78 L13,78 Z" fill={BH} />
        <path d="M4,85 q6,-3.5 12,0 t12,0 t12,0 t12,0 t12,0 t12,0 t12,0" fill="none" stroke={BW} strokeWidth="1.6" strokeLinecap="round" />
      </svg>
    ) },
  { name: 'Capitán ♪', lvl: 6, ink: '#7A5208', label: 20, xpSize: 16, capitan: true, cls: 'Tall ship',
    boat: (
      <svg width="150" height="126" viewBox="0 0 150 126" aria-hidden="true">
        {/* three masts — fore, main (tallest), mizzen */}
        <line x1="45" y1="22" x2="45" y2="96" stroke={BI} strokeWidth="2" />
        <line x1="78" y1="8" x2="78" y2="96" stroke={BI} strokeWidth="2.2" />
        <line x1="110" y1="26" x2="110" y2="96" stroke={BI} strokeWidth="2" />
        {/* saffron pennant on the main */}
        <path d="M78,8 L92,12 L78,16 Z" fill="var(--saffron)" />
        {/* square sails — fore mast */}
        <path d="M34,28 Q45,33 56,28 L56,44 Q45,49 34,44 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        <path d="M31,48 Q45,54 59,48 L59,66 Q45,72 31,66 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        <path d="M29,70 Q45,77 61,70 L61,88 Q45,95 29,88 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        {/* square sails — main mast */}
        <path d="M65,16 Q78,21 91,16 L91,32 Q78,37 65,32 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        <path d="M62,36 Q78,42 94,36 L94,56 Q78,62 62,56 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        <path d="M60,60 Q78,67 96,60 L96,88 Q78,95 60,88 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        {/* square sails — mizzen */}
        <path d="M100,32 Q110,36 120,32 L120,48 Q110,52 100,48 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        <path d="M98,52 Q110,57 122,52 L122,72 Q110,77 98,72 Z" fill={BS} stroke={BSk} strokeWidth="1.1" />
        {/* jibs to the bowsprit */}
        <path d="M44,40 L16,94 L44,94 Z" fill={BS} stroke={BSk} strokeWidth="1" opacity="0.9" />
        {/* bowsprit */}
        <line x1="18" y1="96" x2="2" y2="88" stroke={BI} strokeWidth="1.8" strokeLinecap="round" />
        {/* hull — long, with sheer line + gold stripe */}
        <path d="M6,96 L142,96 C140,103 134,110 126,111 L22,111 C14,109 9,103 6,96 Z" fill={BH} />
        <path d="M9,100 L138,100" stroke="var(--saffron)" strokeWidth="1.6" opacity="0.85" />
        <path d="M3,120 q7,-3.5 14,0 t14,0 t14,0 t14,0 t14,0 t14,0 t14,0 t14,0 t14,0" fill="none" stroke={BW} strokeWidth="1.7" strokeLinecap="round" />
      </svg>
    ) },
];
function Ranks() {
  return (
    <section style={{ position: 'relative', background: 'linear-gradient(to bottom, #BFE0E8 0%, #93C8D4 46%, #6FB0C0 100%)', padding: '56px 0 calc(var(--section-pad-y) + 16px)', overflow: 'hidden' }}>
      {/* caustic light ripples near the surface */}
      <svg width="100%" height="90" viewBox="0 0 1400 90" preserveAspectRatio="none" aria-hidden="true" style={{ position: 'absolute', top: 0, left: 0, opacity: 0.5 }}>
        <path d="M0,38 Q120,18 260,34 T540,30 T820,36 T1110,28 T1400,34" stroke="rgba(255,255,255,0.5)" strokeWidth="2" fill="none" />
        <path d="M0,66 Q160,48 320,62 T640,58 T960,64 T1400,56" stroke="rgba(255,255,255,0.32)" strokeWidth="1.6" fill="none" />
      </svg>
      {/* small school of fish — deeper-toned accents */}
      <svg className="ds-w2" width="210" height="96" viewBox="0 0 210 96" aria-hidden="true" style={{ position: 'absolute', top: '72px', right: '6%', opacity: 0.55 }}>
        <g fill="rgba(10,60,76,0.45)">
          <path d="M26,26 q12,-8 25,0 q-13,8 -25,0 Z M26,26 l-9,-6 l2,6 l-2,6 Z" />
          <path d="M76,14 q11,-7 22,0 q-11,7 -22,0 Z M76,14 l-8,-5 l2,5 l-2,5 Z" />
          <path d="M106,42 q12,-8 25,0 q-13,8 -25,0 Z M106,42 l-9,-6 l2,6 l-2,6 Z" />
          <path d="M152,22 q10,-6 20,0 q-10,6 -20,0 Z M152,22 l-7,-5 l2,5 l-2,5 Z" />
          <path d="M68,66 q11,-7 22,0 q-11,7 -22,0 Z M68,66 l-8,-5 l2,5 l-2,5 Z" />
        </g>
      </svg>
      {/* anchor in corals — bottom left, deeper tones */}
      <svg width="190" height="170" viewBox="0 0 210 190" aria-hidden="true" style={{ position: 'absolute', bottom: '-6px', left: '3%', opacity: 0.85 }}>
        <g fill="none" strokeLinecap="round">
          <path d="M40,186 L40,158 M40,168 L28,150 M40,170 L52,154 M28,150 L22,138 M52,154 L60,142" stroke="rgba(178,74,30,0.55)" strokeWidth="5" />
          <path d="M178,186 L178,162 M178,170 L166,152 M178,172 L190,158" stroke="rgba(212,140,22,0.50)" strokeWidth="4.5" />
          <path d="M82,188 q-4,-18 6,-30 M88,188 q2,-16 14,-24" stroke="rgba(255,255,255,0.40)" strokeWidth="4" />
        </g>
        <g stroke="rgba(8,40,52,0.55)" strokeWidth="7" fill="none" strokeLinecap="round" transform="rotate(-14 120 120)">
          <circle cx="120" cy="58" r="9" strokeWidth="5.5" />
          <line x1="120" y1="67" x2="120" y2="152" />
          <line x1="96" y1="84" x2="144" y2="84" strokeWidth="6" />
          <path d="M84,124 C88,146 102,158 120,162 C138,158 152,146 156,124" />
          <path d="M84,124 L76,136 M84,124 L97,128" strokeWidth="5.5" />
          <path d="M156,124 L164,136 M156,124 L143,128" strokeWidth="5.5" />
        </g>
      </svg>

      <div style={{ ...wrap, position: 'relative' }}>
        <h2 style={{ fontFamily: 'var(--font-display)', fontWeight: 700, fontSize: 'clamp(28px, 4vw, 40px)', color: '#0A2E3A', textAlign: 'center', margin: '0 0 10px' }}>Earn your keep</h2>
        <p style={{ textAlign: 'center', fontFamily: 'var(--font-display)', fontStyle: 'italic', fontSize: 'clamp(16px, 2vw, 20px)', color: 'rgba(10,46,58,0.55)', margin: '0 0 10px' }}>
          Yo no soy marinero — <strong style={{ fontStyle: 'normal', color: '#B07508' }}>soy capitán.</strong>
        </p>
        <p style={{ textAlign: 'center', color: 'rgba(10,46,58,0.65)', fontWeight: 300, fontSize: '15px', lineHeight: 1.65, maxWidth: '480px', margin: '0 auto 56px' }}>
          Climb the ranks, grow your boat, all the way to Capitán.
        </p>

        {/* the fleet — strictly horizontal, boats grow with rank */}
        <div className="sm-fleet" style={{ display: 'flex', alignItems: 'flex-end', justifyContent: 'center', gap: 'clamp(10px, 2.2vw, 30px)', maxWidth: '960px', margin: '0 auto 30px', flexWrap: 'wrap' }}>
          {RANKS.map((r) => (
            <div key={r.name} style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '8px', textAlign: 'center' }}>
              {r.boat}
              <span style={{ fontSize: `${r.label}px`, fontWeight: r.capitan ? 700 : 500, color: r.ink, lineHeight: 1.2, whiteSpace: 'nowrap' }}>{r.name}</span>
              <span style={{ fontFamily: 'var(--font-display)', fontWeight: 700, fontSize: `${r.xpSize}px`, color: r.ink, opacity: 0.75 }}><span style={{ fontFamily: 'var(--font-body)', fontWeight: 400, fontSize: '10px', letterSpacing: '0.08em', marginRight: '4px' }}>LEVEL</span>{r.lvl}</span>
            </div>
          ))}
        </div>

      </div>
    </section>
  );
}
/* ---- 13 · BOTTOM CTA (night, mirrors hero) ---- */
function BottomCta() {
  return (
    <section id="signup" style={{ background: 'var(--night-base)', padding: '104px var(--gutter-mobile)', textAlign: 'center', position: 'relative', overflow: 'hidden' }}>
      {/* star sparkle on the firmament */}
      <StarField count={90} fadeOnScroll={false} style={{ height: '55%' }} />
      <div style={{ position: 'absolute', top: '-80px', left: '50%', transform: 'translateX(-50%)', width: '700px', height: '400px', background: 'radial-gradient(ellipse, rgba(24,168,186,0.07) 0%, transparent 70%)', pointerEvents: 'none' }} />

      {/* —— Riviera night · sleek marina, left —— */}
      <svg className="sm-night-art" width="400" height="240" viewBox="0 0 400 240" aria-hidden="true" style={{ bottom: 0, left: 0 }}>
        {/* low hill + buildings behind the marina */}
        <path d="M0,150 C60,138 120,142 180,152 L180,200 L0,200 Z" fill="rgba(255,255,255,0.035)" />
        <g fill="rgba(255,255,255,0.055)">
          <rect x="18" y="118" width="30" height="50" /><rect x="54" y="130" width="24" height="38" />
          <rect x="84" y="110" width="34" height="58" /><rect x="124" y="126" width="26" height="42" />
        </g>
        {/* warm windows */}
        <g className="mo-sh2" fill="rgba(255,196,110,0.75)">
          <rect x="24" y="126" width="3" height="3" /><rect x="36" y="138" width="3" height="3" />
          <rect x="92" y="120" width="3" height="3" /><rect x="104" y="134" width="3" height="3" />
          <rect x="130" y="134" width="3" height="3" /><rect x="60" y="140" width="3" height="3" />
        </g>
        {/* breakwater + pontoon */}
        <path d="M0,176 L196,176 L196,181 L0,181 Z" fill="rgba(255,255,255,0.07)" />
        {/* moored yachts — sleek hulls + masts */}
        <g>
          <line x1="58" y1="108" x2="58" y2="170" stroke="rgba(255,255,255,0.16)" strokeWidth="1.6" />
          <path d="M36,170 L84,170 L78,177 L41,177 Z" fill="rgba(255,255,255,0.10)" />
          <line x1="122" y1="94" x2="122" y2="168" stroke="rgba(255,255,255,0.16)" strokeWidth="1.8" />
          <path d="M96,168 L152,168 L145,177 L102,177 Z" fill="rgba(255,255,255,0.11)" />
          {/* motoryacht */}
          <path d="M166,160 L172,152 L188,152 L192,160 Z" fill="rgba(255,255,255,0.09)" />
          <path d="M158,160 L200,160 L194,170 L163,170 Z" fill="rgba(255,255,255,0.12)" />
        </g>
        {/* masthead + pontoon lights */}
        <g className="mo-sh1">
          <circle cx="58" cy="106" r="1.8" fill="rgba(255,210,130,0.9)" />
          <circle cx="122" cy="92" r="1.8" fill="rgba(255,210,130,0.9)" />
          <circle cx="20" cy="172" r="1.6" fill="rgba(255,196,110,0.8)" />
          <circle cx="96" cy="172" r="1.6" fill="rgba(255,196,110,0.8)" />
          <circle cx="178" cy="148" r="1.6" fill="rgba(255,196,110,0.85)" />
        </g>
        {/* reflections */}
        <g className="mo-sh3" stroke="rgba(255,196,110,0.22)" strokeWidth="1.4" strokeLinecap="round">
          <line x1="52" y1="190" x2="66" y2="190" /><line x1="114" y1="196" x2="132" y2="196" />
          <line x1="168" y1="188" x2="190" y2="188" /><line x1="24" y1="198" x2="38" y2="198" />
        </g>
        <g className="mo-sh2" stroke="rgba(24,168,186,0.18)" strokeWidth="1.3" strokeLinecap="round">
          <line x1="84" y1="206" x2="100" y2="206" /><line x1="146" y1="212" x2="160" y2="212" />
        </g>
      </svg>

      {/* —— Riviera night · catamaran docked in the marina, right —— */}
      <svg className="sm-night-art" width="400" height="240" viewBox="0 0 400 240" aria-hidden="true" style={{ bottom: 0, right: 0 }}>
        {/* pontoon running to the right edge */}
        <path d="M150,196 L400,196 L400,202 L150,202 Z" fill="rgba(255,255,255,0.07)" />
        {/* dock cleats + bollard */}
        <rect x="176" y="192" width="8" height="4" rx="2" fill="rgba(255,255,255,0.10)" />
        <rect x="330" y="192" width="8" height="4" rx="2" fill="rgba(255,255,255,0.10)" />
        {/* mast — tall, just off-centre of the boat */}
        <line x1="246" y1="22" x2="246" y2="160" stroke="rgba(255,255,255,0.16)" strokeWidth="2" />
        {/* furled main along the boom */}
        <path d="M246,148 L302,150 L298,156 L246,154 Z" fill="rgba(255,255,255,0.09)" />
        {/* forestay + shroud — barely there */}
        <line x1="246" y1="26" x2="180" y2="158" stroke="rgba(255,255,255,0.07)" strokeWidth="1" />
        <line x1="246" y1="26" x2="308" y2="156" stroke="rgba(255,255,255,0.07)" strokeWidth="1" />
        {/* coachroof / saloon — low, wide, sleek */}
        <path d="M192,160 C200,150 222,144 246,144 C270,144 292,150 300,160 Z" fill="rgba(255,255,255,0.085)" />
        {/* saloon glazing strip */}
        <path d="M206,154 C220,148 272,148 286,154 L284,158 L208,158 Z" fill="rgba(24,168,186,0.13)" />
        {/* bridgedeck */}
        <path d="M172,160 L320,160 L316,168 L176,168 Z" fill="rgba(255,255,255,0.10)" />
        {/* twin hulls — the catamaran signature, gap visible between */}
        <path d="M164,168 L212,168 L208,184 L172,184 Z" fill="rgba(255,255,255,0.12)" />
        <path d="M280,168 L328,168 L322,184 L286,184 Z" fill="rgba(255,255,255,0.12)" />
        {/* mooring lines to the dock */}
        <path d="M208,182 C196,190 188,193 180,194" fill="none" stroke="rgba(255,255,255,0.10)" strokeWidth="1" />
        <path d="M322,182 C330,189 334,192 336,194" fill="none" stroke="rgba(255,255,255,0.10)" strokeWidth="1" />
        {/* lights — masthead, saloon glow, pontoon */}
        <g className="mo-sh1">
          <circle cx="246" cy="20" r="1.8" fill="rgba(255,210,130,0.9)" />
          <circle cx="246" cy="152" r="5" fill="rgba(255,196,110,0.18)" />
          <circle cx="166" cy="190" r="1.6" fill="rgba(255,196,110,0.8)" />
          <circle cx="352" cy="190" r="1.6" fill="rgba(255,196,110,0.8)" />
        </g>
        {/* saloon windows lit */}
        <g className="mo-sh3" fill="rgba(255,196,110,0.55)">
          <rect x="218" y="151" width="4" height="3" /><rect x="232" y="150" width="4" height="3" />
          <rect x="258" y="150" width="4" height="3" /><rect x="272" y="151" width="4" height="3" />
        </g>
        {/* reflections under the hulls */}
        <g className="mo-sh2" stroke="rgba(255,196,110,0.20)" strokeWidth="1.4" strokeLinecap="round">
          <line x1="180" y1="214" x2="200" y2="214" /><line x1="292" y1="218" x2="312" y2="218" />
          <line x1="240" y1="226" x2="256" y2="226" />
        </g>
        <g className="mo-sh3" stroke="rgba(24,168,186,0.16)" strokeWidth="1.3" strokeLinecap="round">
          <line x1="214" y1="222" x2="228" y2="222" /><line x1="322" y1="212" x2="338" y2="212" />
        </g>
      </svg>

      <div style={{ position: 'relative', maxWidth: '640px', margin: '0 auto' }}>
        <h2 style={{ fontFamily: 'var(--font-display)', fontWeight: 700, fontSize: 'clamp(30px, 4.6vw, 48px)', lineHeight: 1.1, color: '#fff', margin: '0 0 12px' }}>
          Your charter is booked.<br />Are you <em style={{ fontStyle: 'italic', color: 'var(--teal)' }}>ready?</em>
        </h2>
        <p style={{ fontFamily: 'var(--font-display)', fontStyle: 'italic', fontSize: 'clamp(16px, 2vw, 20px)', color: 'rgba(255,255,255,0.40)', margin: '0 0 36px' }}>
          Yo no soy marinero — <strong style={{ fontStyle: 'normal', color: 'var(--saffron)' }}>prove them wrong.</strong>
        </p>
        <NButton variant="teal" size="lg" onClick={() => { window.location.href = 'https://app.soymarinero.com'; }} style={{ fontSize: '16px', padding: '17px 44px' }}>Sign up free →</NButton>
        <p style={{ fontSize: '12px', color: 'var(--text-night-muted)', marginTop: '14px' }}>Free · No credit card · Works in your browser</p>
      </div>
    </section>
  );
}

/* ---- 14 · FOOTER ---- */
function Footer() {
  return (
    <footer style={{ background: 'var(--night-base)', borderTop: '1px solid rgba(255,255,255,0.05)', padding: '30px 24px 26px', textAlign: 'center', fontSize: '13px', color: 'rgba(255,255,255,0.25)' }}>
      <div style={{ display: 'flex', flexWrap: 'wrap', gap: '6px 22px', justifyContent: 'center', marginBottom: '16px' }}>
        <a href="knots/index.html" style={{ color: 'rgba(255,255,255,0.55)', textDecoration: 'none', fontWeight: 500 }}>Knots hub</a>
        <a href="parts-of-a-sailboat.html" style={{ color: 'rgba(255,255,255,0.45)', textDecoration: 'none' }}>Parts of a sailboat</a>
        <a href="boat-and-wind.html" style={{ color: 'rgba(255,255,255,0.45)', textDecoration: 'none' }}>Boat &amp; wind explorer</a>
        <a href="points-of-sail.html" style={{ color: 'rgba(255,255,255,0.45)', textDecoration: 'none' }}>Points of sail</a>
        <a href="sailing-test.html" style={{ color: 'rgba(255,255,255,0.45)', textDecoration: 'none' }}>Sailing test</a>
        <a href="sailing-terms.html" style={{ color: 'rgba(255,255,255,0.45)', textDecoration: 'none' }}>Sailing terms</a>
      </div>
      <div style={{ display: 'flex', flexWrap: 'wrap', gap: '6px 22px', justifyContent: 'center', marginBottom: '16px', fontSize: '12.5px' }}>
        <a href="privacy.html" style={{ color: 'rgba(255,255,255,0.5)', textDecoration: 'none' }}>Privacy</a>
        <a href="terms.html" style={{ color: 'rgba(255,255,255,0.5)', textDecoration: 'none' }}>Terms</a>
        <a href="help.html" style={{ color: 'rgba(255,255,255,0.5)', textDecoration: 'none' }}>Help</a>
      </div>
      <div style={{ display: 'flex', gap: '14px', justifyContent: 'center', marginBottom: '18px', fontSize: '12px' }}>
        {['EN', 'DE', 'ES'].map((c, i) => (
          <a key={c} href="#" onClick={(e) => e.preventDefault()} style={{ color: i === 0 ? 'rgba(24,168,186,0.9)' : 'rgba(255,255,255,0.35)', textDecoration: 'none', fontWeight: i === 0 ? 600 : 400 }}>{c}</a>
        ))}
      </div>
      © 2026 Marinero&nbsp;&nbsp;·&nbsp;&nbsp;Built in Innsbruck, Austria&nbsp;&nbsp;·&nbsp;&nbsp;
      <a href="mailto:180@dartshub.com" style={{ color: 'rgba(24,168,186,0.6)', textDecoration: 'none' }}>Contact</a>
    </footer>
  );
}

/* ---- 5 · KEEL WAVE — day → sea transition with sailboat cross-section ---- */
function KeelWave() {
  return (
    <div aria-hidden="true" style={{ position: 'relative', height: '300px', background: 'var(--day-base)', overflow: 'hidden' }}>
      <style>{`
        @keyframes keel-bob { 0%, 100% { transform: translateY(0) rotate(-0.7deg); } 50% { transform: translateY(5px) rotate(0.7deg); } }
        .keel-boat-inner { animation: keel-bob 7s ease-in-out infinite; transform-origin: 50% 88%; }
        @media (prefers-reduced-motion: reduce) { .keel-boat-inner { animation: none; } }
        @media (max-width: 700px) { .keel-boat-outer { transform: scale(0.78); transform-origin: 50% 100%; } }
      `}</style>

      {/* sea — domed horizon, blends into the Ranks gradient (#BFE0E8) */}
      <div style={{ position: 'absolute', left: '-10%', width: '120%', top: '200px', bottom: '-1px', borderRadius: '50% 50% 0 0 / 70px 70px 0 0', background: 'linear-gradient(180deg, #DAEDF2 0%, #C9E5EC 45%, #BFE0E8 100%)' }}></div>

      {/* drifting wave detail lines */}
      <svg className="ds-w1" viewBox="0 0 1200 40" preserveAspectRatio="none" style={{ position: 'absolute', left: '-5%', width: '110%', top: '238px', height: '40px', opacity: 0.55 }}>
        <path d="M0 22 Q100 12 200 22 T400 22 T600 22 T800 22 T1000 22 T1200 22" fill="none" stroke="rgba(255,255,255,0.6)" strokeWidth="1.5"></path>
      </svg>
      <svg className="ds-w2" viewBox="0 0 1200 40" preserveAspectRatio="none" style={{ position: 'absolute', left: '-5%', width: '110%', top: '272px', height: '40px', opacity: 0.4 }}>
        <path d="M0 20 Q120 30 240 20 T480 20 T720 20 T960 20 T1200 20" fill="none" stroke="rgba(255,255,255,0.55)" strokeWidth="1.5"></path>
      </svg>

      {/* sailboat — hull on the surface, keel & rudder below the waterline */}
      <div className="keel-boat-outer" style={{ position: 'absolute', left: '50%', marginLeft: '-170px', top: '2px', width: '340px', height: '300px' }}>
        <svg className="keel-boat-inner" viewBox="0 0 340 300" style={{ width: '100%', height: '100%', display: 'block' }}>
          {/* mast */}
          <line x1="158" y1="6" x2="158" y2="196" stroke="#8A8275" strokeWidth="3"></line>
          {/* mainsail (right, large) */}
          <path d="M162 12 C174 64 200 134 256 188 L162 188 Z" fill="#EDE3D0" stroke="#DACBB2" strokeWidth="1"></path>
          {/* boom */}
          <line x1="154" y1="189" x2="252" y2="187" stroke="#8A8275" strokeWidth="2.5" strokeLinecap="round"></line>
          {/* jib (left, smaller) */}
          <path d="M152 52 C136 96 120 144 112 186 L152 186 Z" fill="#F3EBDC" stroke="#DACBB2" strokeWidth="1"></path>
          {/* hull */}
          <path d="M102 196 Q168 189 238 196 C232 212 208 226 168 228 C128 226 108 212 102 196 Z" fill="#5B7380"></path>
          <path d="M102 196 Q168 189 238 196 L236 200 Q168 193 104 200 Z" fill="#F5F2EA" opacity="0.9"></path>
          {/* keel + rudder, submerged */}
          <path d="M148 228 L148 266 Q148 275 157 275 Q166 275 166 266 L166 228 Z" fill="#4E6876" opacity="0.78"></path>
          <path d="M202 225 L213 225 L217 254 L207 256 Z" fill="#4E6876" opacity="0.72"></path>
          {/* bubbles */}
          <g className="mo-sh2" fill="rgba(255,255,255,0.55)">
            <circle cx="176" cy="240" r="2.5"></circle><circle cx="182" cy="252" r="2"></circle><circle cx="172" cy="262" r="1.6"></circle>
          </g>
          {/* waterline foam */}
          <path d="M102 199 Q168 205 238 199" fill="none" stroke="rgba(255,255,255,0.75)" strokeWidth="2.5" strokeLinecap="round"></path>
          <path d="M58 202 Q76 198 96 202" fill="none" stroke="rgba(255,255,255,0.8)" strokeWidth="3" strokeLinecap="round" className="mo-sh1"></path>
          <path d="M244 202 Q264 198 284 202" fill="none" stroke="rgba(255,255,255,0.8)" strokeWidth="3" strokeLinecap="round" className="mo-sh3"></path>
        </svg>
      </div>
    </div>
  );
}

Object.assign(window, { Nav, Hero, Ranks, KeelWave, BottomCta, Footer });
