/* Rusty Bike Labs — 2027 static site */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --steel: #1d2427;      /* dark ground, body ink */
  --steel-2: #2b3438;
  --steel-line: #3c474c;
  --alum: #e8ebea;       /* light section ground */
  --paper: #ffffff;
  --rust: #b8492a;       /* accent on light */
  --rust-hi: #e86240;    /* the original brand orange, used on dark */
  --patina: #6fa79e;     /* orbit ring */
  --muted: #5c676b;
  --muted-dk: #a7b2b5;
  --wrap: 1160px;
  --wide: 125%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--steel);
  background: var(--paper);
  font-kerning: normal;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rust); }
h1, h2, h3 { margin: 0; line-height: 1.1; font-stretch: var(--wide); }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

:focus-visible { outline: 3px solid var(--rust-hi); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--steel); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(29, 36, 39, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--steel-line);
}
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand {
  color: #fff; text-decoration: none;
  font-weight: 800; font-stretch: var(--wide); font-size: 1.05rem; letter-spacing: .01em;
  white-space: nowrap;
}
.brand span { color: var(--rust-hi); font-weight: 500; }
.top nav { display: flex; gap: 26px; align-items: center; }
.top nav a { color: #d7dddf; text-decoration: none; font-size: .95rem; font-weight: 500; }
.top nav a:hover { color: #fff; }
.top nav .nav-cta {
  color: #fff; border: 1.5px solid var(--rust-hi); padding: 6px 16px; border-radius: 999px;
}
.top nav .nav-cta:hover { background: var(--rust-hi); }

/* Hero */
.hero {
  background: var(--steel);
  color: #fff;
  padding: 104px 0 72px;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(2.6rem, 7.4vw, 6.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: .98;
  max-width: 11ch;
}
.lede { margin-top: 26px; font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: #cfd6d8; max-width: 36ch; }

.flight { margin-top: 64px; }
.track { position: relative; height: 200px; }
.trajectory { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trajectory .path { fill: none; stroke: var(--rust-hi); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.trajectory .orbit { fill: none; stroke: var(--patina); stroke-width: 1.5; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.node {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; background: var(--steel); border: 3px solid var(--rust-hi);
}
.n1 { left: 2%;      top: 96.75%; }
.n2 { left: 35.333%; top: 69.23%; }
.n3 { left: 68.667%; top: 30%; background: var(--rust-hi); box-shadow: 0 0 0 6px rgba(232, 98, 64, .22); }

.stages {
  list-style: none; margin: 30px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.stage { padding-right: 40px; }
.stage h2 { font-size: 1.35rem; font-weight: 700; color: #fff; }
.stage p { margin-top: 10px; color: var(--muted-dk); font-size: .98rem; max-width: 34ch; }

@media (prefers-reduced-motion: no-preference) {
  .trajectory .path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s cubic-bezier(.55, 0, .25, 1) .2s forwards; }
  .trajectory .orbit { opacity: 0; animation: fade .8s ease 1.6s forwards; }
  .node { opacity: 0; transform: scale(.4); animation: pop .35s ease forwards; }
  .n1 { animation-delay: .2s; }
  .n2 { animation-delay: .95s; }
  .n3 { animation-delay: 1.75s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes pop { to { opacity: 1; transform: scale(1); } }

/* Section scaffolding */
section { padding: 96px 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: end; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; letter-spacing: -.01em; }
.sec-head p { color: var(--muted); font-size: 1.1rem; max-width: 46ch; }

/* Principles */
.principles { background: var(--alum); }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; }
.p-grid article { padding: 28px 0 30px; border-top: 2px solid var(--steel); }
.p-grid h3 { font-size: 1.3rem; font-weight: 700; }
.p-grid p { margin-top: 10px; color: #3d474b; max-width: 52ch; }

/* Sustainability band */
.sustain { position: relative; padding: 0; background: #1a1613; color: #fff; overflow: hidden; }
.sustain img { width: 100%; height: clamp(280px, 38vw, 520px); object-fit: cover; object-position: 75% 50%; transform: scale(1.01); }
.sustain .wrap { position: absolute; inset: 0; display: flex; align-items: center; }
.sustain p {
  font-stretch: var(--wide); font-weight: 600;
  font-size: clamp(1.35rem, 2.9vw, 2.35rem); line-height: 1.2; max-width: 20ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}

/* Work illustration */
.bench { width: 100%; height: auto; display: block; }
.bench * { vector-effect: non-scaling-stroke; }
.bench .sun circle, .bench .sun path { fill: none; stroke: var(--rust); stroke-width: 2.5; stroke-linecap: round; }
.bench .flow { fill: none; stroke: var(--patina); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; }
.bench .data { fill: none; stroke: var(--steel); stroke-width: 2; stroke-dasharray: 3 5; }
.bench .body { fill: #fff; stroke: var(--steel); stroke-width: 2.5; stroke-linejoin: round; }
.bench .glass { fill: #d3dcdf; stroke: var(--steel); stroke-width: 2; }
.bench .seam, .bench .mast { fill: none; stroke: var(--steel); stroke-width: 1.6; }
.bench .rack { fill: var(--steel); }
.bench .tire { fill: var(--steel); }
.bench .hub { fill: var(--alum); }
.bench .ground { stroke: #b7c0c2; stroke-width: 2; }
.bench .pv { fill: #2f4658; stroke: var(--steel); stroke-width: 1.5; stroke-linejoin: round; }
.bench .pvl { stroke: #8fa6b4; stroke-width: 1; }
.bench .mcu { fill: var(--patina); }
.bench .relay { fill: #3f6f9c; }
.bench .contactor { fill: #eef0f0; stroke: var(--steel); stroke-width: 1.5; }
.bench .gland { fill: #c9d0d2; stroke: var(--steel); stroke-width: 1.5; }
.bench .bezel { fill: var(--steel); }
.bench .display { fill: #fff; }
.bench .g-bg { fill: none; stroke: #dfe4e5; stroke-width: 6; }
.bench .g-on { fill: none; stroke: var(--rust); stroke-width: 6; }
.bench .spark { fill: none; stroke: var(--patina); stroke-width: 2.5; stroke-linejoin: round; }
.bench .case { fill: var(--alum); stroke: var(--steel); stroke-width: 2.5; }
.bench .cell { fill: #3f6f9c; }
.bench .term { fill: #c9d0d2; }
.bench .copper { fill: #c8733f; }
.bench .roof { fill: var(--steel); stroke: var(--steel); stroke-width: 2.5; stroke-linejoin: round; }
.bench .shield { fill: #fff; stroke: var(--rust); stroke-width: 2.5; stroke-linejoin: round; }
.bench .check { fill: none; stroke: var(--rust); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bench .door { fill: var(--alum); stroke: var(--steel); stroke-width: 2; }
.bench .pipe { fill: none; stroke: var(--steel); stroke-width: 5; }
.bench .tank { fill: #3f6f9c; stroke: var(--steel); stroke-width: 2.5; }
.bench .tank-top { fill: #6f93b4; stroke: var(--steel); stroke-width: 2; }
.bench .pump { fill: var(--patina); stroke: var(--steel); stroke-width: 2; }
.bench .sensor { fill: var(--rust); }
.bench .signal { fill: none; stroke: var(--rust); stroke-width: 2.5; stroke-linecap: round; }

/* Focus */
.focus { background: var(--steel); color: #fff; }
.focus .sec-head p { color: var(--muted-dk); }
.f-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.f-grid article { border-top: 1px solid var(--steel-line); padding-top: 26px; }
.ico { width: 44px; height: 44px; fill: none; stroke: var(--rust-hi); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.f-grid h3 { margin-top: 18px; font-size: 1.25rem; font-weight: 700; }
.f-grid p { margin-top: 10px; color: var(--muted-dk); font-size: .98rem; }

/* Project logos */
.projects { padding: 72px 0; }
.projects h2 { font-size: 1.15rem; font-weight: 700; color: var(--muted); }
.logos {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; align-items: center;
}
.logos li { display: flex; justify-content: center; }
.logos img { max-height: 92px; width: auto; filter: brightness(.62) contrast(1.2); }

/* Contact */
.contact { background: var(--alum); }
.c-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.contact h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; }
.contact p { color: var(--muted); font-size: 1.1rem; max-width: 40ch; }
.btn {
  display: inline-block; margin-top: 26px;
  font-weight: 700; font-stretch: var(--wide); font-size: 1rem; text-decoration: none;
  background: var(--rust); color: #fff; border-radius: 999px; padding: 13px 30px;
}
.btn:hover { background: #9c3b20; }

/* Footer */
.foot { background: var(--steel); color: var(--muted-dk); font-size: .9rem; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: 30px; padding-bottom: 30px; }
.foot-in p:last-child { margin-left: auto; }

/* 404 */
.lost { min-height: 70vh; display: flex; align-items: center; }
.lost .wrap > p { margin-top: 22px; color: #cfd6d8; font-size: 1.15rem; max-width: 40ch; }
.lost .back { display: inline-block; margin-top: 30px; color: #fff; font-weight: 700; border: 1.5px solid var(--rust-hi); padding: 10px 22px; border-radius: 999px; text-decoration: none; }
.lost .back:hover { background: var(--rust-hi); }

/* Responsive */
@media (max-width: 980px) {
  .f-grid { grid-template-columns: 1fr 1fr; }
  .logos { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .c-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 760px) {
  .top nav a:not(.nav-cta) { display: none; }
  .hero { padding: 72px 0 56px; }
  .track { display: none; }
  .flight { margin-top: 44px; }
  .stages { grid-template-columns: 1fr; margin: 0; border-left: 3px solid var(--rust-hi); margin-left: 8px; }
  .stage { position: relative; padding: 0 0 30px 28px; }
  .stage:last-child { padding-bottom: 0; }
  .stage::before {
    content: ""; position: absolute; left: -11px; top: 4px; width: 13px; height: 13px;
    border-radius: 50%; background: var(--steel); border: 3px solid var(--rust-hi);
  }
  .stage:last-child::before { background: var(--rust-hi); }
  section { padding: 68px 0; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 32px; }
  .p-grid { grid-template-columns: 1fr; }
  .sustain img { height: 360px; object-position: 70% 50%; }
  .sustain .wrap { align-items: flex-end; padding-bottom: 32px; }
  .foot-in p:last-child { margin-left: 0; }
  .bench { margin: 0 -14px; width: calc(100% + 28px); }
}
@media (max-width: 520px) {
  .f-grid { grid-template-columns: 1fr; gap: 28px; }
  .logos { grid-template-columns: 1fr 1fr; }
  .logos img { max-height: 76px; }
}
.logos .faint img { filter: brightness(.3) contrast(1.4); }
