/* Boot splash (22 Nov 2026): Atlantic, CrewTune and a schooner that hoists
   her sails while the app loads and while signing in. Markup in index.html,
   show/hide in js/boot-splash.js. */
.boot-splash {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px;
  background:
    radial-gradient(900px 600px at 50% 35%, rgba(184,135,61,0.12), transparent 60%),
    linear-gradient(160deg, #0b1f2a 0%, #06121a 100%);
  color: #f4f1ea;
  opacity: 1; transition: opacity .3s ease;
}
.boot-splash[hidden] { display: none; }
.boot-splash-foot {
  position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom));
  text-align: center; font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 11px; letter-spacing: .12em; line-height: 1.6; color: rgba(244,241,234,.42);
}
.boot-splash-ver { text-transform: uppercase; letter-spacing: .2em; }
.login-version {
  margin-top: 14px; text-align: center; font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 11px; letter-spacing: .12em; line-height: 1.6; color: rgba(244,241,234,.42);
}
.login-version:empty { display: none; }
.boot-splash.is-leaving { opacity: 0; pointer-events: none; }

.boot-splash-ship { width: min(80vw, 340px); height: auto; overflow: hidden; }
.boot-splash-ship .bs-sail {
  fill: #f4f1ea; fill-opacity: .94; stroke: rgba(255,255,255,.3); stroke-width: 1; stroke-linejoin: round;
  transform-box: fill-box; opacity: 0;
}
/* 1) The three lowers are hoisted by js/boot-splash.js (gaff, throat and peak move). */
.boot-splash-ship .bs-low { opacity: 1; }
/* 2) Staysail, inner jib and outer jib run up their stays from the tack. */
.boot-splash-ship .bs-head { transform-origin: 100% 100%; transform: scale(.05); animation: bs-stay 3s cubic-bezier(.37,0,.63,1) 7.4s forwards; }
/* 3) The yankee together with the topsails, hoisted from deck. */
.boot-splash-ship .bs-head-top { animation-delay: 10.2s; animation-duration: 3.6s; }
.boot-splash-ship .bs-top { transform-origin: 100% 100%; transform: translateY(170px) scale(.3); animation: bs-topsail 3.6s cubic-bezier(.37,0,.63,1) 10.2s forwards; }
.boot-splash-ship .bs-pole { fill: none; stroke: #e9dcc0; stroke-width: 1.1; stroke-linecap: round; }
.boot-splash-ship .bs-flag { transform: translateY(46px); opacity: 0; animation: bs-flag 2.2s cubic-bezier(.37,0,.63,1) 13.4s forwards; }
.boot-splash-ship .bs-flutter { transform-box: fill-box; transform-origin: 100% 0; animation: bs-flutter 2.4s ease-in-out infinite alternate; }
.boot-splash-ship .bs-pennant { fill: #f4f1ea; }
.boot-splash-ship .bs-band { fill: #2a5aa8; }
.boot-splash-ship .bs-race { fill: #c8102e; }
.boot-splash-ship .bs-race-no { fill: #fff; font: 700 10px Arial, sans-serif; }
.boot-splash-ship .bs-rig { fill: none; stroke: rgba(217,207,184,.45); stroke-width: .8; }
.boot-splash-ship .bs-run { fill: none; stroke: rgba(217,207,184,.25); stroke-width: .6; stroke-dasharray: 3 2; }
.boot-splash-ship .bs-spar { fill: none; stroke: #d9cfb8; stroke-width: 2.4; stroke-linecap: round; }
.boot-splash-ship .bs-hull { fill: #0f2531; stroke: #c9a45c; stroke-width: 1.4; }
.boot-splash-ship .bs-house { fill: #c9b48a; stroke: #c9b48a; stroke-width: 1; }
.boot-splash-ship .bs-sheer { fill: none; stroke: #c9a45c; stroke-width: 1.6; }
.boot-splash-ship .bs-ports { fill: #e9dcc0; }
.boot-splash-ship .bs-sea { fill: #0a1c26; }
.boot-splash-ship .bs-wave { fill: none; stroke: #c9a45c; stroke-width: 2; stroke-linecap: round; opacity: .7; animation: bs-wave 7s linear infinite; }

.boot-splash-word { width: 150px; height: auto; color: #f4f1ea; margin-top: 6px; }
.boot-splash-brand {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 600;
  font-size: 20px; letter-spacing: .42em; text-indent: .42em; text-transform: uppercase;
  color: #c9a45c; margin-top: -6px;
}
.boot-splash-line {
  font-family: 'EB Garamond', Georgia, serif; font-style: italic;
  font-size: 15px; color: rgba(244,241,234,.62); margin-top: -10px;
}
.boot-splash-status {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-size: 12px;
  letter-spacing: .28em; text-transform: uppercase; color: rgba(244,241,234,.45);
  margin-top: 10px;
}

@keyframes bs-topsail { 0% { transform: translateY(170px) scale(.3); opacity: 0; } 14% { opacity: 1; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes bs-stay { 0% { transform: scale(.05); opacity: 0; } 12% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes bs-flag { 0% { transform: translateY(46px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes bs-flutter { from { transform: scaleX(1) skewY(0deg); } to { transform: scaleX(.94) skewY(-2deg); } }
@keyframes bs-wave { from { transform: translateX(0); } to { transform: translateX(180px); } }

@media (prefers-reduced-motion: reduce) {
  .boot-splash-ship .bs-sail { animation: none !important; transform: none !important; opacity: 1 !important; }
  .boot-splash-ship .bs-wave { animation: none; }
  .boot-splash-ship .bs-flag, .boot-splash-ship .bs-flutter { animation: none !important; transform: none !important; opacity: 1 !important; }
}
