/* Mythic Technologies — site styles
   Palette taken from a T568B patch cable; the cable colors are only used in the cable graphic. */

:root {
  --paper: #C9D2DA;
  --surface: #DAE0E6;
  --ink: #15212E;
  --muted: #3E4B59;
  --line: #AEBAC5;
  --blue: #1D5FB4;
  --blue-deep: #123F78;
  --orange: #F08A24;
  --green: #2F8F46;
  --brown: #7B4A2A;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;

  --measure: 68ch;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.1rem);
  font-weight: 800;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  max-width: 17ch;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 750;
  font-stretch: 108%;
  font-variation-settings: "wdth" 108;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

p { margin: 0 0 1em; max-width: var(--measure); }

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  color: var(--muted);
  max-width: 56ch;
}

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.15rem;
  font-variation-settings: "wdth" 108;
}
.brand img { width: 40px; height: 40px; object-fit: contain; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

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

.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: #fff;
  line-height: 1.2;
  cursor: pointer;
  font-family: var(--body);
  font-size: 1rem;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

.btn-quiet { background: transparent; color: var(--blue); }
.btn-quiet:hover { background: var(--surface); color: var(--blue-deep); }

.site-nav .btn { color: #fff; padding: 10px 16px; }
.site-nav .btn:hover,
.site-nav .btn[aria-current="page"] { color: #fff; text-decoration: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

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

.hero { padding: clamp(48px, 8vw, 96px) 0; }

.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }

/* thin 8-conductor stripe used at the very bottom of the page */
.stripe {
  height: 8px;
  background: linear-gradient(90deg,
    #B3BFCA 0 6.25%, var(--orange) 6.25% 12.5%,
    var(--orange) 12.5% 25%,
    #B3BFCA 25% 31.25%, var(--green) 31.25% 37.5%,
    var(--blue) 37.5% 50%,
    #B3BFCA 50% 56.25%, var(--blue) 56.25% 62.5%,
    var(--green) 62.5% 75%,
    #B3BFCA 75% 81.25%, var(--brown) 81.25% 87.5%,
    var(--brown) 87.5% 100%);
}

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

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-white { background: var(--surface); }

.section-intro { margin-bottom: 36px; }

/* service rows: name on the left, detail on the right */
.rows { border-top: 2px solid var(--ink); }

.row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 8px 40px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.row h3 { margin: 0; }
.row p { margin: 0; color: var(--muted); }
.row a { font-weight: 700; }

/* numbered steps — this content is a real sequence */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  color: var(--blue);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--blue);
}
.facts li { padding: 10px 0 10px 20px; }
.facts strong { display: block; font-family: var(--display); font-size: 1.1rem; }
.facts span { color: var(--muted); }

/* detailed service blocks on services.html */
.service {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 12px 48px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.service:first-child { border-top: 2px solid var(--ink); }
.service h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 0; }
.service ul { margin: 12px 0 0; padding-left: 1.2em; color: var(--muted); }
.service li { margin-bottom: 4px; }

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.jump a { font-weight: 700; }

.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  padding: 24px 28px;
  max-width: 760px;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- Call to action band ---------- */

.cta {
  background: var(--ink);
  color: #fff;
  padding: clamp(48px, 7vw, 80px) 0;
}
.cta .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0; color: #C3CDD8; }
.cta { background: #1E2B38; }
.cta .btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* ---------- Contact form ---------- */

.form { display: grid; gap: 18px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field .hint { font-weight: 400; color: var(--muted); }

.field input,
.field textarea,
.field select {
  font: inherit;
  color: var(--ink);
  background: #EEF2F5;
  border: 1px solid #8796A4;
  border-radius: 6px;
  padding: 12px 14px;
  width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
  max-width: 560px;
  border: 1px solid;
}
.alert-ok { background: #E8F4EB; border-color: var(--green); color: #1D5A2C; }
.alert-err { background: #FDF0E4; border-color: var(--orange); color: #7A3F06; }
.alert p { margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 40px 0 32px;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer p { margin: 0; }
.site-footer strong { color: var(--ink); }

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

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; padding-bottom: 16px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; }

  .row, .service, .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
}

/* ---------- Data cable ----------
   A patch cable fixed down the right edge of the screen. As the page scrolls,
   pulses travel down four of the wires into the plug at the bottom.
   --cable-shift is set from the scroll position in mythic.js. */

.data-cable { display: none; }

@media (min-width: 1200px) {
  .data-cable {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 22px;
    width: 34px;
    z-index: 5;
    pointer-events: none;
  }

  .data-cable .jacket {
    flex: 1;
    display: flex;
    gap: 1px;
    padding: 0 4px;
    background: #1E2B38;
    border-radius: 0 0 4px 4px;
    box-shadow: inset 2px 0 0 rgba(255,255,255,.06), inset -2px 0 0 rgba(0,0,0,.25);
  }

  .data-cable .w {
    position: relative;
    width: 2.6px;
    overflow: hidden;
  }
  .w-o  { background: var(--orange); }
  .w-b  { background: var(--blue); }
  .w-g  { background: var(--green); }
  .w-br { background: var(--brown); }
  .w-wo  { background: repeating-linear-gradient(#A9B6C2 0 9px, var(--orange) 9px 16px); }
  .w-wg  { background: repeating-linear-gradient(#A9B6C2 0 9px, var(--green) 9px 16px); }
  .w-wb  { background: repeating-linear-gradient(#A9B6C2 0 9px, var(--blue) 9px 16px); }
  .w-wbr { background: repeating-linear-gradient(#A9B6C2 0 9px, var(--brown) 9px 16px); }

  /* the data pulses */
  .data-cable .w i {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(transparent 0 var(--gap), #FFF8E1 calc(var(--gap) + 8px), #fff calc(var(--gap) + 20px), #FFF8E1 calc(var(--gap) + 32px), transparent calc(var(--gap) + 40px));
    background-position: 0 calc(var(--cable-shift, 0) * var(--speed) * 1px);
    filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 5px rgba(255,248,225,.9));
  }
  .w-o  i { --gap: 170px; --speed: 1.15; }
  .w-b  i { --gap: 240px; --speed: 0.9; }
  .w-g  i { --gap: 205px; --speed: 1.3; }
  .w-br i { --gap: 280px; --speed: 1; }

  /* plug at the bottom, contacts facing down */
  .data-cable .plug {
    width: 34px;
    height: 46px;
    background: #33465A;
    border-radius: 3px 3px 6px 6px;
    position: relative;
  }
  .data-cable .plug span {
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: 5px;
    height: 12px;
    background: repeating-linear-gradient(90deg, #D4AF37 0 2px, transparent 2px 3.1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .data-cable .w i { display: none; }
}
