/* The redesign for every page, loaded after site.css. One idea: a departure hall. Big plain headings, ruled tables, a few strong controls, colour only where it means something,
   and motion that tells you something arrived. No cards of icon-plus-text, no left stripes, no glass, no gradients. */

/* ---------- page heads: the title and its sentence side by side, no crumb on top-level pages ---------- */
.page-head { padding: clamp(36px, 5vw, 72px) 0 clamp(24px, 3vw, 40px); }
.page-head .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(24px, 5vw, 88px); align-items: end; }
.page-head .backlink { grid-column: 1 / -1; margin-bottom: 18px; }
.page-head h1 { grid-column: 1; margin: 0; font-size: clamp(2.4rem, 5.6vw, 5rem); line-height: .98; letter-spacing: -.04em; }
.page-head .lede, .page-head > .wrap > p { grid-column: 2; margin: 0; font-size: 1.04rem; line-height: 1.6; max-width: 46ch; padding-bottom: .5rem; }
.page-head .wrap > :not(.backlink):not(h1):not(.lede):not(p) { grid-column: 1 / -1; }
.page-head h1 .ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; } .page-head h1 .ln > span { display: block; will-change: transform; }
@media (max-width: 860px) { .page-head .wrap { grid-template-columns: 1fr; row-gap: 16px; } .page-head .lede, .page-head > .wrap > p { grid-column: 1; padding-bottom: 0; } }

/* ---------- notices: a ruled box with a bold lead, not a coloured stripe ---------- */
.notice { border: 1px solid var(--line-2); border-top: 2px solid var(--ink); background: var(--card); padding: 16px 20px; max-width: 78ch; border-radius: 0; }
.notice.ok { border-top-color: var(--ok); } .notice.warn { border-top-color: var(--warn); } .notice b:first-child { font-family: var(--display); }

/* ---------- forms: one control language ---------- */
input, select, textarea { border-radius: 0; background: var(--card); transition: border-color .18s, box-shadow .18s; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--maroon) 28%, transparent); }
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%236d7088' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; }
:root[data-theme='dark'] select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%238a91b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
select option { background: var(--card); color: var(--ink); }
label { font: 600 .72rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); display: block; margin-bottom: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: end; margin-bottom: 18px; } .filters > div { min-width: 150px; } .filters .grow { flex: 1 1 280px; }
.chip { transition: background-color .18s, color .18s, border-color .18s, transform .12s var(--ease); } .chip:hover { border-color: var(--ink); color: var(--ink); } .chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- the departures board: actions sit in their own column ---------- */
.brow:has(.act) { grid-template-columns: 84px minmax(0, 1.3fr) minmax(120px, .6fr) 72px 90px auto; }
.brow .act { flex-wrap: nowrap; gap: 6px; } .brow .act a, .brow .act button { white-space: nowrap; padding: 7px 10px; }
.brow { transition: background-color .16s; position: relative; } .brow:not(.h):hover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--amber); }
@media (max-width: 1100px) { .brow:has(.act) { grid-template-columns: 76px minmax(0, 1fr) 70px auto; } .brow:has(.act) .ty { display: none; } .brow:has(.act) .act { grid-column: 2 / -1; justify-content: flex-start; } }

/* ---------- tables: ruled, tabular, a tint that follows the pointer ---------- */
table.t { border-collapse: collapse; width: 100%; } table.t th { font: 600 .68rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding: 12px 10px; border-bottom: 1px solid var(--ink); text-align: left; }
table.t td { padding: 14px 10px; border-bottom: 1px solid var(--line); transition: background-color .16s; } table.t tbody tr:hover td { background: var(--paper-2); }
table.t td.r, table.t th.r { text-align: right; } table.t td.n, table.t .n { font-variant-numeric: tabular-nums; }

/* ---------- ruled lists, tours and cards that answer the pointer ---------- */
.rules > a { transition: padding-left .28s var(--ease), background-color .2s; } .rules > a:hover { padding-left: 14px; background: var(--paper-2); }
.mi, .tour, .pins > div { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s; }
.mi:hover, .tour:hover, .pins > div:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -24px rgba(0, 0, 21, .45); border-color: var(--ink-2); }
details.tour > summary { transition: background-color .18s; } details.tour > summary:hover { background: var(--paper-2); }
.tours { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)) !important; gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); } .tours > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-top: 0 !important; }

