/* ship.miguelclavel.com. White studio above, the black floor band below, Anton for the big
   capitals, Archivo for reading, JetBrains Mono for the read outs, cobalt as the one accent.
   --u is the overlay unit (min(vw/1440, vh/900), or min(vw/430, 1.4) on phones), --n the depot's
   nav unit, --edge the band's top edge in px: all three are set by assets/app.js. */

@font-face { font-family: Anton; src: url(fonts/anton-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url(fonts/archivo-var-latin.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(fonts/jetbrains-mono-latin.woff2) format('woff2'); font-weight: 400 500; font-display: swap; }

:root {
  --ink: #111111; --muted: #5d636c; --blue: #2f63ff; --band: #111111; --letters: #e9e9e9;
  --u: 1; --n: 1; --edge: 80vh; --rail: 76px;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sans: Archivo, 'Helvetica Neue', Arial, sans-serif;
  --caps: Anton, Impact, 'Arial Narrow', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: #fff; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font: 600 13px/1 var(--sans); text-decoration: none; }
.skip:focus { top: 12px; }

/* Nav: fixed, over the white top of the scene. */
.nav { position: fixed; left: 0; right: 0; top: 0; z-index: 10; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 calc(36px * var(--n)); pointer-events: none; }
.nav a { pointer-events: auto; text-decoration: none; }
.logo { font: 600 max(18px, calc(24px * var(--u))) / 1 var(--sans); letter-spacing: -0.045em; }
.nav-links { display: flex; align-items: center; gap: 26px; font: 500 max(11px, calc(11px * var(--u))) / 1 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; }
.nav-links a { padding: 8px 0; min-height: 24px; }
.nav-links a:not(.talk) { background: linear-gradient(currentColor, currentColor) left bottom / 0% 1px no-repeat; transition: background-size 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-links a:not(.talk):hover { background-size: 100% 1px; }
.talk { border: 1px solid var(--ink); border-radius: 999px; padding: 10px 16px !important; transition: background-color 0.3s, color 0.3s; }
.talk:hover { background: var(--ink); color: #fff; }

/* The scroll track and the pinned scene. */
.track { position: relative; height: 1000vh; background: #fff; }
.scene { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; overflow: clip; background: #fff; }
.band { position: absolute; left: 0; right: 0; top: 0; height: 100%; background-color: var(--band); transform: translateY(var(--edge)); z-index: 1;
  /* A fine asphalt grain, drawn by the browser (no image file). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.edgeline { position: absolute; left: 0; right: 0; z-index: 1; opacity: 0; background: rgba(255, 255, 255, 0.4); pointer-events: none; }
.lane { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; opacity: 0; background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0 var(--dash, 40px), transparent var(--dash, 40px)); background-repeat: repeat-x; }
.giant, .word { position: absolute; left: 0; top: 0; margin: 0; line-height: 1; white-space: nowrap; font-family: var(--caps); font-weight: 400; pointer-events: none; z-index: 1; visibility: hidden; will-change: transform; }
.giant { font-size: calc(330px * var(--u)); color: var(--letters); }
.word { font-size: var(--wordfs, 200px); color: #ececec; }
.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; opacity: 0; transition: opacity 1.2s ease; touch-action: pan-y; }
.ready .gl { opacity: 1; }
.loading { position: absolute; left: 0; right: 0; top: 42%; margin: 0; text-align: center; font: 400 11px/1 var(--mono); letter-spacing: 0.2em; color: rgba(17, 17, 17, 0.66); z-index: 3; }
.ready .loading { display: none; }

/* Overlay: everything above the canvas. Only links, buttons and the card take the pointer. */
.intro, .hud, .step, .strip, .route, .hint, .pill, .eyebrow { position: absolute; z-index: 3; margin: 0; pointer-events: none; }

.intro { left: calc(40px * var(--u)); top: calc(126px * var(--u)); width: calc(820px * var(--u)); }
.intro h1 { margin: 0; font-weight: 400; }
.intro-eb { display: block; font: 500 calc(12px * var(--u)) / 1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.intro-big { display: block; margin-top: calc(18px * var(--u)); font: 400 calc(122px * var(--u)) / 0.9 var(--caps); text-transform: uppercase; color: var(--ink); }
.intro-big .ln { display: block; }
.intro-big .blue { color: var(--blue); }
.intro-p { margin: calc(26px * var(--u)) 0 0; max-width: calc(390px * var(--u)); font: 400 max(14px, calc(16px * var(--u))) / 1.55 var(--sans); color: #4a4f57; }
.js .intro-big .ln, .js .intro-eb, .js .intro-p { animation: rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.js .intro-eb { animation-delay: 0.05s; }
.js .intro-big .ln:nth-child(1) { animation-delay: 0.12s; }
.js .intro-big .ln:nth-child(2) { animation-delay: 0.24s; }
.js .intro-big .ln:nth-child(3) { animation-delay: 0.36s; }
.js .intro-p { animation-delay: 0.5s; }
@keyframes rise { from { opacity: 0; transform: translateY(48px) scale(0.97); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }

.hud { right: calc(40px * var(--u)); top: calc(112px * var(--u)); width: calc(360px * var(--u)); text-align: right; font: 400 calc(12px * var(--u)) / 2 var(--mono); letter-spacing: 0.06em; color: var(--ink); }
.hud p { margin: 0; }
.hud .k { color: #676d76; margin-right: 0.4em; }
.hud-speed { font: 500 calc(40px * var(--u)) / 1 var(--mono) !important; letter-spacing: -0.02em !important; margin-bottom: calc(8px * var(--u)) !important; }
.hud-speed small { font-size: calc(12px * var(--u)); letter-spacing: 0.08em; margin-left: 0.5em; color: #676d76; }
.dot { display: inline-block; width: calc(7px * var(--u)); height: calc(7px * var(--u)); border-radius: 50%; background: var(--blue); margin-right: 0.7em; vertical-align: middle; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.step { left: calc(40px * var(--u)); bottom: calc(64px * var(--u)); width: calc(470px * var(--u)); padding: calc(24px * var(--u)) calc(26px * var(--u)); border-radius: calc(18px * var(--u)); background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; }
.step-i { margin: 0; font: 500 calc(12px * var(--u)) / 1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.step-t { margin: calc(12px * var(--u)) 0; font: 400 calc(42px * var(--u)) / 1 var(--caps); text-transform: uppercase; color: var(--ink); }
.step-b { margin: 0; font: 400 max(13px, calc(15px * var(--u))) / 1.55 var(--sans); color: #4a4f57; }
.step-s { display: flex; flex-wrap: wrap; gap: calc(6px * var(--u)) calc(18px * var(--u)); margin: calc(14px * var(--u)) 0 0; font: 500 max(11px, calc(12px * var(--u))) / 1.4 var(--mono); color: #4a4f57; }
.step-s b { color: var(--blue); font-weight: 500; font-size: 1.2em; margin-right: 0.35em; }

/* The services strip, sliding through the band. */
.strip { left: 0; top: 0; display: flex; align-items: flex-start; gap: calc(120px * var(--u)); padding-top: calc(76px * var(--u)); color: #fff; visibility: hidden; will-change: transform; }
.lead { display: flex; gap: calc(64px * var(--u)); flex: none; }
.strip-i { margin: 0 0 calc(14px * var(--u)); font: 500 calc(11px * var(--u)) / 1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.strip-h { margin: 0; font: 400 calc(64px * var(--u)) / 0.98 var(--caps); text-transform: uppercase; white-space: nowrap; }
.strip-h span { color: var(--blue); }
.strip-p { width: calc(250px * var(--u)); padding-top: calc(30px * var(--u)); }
.strip-p p { margin: 0 0 calc(12px * var(--u)); font: 400 max(11px, calc(12.5px * var(--u))) / 1.55 var(--sans); color: rgba(255, 255, 255, 0.66); }
.svc { flex: none; width: calc(270px * var(--u)); padding: calc(4px * var(--u)) calc(30px * var(--u)); border-left: 1px solid rgba(255, 255, 255, 0.12); }
.lead + .svc { border-left: 0; }
.svc svg { width: calc(38px * var(--u)); height: calc(38px * var(--u)); fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { margin: calc(18px * var(--u)) 0 calc(10px * var(--u)); font: 400 calc(26px * var(--u)) / 1 var(--caps); text-transform: uppercase; }
.svc p { margin: 0; font: 400 max(11px, calc(12.4px * var(--u))) / 1.5 var(--sans); }
.svc h3, .svc p { background: linear-gradient(90deg, #fff calc(var(--sw, 0%) - 34%), var(--blue) calc(var(--sw, 0%) - 6%), transparent calc(var(--sw, 0%) + 26%)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.route { right: calc(40px * var(--u)); bottom: calc(64px * var(--u)); width: calc(250px * var(--u)); font: 400 max(10px, calc(11px * var(--u))) / 1 var(--mono); letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.72); }
.route p { display: flex; justify-content: space-between; margin: 0; }
.route-track { position: relative; height: 2px; margin: calc(14px * var(--u)) 0 calc(10px * var(--u)); background: rgba(255, 255, 255, 0.22); }
.route-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--blue); }
.route i { position: absolute; top: 50%; width: calc(10px * var(--u)); height: calc(10px * var(--u)); border-radius: 50%; background: #4a4f5d; transform: translate(-50%, -50%); transition: background-color 0.3s; }
.route i:nth-of-type(1) { left: 0; } .route i:nth-of-type(2) { left: 50%; } .route i:nth-of-type(3) { left: 100%; }
.route i.on { background: var(--blue); }

.hint { left: 50%; bottom: calc(22px * var(--u)); transform: translateX(-50%); text-align: center; font: 400 11px/1 var(--mono); letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.7); }
.hint i { display: block; width: 1px; height: 28px; margin: 8px auto 0; background: currentColor; transform-origin: top; animation: line 1.6s ease-in-out infinite; }
@keyframes line { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 50.1% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* The depot. */
.pill { right: calc(34px * var(--n)); top: calc(var(--rail) + 26px * var(--n)); height: max(26px, calc(30px * var(--n))); display: flex; align-items: center; padding: 0 calc(14px * var(--n)); border: 1px solid rgba(17, 17, 17, 0.85); border-radius: 999px; font: 600 max(11px, calc(10px * var(--n))) / 1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; opacity: 0; visibility: hidden; transition: opacity 0.25s; }
.pill.hidden-by-box { opacity: 0 !important; }
.eyebrow { left: calc(35px * var(--n)); bottom: calc(12px * var(--n)); font: 600 max(11px, calc(10px * var(--n))) / 1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); opacity: 0; visibility: hidden; }

/* The container menu: hidden on large screens until it has keyboard focus, a visible list of
   buttons in the band on phones. */
.menu { position: absolute; z-index: 5; left: calc(35px * var(--n)); bottom: calc(40px * var(--n)); width: 300px; padding: 16px; border-radius: 14px; background: rgba(17, 17, 17, 0.94); color: #fff; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.menu:focus-within { clip-path: none; opacity: 1 !important; visibility: visible !important; pointer-events: auto; }
.menu-h { margin: 0 0 10px; font: 600 11px/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu button { width: 100%; min-height: 34px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; background: transparent; text-align: left; font: 500 13px/1.2 var(--sans); cursor: pointer; }
.menu button:hover { background: rgba(255, 255, 255, 0.1); }

/* The card inside an open container (placed over its back wall by app.js). */
.card { position: absolute; z-index: 4; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 calc(42px * var(--c, 1)); color: #fff; opacity: 0; transition: opacity 0.15s ease-out; pointer-events: auto; --c: 1; }
.card.on { opacity: 1; }
/* A dark board inside the open box, so the inside's frame bars never run behind the words. */
.card:not(.spill) { background: #15171d; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.card > * { opacity: 0; transform: translateY(calc(10px * var(--c))); transition: opacity 0.28s ease-out, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1); }
.card.on > * { opacity: 1; transform: none; }
.card.on > :nth-child(2) { transition-delay: 0.06s; } .card.on > :nth-child(3) { transition-delay: 0.12s; } .card.on > :nth-child(4) { transition-delay: 0.18s; } .card.on > :nth-child(5) { transition-delay: 0.24s; } .card.on > :nth-child(6) { transition-delay: 0.3s; }
.card .eb { margin: 0; font: 600 max(11px, calc(12px * var(--c))) / 1.3 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.card h2 { margin: calc(12px * var(--c)) 0 0; font: 600 max(18px, calc(40px * var(--c))) / 1.05 var(--sans); letter-spacing: -0.035em; outline: none; }
.card h2 em { font: 400 1.1em/1 var(--caps); font-style: normal; text-transform: uppercase; letter-spacing: 0.005em; color: #82a2ff; }
.card .bd { margin: calc(10px * var(--c)) 0 0; max-width: calc(470px * var(--c)); font: 400 max(11px, calc(15.5px * var(--c))) / 1.5 var(--sans); color: rgba(255, 255, 255, 0.88); }
.card .chips { display: flex; flex-wrap: wrap; gap: calc(7px * var(--c)); margin-top: calc(12px * var(--c)); }
.card .chips > * { display: inline-flex; align-items: center; min-height: 24px; padding: calc(4px * var(--c)) calc(12px * var(--c)); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; font: 500 max(11px, calc(12.5px * var(--c))) / 1.2 var(--sans); text-decoration: none; }
.card .chips a:hover { background: rgba(255, 255, 255, 0.12); }
.card .acts { display: flex; flex-wrap: wrap; gap: calc(8px * var(--c)); margin-top: calc(14px * var(--c)); }
.card .go { display: inline-flex; align-items: center; min-height: 26px; padding: max(5px, calc(8px * var(--c))) calc(16px * var(--c)); border-radius: 999px; background: var(--blue); font: 600 max(11px, calc(13px * var(--c))) / 1 var(--sans); text-decoration: none; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s; }
.card .go:hover { transform: translateY(-2px); background: #4a77ff; }
.card .go.ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.5); }
.card .card-x { position: absolute; top: calc(10px * var(--c)); right: calc(14px * var(--c)); min-height: 24px; padding: 4px 6px; border: 0; background: none; font: 600 max(11px, calc(11px * var(--c))) / 1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); cursor: pointer; }
.card .card-x:hover { color: #fff; }
.card .eb { padding-right: 64px; }
.card.spill { justify-content: flex-start; padding-top: 14px; padding-bottom: 18px; background: #15171d; border-radius: 0 0 14px 14px; box-shadow: 0 28px 50px -24px rgba(0, 0, 0, 0.55); }
.card.tight h2 { font-size: 16px; margin-top: 4px; }
.card.tight .bd, .card.tight .chips, .card.tight .acts { margin-top: 6px; }

/* Footer, continuing the band. */
.foot { position: relative; z-index: 1; background: var(--band); color: rgba(255, 255, 255, 0.72); padding: 26px calc(36px * var(--n)) 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font: 400 13px/1.6 var(--sans); }
.foot p { margin: 0; }
.foot a { color: #fff; text-decoration: none; display: inline-block; min-height: 24px; }
.foot a:hover { text-decoration: underline; }

/* Phones and portrait screens. */
.phone .nav { height: 56px; padding: 0 18px; }
.phone .nav .opt { display: none; }
.phone .intro { left: 20px; right: 20px; top: 100px; width: auto; }
.phone .intro-eb { font-size: 11px; }
.phone .intro-big { font-size: calc(56px * var(--u)); }
.phone .intro-p { font-size: 14px; max-width: 320px; }
.phone .hud { left: 20px; right: 20px; top: 60px; width: auto; display: flex; justify-content: space-between; text-align: left; font-size: 11px; line-height: 1.4; }
.phone .hud-speed { font-size: 11px !important; margin: 0 !important; font-weight: 500 !important; }
.phone .hud-speed small { font-size: 11px; }
.phone .hud p:nth-child(3) { display: none; }
.phone .dot { width: 6px; height: 6px; }
.phone .step { left: 16px; right: 16px; width: auto; bottom: 86px; padding: 16px 18px; border-radius: 16px; }
.phone .step-i { font-size: 11px; }
.phone .step-t { font-size: 28px; margin: 8px 0; }
.phone .step-b { font-size: 14px; }
.phone .step-s { font-size: 11px; }
.phone .strip { gap: calc(56px * var(--u)); padding-top: calc(44px * var(--u)); padding-left: 22px; }
.phone .lead { flex-direction: column; gap: calc(18px * var(--u)); }
.phone .strip-i { font-size: 11px; }
.phone .strip-h { font-size: calc(46px * var(--u)); }
.phone .strip-p { width: calc(300px * var(--u)); padding-top: 0; }
.phone .strip-p p { font-size: max(12px, calc(13px * var(--u))); }
.phone .svc { width: calc(250px * var(--u)); }
.phone .svc p { font-size: max(12px, calc(13px * var(--u))); }
.phone .giant { font-size: calc(180px * var(--u)); }
.phone .route { left: 20px; right: 20px; width: auto; bottom: 26px; }
.phone .hint { display: none; }
.portrait .pill { display: none; }
.portrait .eyebrow { left: 20px; bottom: 16px; }
.portrait .menu { left: 16px; right: 16px; bottom: auto; top: calc(var(--edge) + var(--lift, 0px) + var(--wordcap, 40px) + 44px); width: auto; padding: 0; background: none; clip-path: none; pointer-events: none; }
.portrait.depot-on .menu { pointer-events: auto; }
.portrait .menu-h { display: none; }
.portrait .menu ul { grid-template-columns: 1fr 1fr; gap: 8px; }
.portrait .menu button { min-height: 40px; font-size: 13px; text-align: center; padding: 6px 10px; }

/* Without WebGL: the card opens in the middle of the screen. */
.no-gl .card { position: fixed; left: 50%; top: 50%; width: min(560px, 92vw); height: auto !important; padding: 36px 28px 28px; transform: translate(-50%, -50%); background: #15171d; border-radius: 16px; --c: 1 !important; }
.no-gl .menu { clip-path: none; opacity: 1 !important; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .js .intro-big .ln, .js .intro-eb, .js .intro-p, .dot, .hint i { animation: none; }
  .card, .card > *, .gl { transition: none; }
}
