/* Rackrun — rackrun.net
   Palette: rack slate, faceplate gray, Cat6 jacket blue, and the T568B wire colors.
   Type: Archivo (variable width + weight), self-hosted. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2-variations"),
       url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #15232e;
  --ink-2: #44535d;
  --paper: #ffffff;
  --panel: #edf1f2;
  --rule: #cdd5d8;
  --jacket: #1d5fad;
  --jacket-dark: #164c8c;
  --w-orange: #e3691b;
  --w-green: #2c8c45;
  --w-blue: #2160b5;
  --w-brown: #6e4426;
  --w-white: #f6f6f3;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shade: linear-gradient(to bottom, rgba(255, 255, 255, 0.26) 0, rgba(255, 255, 255, 0) 42%, rgba(0, 0, 0, 0.16) 100%);
  --shade-jacket: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0) 35%, rgba(0, 0, 0, 0.14) 100%);
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  font-stretch: 100%;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  font-weight: 760;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 1.1rem + 4.6vw, 4.25rem); font-stretch: 112%; line-height: 1.02; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem); font-stretch: 116%; line-height: 1.1; }
h3 { font-size: 1.3125rem; font-stretch: 108%; line-height: 1.25; font-weight: 720; }

p { margin: 0; }
p + p { margin-top: 1em; }

a { color: var(--jacket); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--jacket-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--w-orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  z-index: 100;
  border-radius: 4px;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.375rem;
  font-weight: 780;
  font-stretch: 125%;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 2rem; height: 2rem; flex: none; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 560;
}
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav .nav-call {
  color: #fff;
  background: var(--jacket);
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  font-weight: 650;
}
.nav .nav-call:hover { background: var(--jacket-dark); color: #fff; text-decoration: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.35rem;
  border-radius: 6px;
  font-size: 1.0625rem;
  font-weight: 680;
  font-stretch: 106%;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn svg { width: 1.15rem; height: 1.15rem; flex: none; }
.btn-primary { background: var(--jacket); color: #fff; }
.btn-primary:hover { background: var(--jacket-dark); color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero h1 span { display: block; }
.hero .lede {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  color: var(--ink-2);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}
.cta-row .email { font-size: 1rem; margin-left: 0.25rem; }
.booking { margin-top: 1.25rem; font-size: 1rem; color: var(--ink-2); }

/* The stripped cable: blue jacket, then eight conductors in T568B order */
.cable {
  display: flex;
  align-items: center;
  margin-top: clamp(3rem, 7vw, 5rem);
  --wire: 10px;
  --gap: 3px;
}
.jacket {
  position: relative;
  z-index: 1;
  flex: 0 0 clamp(7rem, 32vw, 26rem);
  height: calc(8 * var(--wire) + 7 * var(--gap) + 16px);
  border-radius: 0 12px 12px 0;
  background: var(--shade-jacket), var(--jacket);
  overflow: hidden;
}
.jacket::after {
  content: "RACKRUN  CAT6  UTP  23AWG  SOLID COPPER";
  position: absolute;
  left: 1rem;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  white-space: pre;
  overflow: hidden;
  font-size: 0.6875rem;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
}
.wires {
  flex: 1 1 auto;
  display: grid;
  gap: var(--gap);
  margin-left: -10px;
}
.w {
  height: var(--wire);
  border-radius: 0 var(--wire) var(--wire) 0;
  background: var(--shade), var(--c);
}
.w.s {
  background: var(--shade),
    repeating-linear-gradient(118deg, var(--w-white) 0 14px, var(--c) 14px 22px);
}
.w1, .w2 { --c: var(--w-orange); }
.w3, .w6 { --c: var(--w-green); }
.w4, .w5 { --c: var(--w-blue); }
.w7, .w8 { --c: var(--w-brown); }

@media (prefers-reduced-motion: no-preference) {
  .w { animation: pull 1.1s cubic-bezier(0.22, 0.7, 0.2, 1) both; }
  .w1 { animation-delay: 0.15s; }
  .w2 { animation-delay: 0.2s; }
  .w3 { animation-delay: 0.25s; }
  .w4 { animation-delay: 0.3s; }
  .w5 { animation-delay: 0.35s; }
  .w6 { animation-delay: 0.4s; }
  .w7 { animation-delay: 0.45s; }
  .w8 { animation-delay: 0.5s; }
  @keyframes pull {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head p { margin-top: 1rem; color: var(--ink-2); }
.panel { background: var(--panel); }

/* Services, color-coded by wire pair */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.75rem, 5vw, 4rem) clamp(2rem, 6vw, 5rem);
}
.service p { margin-top: 0.75rem; max-width: 34rem; }
.service ul { margin: 1rem 0 0; padding-left: 1.15rem; }
.service li { margin-top: 0.3rem; }
.service li::marker { color: var(--c); }

