/* The fleets page: the seven fleets in line ahead across the head, a sticky row of pennants, then one section per fleet
   (pennant and name, the rig in a line, the history beside the ensign, the nine ships), and Pirates! on a night plate.
   Each section's --fleet-c is the engine's fleet colour (FC.FLEETS; js/fleets.js sets it, these are the fallbacks). */

html{scroll-padding-top:calc(var(--head-h) + 92px)}
[data-fleet="0"]{--fleet-c:#b02a2a}
[data-fleet="1"]{--fleet-c:#1f3f8a}
[data-fleet="2"]{--fleet-c:#1e6b47}
[data-fleet="3"]{--fleet-c:#d79a2b}
[data-fleet="4"]{--fleet-c:#5b2a86}
[data-fleet="5"]{--fleet-c:#2a6b7c}
[data-fleet="6"]{--fleet-c:#1b1b1b}
/* names in the fleet's colour, deepened toward the ink so the saffron still reads on the stock */
[data-fleet]{--fleet-ink:color-mix(in srgb, var(--fleet-c) 66%, var(--ink))}

/* ---------- head: the seven First Rates in line ahead ---------- */
.fleets-head{padding-bottom:0}
.fleets-head h1{max-width:none}
.fleets-head .lede{max-width:31em}

/* ---------- the pennant row, sticky under the header ---------- */
.pennant-nav{position:sticky;top:var(--head-h);z-index:60;background:color-mix(in srgb,var(--stock) 94%,transparent);backdrop-filter:blur(6px);
  border-bottom:1px solid var(--rule);box-shadow:0 10px 24px -22px rgba(40,24,10,.6)}
.pennant-nav .wrap{display:flex;justify-content:space-between;gap:clamp(2px,1vw,16px)}
.pennant-nav a{flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;gap:8px;min-height:60px;padding:6px 2px;text-decoration:none;
  color:var(--ink-2);position:relative;font-weight:600;font-size:clamp(.82rem,.6rem + .5vw,1rem)}
.pennant-nav img{width:clamp(34px,3.4vw,46px);height:auto;flex:none;transform:rotate(-6deg);opacity:.72;transition:transform .2s, opacity .2s}
.pennant-nav span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pennant-nav a::after{content:"";position:absolute;left:18%;right:18%;bottom:0;height:3px;background:var(--fleet-c);transform:scaleX(0);transition:transform .2s}
.pennant-nav a:hover img,.pennant-nav a[aria-current="true"] img{opacity:1;transform:rotate(0)}
.pennant-nav a:hover,.pennant-nav a[aria-current="true"]{color:var(--fleet-ink)}
.pennant-nav a[aria-current="true"]::after{transform:scaleX(1)}
.pennant-nav a:focus-visible{outline-offset:-3px}
@media (max-width:1000px){
  .pennant-nav span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .pennant-nav a{min-height:52px}
  .pennant-nav img{width:clamp(30px,8vw,44px)}
}

/* ---------- intro ---------- */
.fleets-intro h2{font-size:var(--fs-3)}
.fleets-intro p{color:var(--ink-2)}

/* ---------- one fleet ---------- */
.fleet{padding-block:clamp(64px,8vw,120px)}
.fleet-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:clamp(16px,3vw,40px);align-items:center;padding-bottom:clamp(20px,2.4vw,32px);
  margin-bottom:clamp(28px,4vw,52px);border-bottom:2px solid var(--fleet-c)}
.fleet-pennant{width:clamp(70px,8vw,116px);height:auto;transform:rotate(-5deg)}
.fleet-head h2{color:var(--fleet-ink);margin:0 0 .12em}
.fleet-rig{font-family:var(--fell);font-style:italic;font-size:var(--fs-1);line-height:1.35;color:var(--ink-2);margin:0;max-width:34em}
.fleet-body{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,4fr);gap:clamp(32px,6vw,96px);align-items:start}
.fleet-text p{max-width:34em}
.fleet-text p:last-child{color:var(--ink-2)}
.fleet-text a{text-decoration-color:var(--fleet-c);text-decoration-thickness:2px}
.fleet-ensign{position:sticky;top:calc(var(--head-h) + 110px)}
.fleet-ensign img{width:100%;height:auto;transform:rotate(1.5deg);filter:drop-shadow(3px 6px 6px rgba(60,38,18,.18))}
.fleet-ensign figcaption{margin-top:.4em}
.fleet-ships{list-style:none;margin:clamp(40px,5vw,72px) 0 0;padding:0;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:clamp(6px,1.2vw,18px);align-items:end}
.fleet-ships li{margin:0;display:grid;justify-items:center;gap:8px}
.fleet-ships img{width:100%;height:auto}
.fleet-ships span{font-size:clamp(.78rem,.7rem + .25vw,.95rem);line-height:1.15;text-align:center;color:var(--ink-2);min-height:2.3em}
@media (max-width:860px){
  .fleet-body{grid-template-columns:1fr}
  .fleet-ensign{position:static;max-width:380px}
}
@media (max-width:640px){
  .fleet-ships{grid-template-columns:repeat(5,minmax(0,1fr));row-gap:18px}
  .fleet-head{grid-template-columns:1fr;gap:8px}
  .fleet-pennant{width:72px}
}

/* ---------- Pirates! ---------- */
.pirates-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(36px,6vw,100px);align-items:start}
.pirates-copy h2{margin-bottom:.3em}
.pirates-copy .lede{color:#e6e9e3;margin-bottom:1.2em}
.pirates-copy p{color:#d3d9d4}
.pirates-flag{width:min(100%,380px);height:auto;transform:rotate(-2deg);margin:0 0 28px;filter:drop-shadow(4px 8px 10px rgba(0,0,0,.45))}
.pirates-facts{margin:0;display:grid;gap:14px}
.pirates-facts div{display:grid;grid-template-columns:2.4em minmax(0,1fr);gap:16px;align-items:baseline;border-top:1px solid rgba(243,234,211,.16);padding-top:12px}
.pirates-facts dt{font:400 clamp(2rem,3vw,2.6rem)/1 var(--display);color:var(--gold);text-align:right}
.pirates-facts dd{margin:0;color:#d8dcd6;line-height:1.35}
@media (max-width:860px){ .pirates-grid{grid-template-columns:1fr} }

/* ---------- close ---------- */
.fleets-end h2{font-size:var(--fs-3)}
.fleets-end p{color:var(--ink-2)}

@media (max-width:640px){
}
.pirates-hero{margin-bottom:clamp(40px,5vw,72px)}
.pirates-hero img{width:100%;height:auto}
.pirates-prize{margin:0 0 28px;max-width:420px}
.pirates-prize img{width:100%;height:auto}
.pirates-prize figcaption{color:#b9c2c3}
.pirates-escape{margin:1.6em 0 0;max-width:340px}
.pirates-escape img{width:100%;height:auto}
.pirates-escape figcaption{color:#b9c2c3}

/* the seven fleets in line ahead, across the head */
.frieze-print{position:relative;z-index:1;width:min(1400px, 100% - 2 * var(--gutter));margin:clamp(36px,5vw,72px) auto 0;padding-bottom:clamp(28px,4vw,56px);border-bottom:1px solid var(--rule)}
.frieze-print img{width:100%;height:auto;filter:drop-shadow(3px 6px 8px rgba(60,38,18,.22))}
@media (max-width:640px){ .frieze-print{width:100%;border-bottom:0} }
