/* Tugboat, tugboat.bliksem.dev. Colours from the Tugboat logo: Tug Red, Charcoal, white. */
:root {
  --red: #E5421B;
  --red-deep: #C2381A;       /* hero field: white text reads at 5:1 */
  --red-btn: #C73516;        /* buttons: 5:1 with white */
  --red-text: #B8321A;       /* small red text on light surfaces */
  --charcoal: #1F2226;
  --bg: #f4f3f1;
  --surface: #ffffff;
  --surface-2: #eceae6;
  --ink: #1F2226;
  --muted: #4d5157;
  --line: #1f22261a;
  --line-strong: #1f22262e;
  --win-bg: #f9f9f9;
  --win-side: #f0f0f0;
  --shadow: 0 40px 80px -36px #1f222666, 0 12px 28px -16px #1f222640;
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);
  --font: "Host Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --red-deep: #A8301A;
    --red-text: #FF7A5C;
    --bg: #17191c;
    --surface: #202327;
    --surface-2: #272a2f;
    --ink: #f1f0ee;
    --muted: #b4b6ba;
    --line: #f1f0ee1a;
    --line-strong: #f1f0ee2e;
    --win-bg: #202020;
    --win-side: #2b2b2b;
    --shadow: 0 40px 80px -36px #000000cc, 0 12px 28px -16px #00000099;
    color-scheme: dark;
  }
}
:root[data-scheme="dark"] {
  --red-deep: #A8301A; --red-text: #FF7A5C; --bg: #17191c; --surface: #202327; --surface-2: #272a2f; --ink: #f1f0ee; --muted: #b4b6ba;
  --line: #f1f0ee1a; --line-strong: #f1f0ee2e; --win-bg: #202020; --win-side: #2b2b2b;
  --shadow: 0 40px 80px -36px #000000cc, 0 12px 28px -16px #00000099; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.55 var(--font); -webkit-font-smoothing: antialiased; transition: background-color 400ms var(--ease); }
::selection { background: #E5421B44; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
.i { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(100% - 32px, 1240px); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(100% - 80px, 1240px); } }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .nav.on-red :focus-visible { outline-color: #fff; }
.skip-link { position: absolute; left: 0; top: 12px; z-index: 60; transform: translateY(-200%); background: var(--ink); color: var(--bg); padding: .55rem .9rem; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; }
.skip-link:focus { transform: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: 0 1.3rem; border-radius: var(--r-md); border: 0; font: 500 1rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 150ms var(--ease), background-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.btn:active { transform: translateY(1px) scale(.985); transition-duration: 90ms; }
.btn--primary { background: var(--red-btn); color: #fff; }
.btn--primary:hover { background: #b02f13; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--sm { min-height: 40px; padding: 0 1rem; font-size: .9375rem; }
.btn--big { min-height: 60px; padding: 0 1.75rem; font-size: 1.125rem; background: #fff; color: var(--charcoal); border-radius: 14px; box-shadow: 0 18px 40px -18px #00000080; }
.btn--big:hover { transform: translateY(-2px); box-shadow: 0 24px 48px -20px #00000099; }
.btn--big .i { color: var(--red); }
.btn--nav { min-height: 40px; padding: 0 1.05rem; font-size: .9375rem; background: var(--red-btn); color: #fff; }
.btn--nav:hover { background: #b02f13; }
.nav.on-red .btn--nav { background: #fff; color: var(--charcoal); }

/* Nav: white on the red hero, the page's own colours once you scroll */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--ink); background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); transition: background-color 250ms var(--ease), color 250ms var(--ease), border-color 250ms var(--ease); }
.nav.on-red { background: transparent; color: #fff; border-bottom-color: transparent; backdrop-filter: none; }
.nav__bar { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 68px; }
.nav__logo { justify-self: start; display: inline-flex; min-height: 44px; align-items: center; }
.nav__logo img { height: 30px; width: auto; }
.nav__logo-white { display: none; }
.nav.on-red .nav__logo-white { display: block; }
.nav.on-red .nav__logo-color { display: none; }
.nav__links { display: flex; gap: .25rem; }
.nav__links a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 .8rem; font-size: .9375rem; font-weight: 500; text-decoration: none; opacity: .82; transition: opacity 150ms var(--ease); }
.nav__links a::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 10px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 160ms var(--ease); }
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__end { justify-self: end; display: flex; align-items: center; gap: .4rem; }
.theme-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: inherit; opacity: .82; cursor: pointer; transition: opacity 150ms var(--ease), background-color 150ms var(--ease); }
.theme-btn:hover { opacity: 1; background: color-mix(in oklab, currentColor 12%, transparent); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .moon { display: none; }
.is-dark .theme-btn .sun { display: none; }
.is-dark .theme-btn .moon { display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--red-deep); color: #fff; padding: calc(68px + clamp(2.5rem, 7vh, 5rem)) 0 clamp(3rem, 8vh, 5.5rem); min-height: min(100svh, 920px); display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 85% 10%, #ffffff1f, transparent 60%); pointer-events: none; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 5.6vw, 5rem); line-height: 1; letter-spacing: -.045em; max-width: 14ch; }
.hero__lead { margin: 1.5rem 0 0; max-width: 38ch; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.5; color: #ffffffe6; }
.hero__cta { margin-top: 2.25rem; }
.hero__meta { margin: 1rem 0 0; font-size: .9375rem; color: #ffffffd9; }
.hero__alt { margin: .35rem 0 0; font-size: .9375rem; color: #ffffffd9; }
.hero__alt a { color: #fff; text-underline-offset: .2em; }

/* The live Tugboat window */
.win { background: var(--win-bg); color: var(--ink); border-radius: 10px; overflow: hidden; box-shadow: 0 50px 90px -40px #000000a6, 0 0 0 1px #00000026; font-size: 13px; }
.win__bar { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 14px; background: var(--win-side); color: var(--muted); font-size: 12.5px; }
.win__title { display: inline-flex; align-items: center; gap: .5rem; }
.win__ctl { display: inline-flex; gap: 22px; }
.win__ctl i { width: 10px; height: 1.5px; background: currentColor; opacity: .7; }
.win__body { display: grid; grid-template-columns: 170px 1fr; min-height: 300px; }
.win__side { display: grid; align-content: start; gap: 2px; padding: 10px 8px; background: var(--win-side); }
.win__side span { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 6px; color: var(--muted); }
.win__side span.is-on { background: var(--win-bg); color: var(--ink); box-shadow: inset 2px 0 0 var(--red); }
.win__side b { font-weight: 400; }
.win__main { padding: 16px 20px; min-width: 0; }
.win__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.win__head strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.win__add { background: var(--red); color: #fff; padding: 6px 12px; border-radius: 6px; font-weight: 500; }
.dl { display: grid; grid-template-columns: 20px minmax(0, 1fr) 64px 190px; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dl__file { width: 16px; height: 20px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.dl__file--zip { background: #c9a227; box-shadow: none; }
.dl__file--vid { background: #ef8a1a; box-shadow: none; }
.dl__name { display: grid; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dl__name small, .dl__prog small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.dl__size { text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.dl__state { color: var(--muted); }
.dl__prog { display: grid; gap: 6px; }
.dl__rate { font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.lanes { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; height: 6px; }
.lanes i { position: relative; overflow: hidden; border-radius: 2px; background: color-mix(in oklab, var(--red) 18%, var(--surface-2)); }
.lanes i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform-origin: left; transform: scaleX(var(--p, .6)); }

/* Sections */
.section-title { font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.05; letter-spacing: -.035em; max-width: 18ch; }
.features { padding: clamp(5rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 5rem); }
.feat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: clamp(3rem, 8vh, 5rem) 0; border-bottom: 1px solid var(--line); }
.feat:last-child { border-bottom: 0; }
.feat--flip .feat__text { order: 2; }
.feat--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feat h3 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); line-height: 1.1; letter-spacing: -.03em; }
.feat__text p { margin: 1rem 0 0; color: var(--muted); max-width: 42ch; font-size: 1.0625rem; }
.feat__demo > * { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.25rem, 3vw, 2rem); }

/* Demo 1: picking downloads */
.pick__rules { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.25rem; }
.pick__rules span { font-family: var(--mono); font-size: .75rem; padding: .3rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pick__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pick__col { min-height: 230px; border-radius: var(--r-lg); padding: .9rem; background: var(--surface-2); }
.pick__col--tug { background: color-mix(in oklab, var(--red) 12%, var(--surface)); }
.pick__label { display: flex; align-items: center; gap: .45rem; margin: 0 0 .75rem; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.pick__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.pick__col li { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; border-radius: 10px; background: var(--surface); font-size: .8125rem; box-shadow: 0 1px 2px #0000000f; animation: drop-in 520ms var(--ease-enter) both; }
.pick__col li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__col li span:last-child { flex: none; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } }

/* Demo 2: pieces */
.pieces__head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pieces__head label { font-weight: 500; }
.pieces__head output { display: inline-block; min-width: 2ch; margin-left: .35rem; font-family: var(--mono); color: var(--red-text); }
.pieces__head input { flex: 1; min-width: 180px; accent-color: var(--red); height: 28px; }
.pieces__lane { margin-top: 1.25rem; }
.pieces__label { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .5rem; font-size: .9375rem; }
.pieces__label b { font-weight: 500; color: var(--red-text); }
.pieces__pct { font-family: var(--mono); font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pieces__bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 56px; }
.pieces__bar i { position: relative; overflow: hidden; border-radius: 5px; background: var(--surface-2); }
.pieces__bar i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform-origin: left; transform: scaleX(var(--p, 0)); }
.pieces__lane--one .pieces__bar i::after { background: color-mix(in oklab, var(--ink) 55%, var(--surface)); }
.pieces__note { margin: 1.25rem 0 0; font-size: .875rem; color: var(--muted); }

/* Demo 3: resume */
.resume { display: grid; gap: 1rem; align-content: center; min-height: 230px; }
.resume__row { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.resume__name { display: grid; font-weight: 500; font-size: 1.0625rem; }
.resume__name small { font-weight: 400; font-size: .875rem; color: var(--muted); }
.resume.is-cut .resume__name small { color: var(--red); }
.resume__pct { font-family: var(--mono); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.resume__bar { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.resume__bar i { display: block; height: 100%; background: var(--red); transform-origin: left; transform: scaleX(var(--p, 0)); border-radius: 6px; }
.resume.is-cut .resume__bar i { background: color-mix(in oklab, var(--red) 45%, var(--surface-2)); }
.resume .btn { justify-self: start; }

/* Demo 4: small */
.small { min-height: 230px; display: grid; align-content: center; }
.small__num { margin: 0; font-size: clamp(5rem, 11vw, 8.5rem); line-height: .85; font-weight: 600; letter-spacing: -.06em; color: var(--red); }
.small__num span { font-size: .32em; letter-spacing: -.02em; margin-left: .15em; color: var(--ink); }
.small__label { margin: 1rem 0 0; font-size: 1.125rem; font-weight: 500; }
.small__sub { margin: .25rem 0 0; color: var(--muted); }

/* Setup */
.setup { padding: clamp(5rem, 12vh, 8rem) 0; background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); counter-reset: s; }
.step { padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.step__n { display: block; font-family: var(--mono); font-size: .875rem; color: var(--red); margin-bottom: .75rem; }
.step h3 { font-size: 1.375rem; letter-spacing: -.02em; }
.step p { margin: .6rem 0 0; color: var(--muted); }
.step b { color: var(--ink); font-weight: 500; }
.setup__cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: clamp(2rem, 4vw, 3rem); }
.setup__meta { color: var(--muted); font-size: .9375rem; }

/* Privacy: the charcoal band */
.privacy { background: var(--charcoal); color: #f1f0ee; padding: clamp(5rem, 12vh, 8rem) 0; }
.privacy__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.privacy h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.06; letter-spacing: -.035em; }
.privacy__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.privacy__list li { padding-left: 1.75rem; position: relative; color: #c9cbce; }
.privacy__list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--red); }
.privacy__list b { color: #fff; font-weight: 500; }

/* FAQ */
.faq { padding: clamp(5rem, 12vh, 8rem) 0; }
.faq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.faq__list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; padding: .75rem 0; cursor: pointer; font-size: 1.125rem; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-3px, -3px); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { margin: 0 0 1.25rem; color: var(--muted); max-width: 60ch; }
.faq details b { color: var(--ink); font-weight: 500; }
.faq a { text-underline-offset: .2em; }

/* What's new */
.news { padding: 0 0 clamp(5rem, 12vh, 8rem); }
.releases { list-style: none; margin: clamp(2rem, 4vw, 3rem) 0 0; padding: 0; display: grid; gap: 1rem; }
.release { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(1.25rem, 3vw, 2rem); }
.release__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; align-items: baseline; }
.release__head b { font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; }
.release__head time { font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.release p, .release ul { margin: .75rem 0 0; color: var(--muted); }
.release ul { padding-left: 1.2rem; }
.release a { display: inline-block; margin-top: .75rem; font-size: .9375rem; text-underline-offset: .2em; }

/* Footer */
.footer { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.footer__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer__maker { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; min-height: 44px; }
.footer__maker img { width: 26px; height: 26px; }
.is-dark .footer__maker img { filter: invert(1); }
.footer__maker b { font-weight: 600; }
.footer__maker:hover span { text-decoration: underline; text-underline-offset: .2em; }
.footer__links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .9375rem; }
.footer__links a { color: var(--muted); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.footer__links a:hover { color: var(--ink); }
.footer__legal { width: 100%; margin: 0; font-size: .8125rem; color: var(--muted); }

/* Entrance, once */
.js .hero h1, .js .hero [data-enter-item] { animation: rise 760ms var(--ease-enter) both; }
.js .hero [data-enter-item]:nth-of-type(1) { animation-delay: 120ms; }
.js .hero [data-enter-item]:nth-of-type(2) { animation-delay: 220ms; }
.js .hero [data-enter-media] { animation: settle 1000ms var(--ease-enter) 200ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle { from { opacity: 0; transform: translateY(28px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .js .hero h1, .js .hero [data-enter-item], .js .hero [data-enter-media], .pick__col li { animation: none; }
  body, .nav { transition: none; }
}

/* Smaller screens */
@media (max-width: 64rem) {
  .hero__grid, .feat, .feat--flip, .privacy__grid, .faq__grid { grid-template-columns: minmax(0, 1fr); }
  .feat--flip .feat__text { order: 0; }
  .hero { min-height: 0; }
  .hero h1 { max-width: 12ch; }
}
@media (max-width: 48rem) {
  .nav__links { display: none; }
  .nav__bar { display: flex; justify-content: space-between; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .win__side { display: none; }
  .win__body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .dl { grid-template-columns: 16px minmax(0, 1fr) 110px; }
  .dl__size { display: none; }
  .pick__cols { grid-template-columns: minmax(0, 1fr); }
  .pick__col { min-height: 150px; }
}
@media (max-width: 30rem) {
  .btn--big { width: 100%; }
  .setup__cta .btn { width: 100%; }
}

/* Windows gets the download, everything else (phones, Macs, iPads) gets "send the link to my PC" */
.for-others { display: none; }
.not-windows .for-windows { display: none; }
.not-windows .for-others { display: revert; }
.not-windows .btn.for-others { display: inline-flex; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: #fff; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; min-height: 32px; }