.pair { display: grid; gap: 3px; width: 3.5rem; margin-bottom: 1.25rem; }
.pair::before, .pair::after { content: ""; height: 7px; border-radius: 0 4px 4px 0; }
.pair::before { background: var(--shade), repeating-linear-gradient(118deg, var(--w-white) 0 9px, var(--c) 9px 15px); }
.pair::after { background: var(--shade), var(--c); }
.c-orange { --c: var(--w-orange); }
.c-green { --c: var(--w-green); }
.c-blue { --c: var(--w-blue); }
.c-brown { --c: var(--w-brown); }

/* Homes and businesses */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 6vw, 5rem);
}
.split h2 { margin-bottom: 1rem; }
.split p { color: var(--ink-2); max-width: 34rem; }
.split ul { margin: 1.25rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.split li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }

/* Standards */
.standards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.25rem 2rem;
  margin: 0;
}
.standards dt { font-size: 1.1875rem; font-weight: 720; font-stretch: 108%; line-height: 1.3; }
.standards dd { margin: 0.6rem 0 0; color: var(--ink-2); }

/* Process: a real sequence, so it is numbered */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.25rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 2.75rem;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  color: var(--jacket);
  margin-bottom: 0.9rem;
}
.steps p { margin-top: 0.6rem; color: var(--ink-2); }

/* FAQ */
.faq { max-width: 46rem; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.1875rem;
  font-weight: 680;
  font-stretch: 104%;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-25%) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(25%) rotate(-135deg); }
@media (prefers-reduced-motion: no-preference) {
  .faq summary::after { transition: transform 0.2s ease; }
}
.faq details p { padding: 0 0 1.4rem; max-width: 40rem; color: var(--ink-2); }

/* Contact */
.contact { background: var(--ink); color: #fff; }
.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 6rem);
  align-items: start;
}
.contact h2 { color: #fff; }
.contact .phone {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.5rem);
  font-weight: 780;
  font-stretch: 118%;
  line-height: 1.05;
  color: #fff;
  text-decoration: none;
  font-variant-numeric: lining-nums tabular-nums;
}
.contact .phone:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.contact .hint { margin-top: 0.75rem; color: #c3ccd1; }
.contact .cta-row { margin-top: 2rem; }
.contact .btn-primary { background: #fff; color: var(--ink); }
.contact .btn-primary:hover { background: var(--panel); color: var(--ink); }
.contact .btn-outline { border-color: #fff; color: #fff; }
.contact .btn-outline:hover { background: #fff; color: var(--ink); }
.contact a:not(.btn):not(.phone) { color: #fff; }
.contact .email-line { margin-top: 1.5rem; }
.contact h3 { color: #fff; margin-bottom: 0.75rem; }
.contact .area p { color: #c3ccd1; }
.contact :focus-visible { outline-color: #f5a462; }

/* Footer */
.site-footer { padding-bottom: 2.5rem; font-size: 0.9375rem; color: var(--ink-2); }
.footer-wires { display: grid; gap: 1px; margin-bottom: 2rem; }
.footer-wires .w { height: 3px; border-radius: 0; animation: none; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--ink-2); }

/* Mobile call/text bar */
.callbar { display: none; }

/* ---------- Plain pages (privacy, 404) ---------- */

.page { padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 8vw, 6rem); }
.page .prose { max-width: 44rem; }
.prose h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.25rem); }
.prose h2 { font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem); font-stretch: 110%; margin: 2.5rem 0 0.75rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }
.prose .updated { margin-top: 1rem; color: var(--ink-2); }
.prose .lede { margin-top: 1.25rem; font-size: 1.25rem; color: var(--ink-2); }
.page .cta-row { margin-top: 2rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .standards, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact .wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .services, .split { grid-template-columns: minmax(0, 1fr); }
  .cable { --wire: 7px; --gap: 2px; }
  .jacket::after { display: none; }

  body.has-callbar { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
  .callbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--ink);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.08);
  }
  .callbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    border-radius: 6px;
    font-weight: 680;
    font-stretch: 106%;
    text-decoration: none;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.85);
  }
  .callbar a:first-child { background: var(--jacket); border-color: var(--jacket); }
  .callbar svg { width: 1.1rem; height: 1.1rem; }
}

@media (max-width: 520px) {
  h1 { font-size: 2.35rem; font-stretch: 100%; letter-spacing: -0.02em; }
  .standards, .steps { grid-template-columns: minmax(0, 1fr); }
  .cta-row .btn { flex: 1 1 100%; }
  .cta-row .email { margin-left: 0; }
}

@media print {
  .callbar, .cable, .footer-wires, .nav { display: none !important; }
  .contact { background: none; color: var(--ink); }
}
