/* ============================================================
   Uberduck — dark, typographic design system
   Inter throughout, black/white/#0077ff.
   ============================================================ */

:root {
  --bg: #000000;
  --sheet: #0a0a0a;
  --card: #101010;
  --ink: #ffffff;
  --ink-soft: #d6d6d6;
  --muted: #969696;
  --line: #262626;
  --line-strong: #ffffff;
  --accent: #0077ff;
  --accent-dark: #2e88ff;
  --radius: 14px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
}

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: text-decoration-color 120ms ease, color 120ms ease;
}
a:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 640;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 620; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-top: 1.75em; margin-bottom: 0.4em; }

p { margin: 0 0 1.15em; }

.container {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  cursor: pointer;
}
.btn--primary {
  background: var(--accent);
  color: #000000;
}
.btn--primary:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 4.25rem;
}
.brand {
  font-family: var(--sans);
  font-weight: 660;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent-dark); }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.8rem clamp(1.25rem, 4vw, 2.5rem);
    border-bottom: none;
    font-size: 1rem;
  }
  .site-nav a.is-active { color: var(--accent-dark); }
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}
.hero__inner {
  max-width: 46rem;
  margin-inline: auto;
}
.hero h1 { max-width: 18ch; }
.hero__lede {
  font-size: clamp(1.08rem, 1.7vw, 1.22rem);
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 2.25rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ---------- the sheet: the main content surface ---------- */

.sheet-wrap { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.sheet {
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 5vw, 3.75rem) clamp(2.5rem, 5vw, 3.75rem);
}
.sheet .section__head { margin-bottom: 1.5rem; }
.sheet h1, .sheet h2 { margin-top: 0; }

@media (max-width: 640px) {
  .sheet {
    max-width: none;
    border-radius: 12px;
    padding: 1.75rem 1.25rem 2rem;
  }
}

/* ---------- section headings (inside sheets) ---------- */

.section__head { max-width: 56ch; }
.section__head p { color: var(--ink-soft); }

/* ---------- cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1.5rem 1.5rem 1.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease;
}
a.card:hover { border-color: var(--accent); }
/* kicker anchors the card bottom (all cards) */
.card__kicker--bottom {
  margin-top: auto;
  padding-top: 0.5rem;
}
.card--spectrum .card__top {
  justify-content: flex-end;
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}
.card__kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.45;
}
.card__title {
  font-family: var(--sans);
  font-weight: 640;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.card__desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* involvement meter: we [boxes] you -- no legend needed */
.meter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  margin-top: 0.15rem;
}
.meter small {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
}
.meter small:first-child { color: var(--accent); }
.meter small:last-child { color: var(--muted); }
.meter i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  border: 1px solid var(--muted);
  background: transparent;
  margin-inline: 1px;
}
.meter i.on {
  background: var(--accent);
  border-color: var(--accent);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- home: hosting spectrum (center line, staggered cards) ---------- */

.spectrum {
  position: relative;
  padding: 2.4rem 0 2rem;
}
.spectrum__track {
  position: absolute;
  left: 50%;
  top: 3rem;
  bottom: 2.6rem;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--line));
}
.spectrum__label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  background: var(--sheet);
  padding: 0 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.spectrum__label--top { top: 0; }
.spectrum__label--bottom { bottom: 0; }

.spectrum__stagger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 4.5rem;
  row-gap: 1.4rem;
  align-items: start;
}
.spec-row { position: relative; display: grid; }
.spec-row--right { margin-top: 7.8rem; }
.spec-row::after {
  content: "";
  position: absolute;
  top: 1.35rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sheet);
  border: 2px solid var(--accent);
}
.spec-row--left::after  { right: calc(-2.25rem - 4.5px); }
.spec-row--right::after { left:  calc(-2.25rem - 4.5px); }

/* softer services: 2x2 */
.card-grid3 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 640px) {
  .card-grid3 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .spectrum { padding: 0; }
  .spectrum__track { display: none; }
  .spec-row::after { display: none; }
  .spectrum__stagger { grid-template-columns: 1fr; row-gap: 1rem; }
  .spectrum__label {
    position: static;
    transform: none;
    background: none;
    padding: 0;
  }
  .spectrum__label--top { margin-bottom: 1rem; }
  .spectrum__label--bottom { margin-top: 1rem; }
}

/* ---------- content pages ---------- */

.page { padding: clamp(2.75rem, 6vw, 4.25rem) 0 clamp(3rem, 7vw, 5rem); }
.page__head { margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.page__lede {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* running text */
.prose {
  font-size: 1rem;
  line-height: 1.7;
}
.prose p { margin-bottom: 1.25em; }
.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  margin-top: 2.6em;
}
.prose h3 { margin-top: 2.2em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.25em; }
.prose li { margin-bottom: 0.55em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 620; color: var(--ink); }

/* section cards (colocation, remote hands) */
.block-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.6rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
}
.block-card h2 {
  margin-top: 0;
  margin-bottom: 0.9em;
  font-size: 1.45rem;
}
.block-card h3 { margin-top: 1.8em; }
.block-card > :last-child { margin-bottom: 0; }
.block-card table { margin: 1.2em 0 0.4em; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.5em 0 2em; }
table {
  font-family: var(--sans);
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}
caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  padding-bottom: 0.75rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
tbody tr:first-child th, tbody tr:first-child td { border-top: 2px solid var(--line-strong); }
td { color: var(--ink-soft); }
th[colspan], td[colspan] { font-weight: 600; color: var(--ink); }

@media (max-width: 640px) {
  th { white-space: nowrap; }
}

/* ---------- closing line ---------- */

.closing { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3.5rem, 7vw, 5.5rem); }
.closing .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.closing p {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 40ch;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--sheet);
  border-top: 1px solid var(--line);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.site-footer__brand {
  font-weight: 660;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.site-footer__heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.site-footer__links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.93rem;
}
.site-footer__links a:hover { color: var(--accent-dark); }
.site-footer__base {
  border-top: 1px solid var(--line);
  padding-block: 1.25rem;
}
.site-footer__base p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