/* ---------- headings of sections: size and space do the work ---------- */
section h2 { letter-spacing: -.035em; } .sec-head { margin-bottom: 28px; }
.sub { font: 700 .74rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 8px; border-bottom: 1px solid var(--line-2); margin: 36px 0 8px; }

/* ---------- reading pages ---------- */
.prose { max-width: 66ch; } .prose p { line-height: 1.75; } .prose h2 { margin: 2.2em 0 .6em; font-size: 1.6rem; }

/* ---------- motion hooks ---------- */
html.motion .mi, html.motion .tours > *, html.motion .pins > div, html.motion .rules > *, html.motion .facts > div { will-change: transform, opacity; }
@media (hover: none) { .mi:hover, .tour:hover, .pins > div:hover { transform: none; box-shadow: none; } }

/* route plates */
.mplate { margin: -24px -24px 14px; border-bottom: 1px solid var(--line); background: #081a3a; aspect-ratio: 480 / 170; overflow: hidden; } .mplate:empty { display: none; }
.plate-svg { display: block; width: 100%; height: 100%; } .pl-sea { fill: #0b2149; } .pl-land { fill: #2a4a7d; stroke: rgba(190, 212, 245, .45); stroke-width: .6; stroke-linejoin: round; }
.pl-arc { fill: none; stroke: #e2ecff; stroke-width: 1.8; stroke-dasharray: 5 5; opacity: .9; stroke-linecap: round; } .pl-ap circle { fill: #fff; stroke: #081a3a; stroke-width: 1.8; } .pl-ap text { fill: #fff; font: 700 11px var(--mono); paint-order: stroke; stroke: #081a3a; stroke-width: 3px; }
.mi .mplate + .kind { margin-top: 0; }

.notes2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; margin-bottom: 30px; } .notes2 .notice { margin: 0 !important; }
.mi .urg { position: absolute; top: 14px; left: 14px; z-index: 3; box-shadow: 0 2px 10px rgba(0, 0, 21, .5); }

/* admin: department roles of a person, folded into one cell */
.dept summary { cursor: pointer; font-size: .82rem; max-width: 260px; }
.dept fieldset { border: 0; margin: 10px 0 0; padding: 0; } .dept legend { font: 700 .7rem var(--font-ui, inherit); letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-bottom: 4px; }
.dept label { display: flex; gap: 8px; align-items: center; font-size: .82rem; padding: 2px 0; }

/* ---- the app: the big red button in the menu and on the pages ---- */
.nav .dl-btn { display: inline-flex; align-items: center; gap: 9px; margin-left: 8px; padding: 10px 15px; background: var(--maroon-bg); color: #fff; border: 0; border-radius: 1px; font: 700 .8rem var(--display); letter-spacing: .06em; text-transform: uppercase; position: relative; overflow: hidden; white-space: nowrap; }
.nav .dl-btn:hover { background: var(--red); color: #fff; }
.nav .dl-btn svg { flex: none; }
@media (max-width: 900px) { .nav .dl-btn { margin: 12px 0 0; justify-content: center; padding: 14px 16px; border-bottom: 0; } }
.btn.lg { padding: 19px 28px; font-size: .95rem; }
.app-actions { margin-top: 24px; display: flex; gap: 14px 18px; align-items: center; flex-wrap: wrap; }
.bk-app { max-width: 760px; } .bk-app h3 { margin-top: 0; } .bk-route { font: 600 1.05rem var(--mono); padding: 12px 14px; background: var(--paper-2); border-left: 3px solid var(--maroon); }

/* ---- motion: it says something, it is short, it uses transform and opacity, and it is off for visitors who ask for less ---- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* one page flows into the next: a short cross-fade, the menu stays where it is */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .24s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  ::view-transition-group(site-header) { animation-duration: 0s; }

  /* every control answers the pointer */
  .btn, .link, .nav a, .brow .act a, .brow .act button, .tag, .slot { transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s ease; }
  .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(0, 0, 40, .45); } .btn:active { transform: translateY(0); box-shadow: none; transition-duration: .06s; }
  .link { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; border-bottom-color: transparent; transition: background-size .28s cubic-bezier(.2, .7, .2, 1); } .link:hover { background-size: 100% 1px; }
  .nav a:not(.dl-btn):not(.globe):not(.msgs):not(.acct) { background-image: linear-gradient(var(--maroon), var(--maroon)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .26s cubic-bezier(.2, .7, .2, 1), color .18s ease; } .nav a:not(.dl-btn):not(.globe):not(.msgs):not(.acct):hover { background-size: 100% 2px; }
  .brow, .rules li, .panel, .card, .tile { transition: background-color .2s ease, border-color .2s ease, transform .22s cubic-bezier(.2, .7, .2, 1); }
  .rules a { transition: color .18s ease; }
  input, select, textarea { transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }

  @media (min-width: 901px) {
  /* the menus open from where they are, a few pixels, in a blink */
  .nav .dd-m { opacity: 0; translate: 0 -6px; transition: opacity .16s ease, translate .2s cubic-bezier(.2, .7, .2, 1), display .2s allow-discrete; }
  .nav .dd:hover .dd-m, .nav .dd:focus-within .dd-m, .nav .dd.open .dd-m { opacity: 1; translate: 0 0; }
  @starting-style { .nav .dd:hover .dd-m, .nav .dd:focus-within .dd-m, .nav .dd.open .dd-m { opacity: 0; translate: 0 -6px; } }
  .nav .dd-m a { transition: background-color .15s ease, padding-left .2s cubic-bezier(.2, .7, .2, 1); } .nav .dd-m a:hover { padding-left: 24px; background: var(--paper-2); }
  }

  /* the app button: a slow light passes over it now and then, and the arrow leans in on hover */
  .dl-btn::after, .dl-cta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); translate: -120% 0; animation: dl-sheen 7s ease-in-out 2.5s infinite; pointer-events: none; }
  .dl-cta { position: relative; overflow: hidden; }
  .dl-btn svg, .dl-cta svg { transition: translate .22s cubic-bezier(.2, .7, .2, 1); } .dl-btn:hover svg, .dl-cta:hover svg { translate: 0 2px; }
  @keyframes dl-sheen { 0%, 70% { translate: -120% 0; } 100% { translate: 120% 0; } }

  /* the page arrives in order: the heading block first, then the content, once */
  .page-head .wrap > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; } .page-head .wrap > :nth-child(2) { animation-delay: .06s; } .page-head .wrap > :nth-child(3) { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

  /* the menu gets a shadow when the page has moved under it; sections and boards come in as they are reached (browsers without scroll-driven animations just show them) */
  @supports (animation-timeline: scroll()) {
    .site-header { animation: hdr-shadow linear both; animation-timeline: scroll(root); animation-range: 0 90px; }
    @keyframes hdr-shadow { from { box-shadow: 0 0 0 rgba(0, 0, 20, 0); } to { box-shadow: 0 10px 28px -14px rgba(0, 0, 20, .35); } }
  }
  @supports (animation-timeline: view()) {
    main > section > .wrap > *, .app-grid > *, .rules li, .sec-head { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 38%; }
    @keyframes reveal { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
    .hero *, .page-head *, .site-header * { animation-timeline: auto; }
  }
}

/* the fleet page: one of our own screenshots under the name of a type */
.type-shot { display: block; width: 100%; max-width: 420px; height: auto; aspect-ratio: 2.1 / 1; object-fit: cover; margin-top: 14px; border: 1px solid var(--line); background: var(--paper-2); }
@media (prefers-reduced-motion: no-preference) { .type-shot { transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .2s ease; } .type:hover .type-shot { border-color: var(--maroon); } }

/* the network we fly on, a quiet line under the routes */
.net-vat { display: flex; align-items: center; gap: 14px; margin-top: 34px; font: 500 .8rem var(--mono); letter-spacing: .02em; color: #8a91b8; } .net .net-vat span { color: #8a91b8; }
.net-vat a { display: inline-flex; opacity: .92; transition: opacity .2s; } .net-vat a:hover { opacity: 1; } .net-vat img { height: 72px; width: auto; display: block; }
