/* ==========================================================================
   SMART GUY PCS (PTY) LTD — site.css
   Design: "patch panel" — rack steel, link-status green, cable orange.
   ========================================================================== */

:root {
  /* Colour — drawn from a loaded patch panel */
  --ink:        #0F1720;   /* rack steel */
  --ink-2:      #1A2530;   /* raised panel face */
  --ink-3:      #263341;   /* panel edge / hairline on dark */
  --paper:      #F4F6F7;   /* cool page ground */
  --white:      #FFFFFF;
  --rule:       #DCE2E7;
  --rule-soft:  #EAEEF1;

  --link-up:    #17876C;   /* link-status green — structure, labels, ticks */
  --link-up-dk: #0F6551;
  --signal:     #E4572E;   /* cable orange — ACTIONS ONLY */
  --signal-dk:  #C4441F;

  --text:       #16202A;
  --muted:      #56646F;
  --muted-2:    #7E8B95;
  --on-dark:    #E8EDF1;
  --on-dark-mu: #9BAAB6;

  /* Type */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Space */
  --gut: clamp(1.15rem, 4vw, 2rem);
  --max: 1140px;
  --max-narrow: 760px;

  --r: 3px;             /* deliberately tight — panel hardware, not app cards */
  --shadow: 0 1px 2px rgba(15,23,32,.06), 0 8px 24px rgba(15,23,32,.06);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--link-up-dk); text-underline-offset: 2px; }
a:hover { color: var(--signal-dk); }

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

/* ---------------------------------------------------------------- type -- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 6.2vw, 3.7rem); }
h2 { font-size: clamp(1.6rem, 3.9vw, 2.4rem); }
h3 { font-size: clamp(1.12rem, 2.3vw, 1.35rem); letter-spacing: -0.01em; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.05rem, 2.3vw, 1.28rem);
  line-height: 1.55;
  color: var(--muted);
}

/* Eyebrow — port-label vernacular, set in mono */
.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--link-up);
  margin: 0 0 .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow--on-dark { color: #4FD1A5; }

/* --------------------------------------------------------------- layout -- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.wrap--narrow { max-width: var(--max-narrow); }

.band { padding-block: clamp(3rem, 8vw, 5.5rem); }
.band--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.band--dark { background: var(--ink); color: var(--on-dark); }
.band--dark h2, .band--dark h3 { color: var(--white); }
.band--dark p { color: var(--on-dark-mu); }
.band--paper { background: var(--paper); }
.band--white { background: var(--white); }

.rule-top { border-top: 1px solid var(--rule); }

/* --------------------------------------------------------------- skip -- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--signal); color: #fff;
  padding: .75rem 1.1rem; z-index: 200; font-weight: 600;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- header -- */
.topbar {
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--ink-3);
}
.topbar__in {
  display: flex; flex-wrap: wrap; gap: .35rem 1.4rem;
  align-items: center; justify-content: center;
  padding-block: .5rem;
  text-align: center;
}
.topbar a { color: var(--on-dark); text-decoration: none; }
.topbar a:hover { color: #4FD1A5; }
.topbar .dot { color: var(--link-up); }

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__mark {
  width: 34px; height: 34px; flex: none;
  background: var(--ink);
  border-radius: var(--r);
  display: grid; place-items: center;
}
.brand__mark span {
  display: block; width: 16px; height: 10px;
  border: 2px solid var(--link-up);
  border-bottom-width: 4px;
  border-radius: 1px 1px 2px 2px;
}
.brand__name {
  font-family: var(--display);
  font-weight: 700; font-size: 1.02rem;
  letter-spacing: -0.02em; color: var(--text);
  line-height: 1.05;
}
.brand__sub {
  display: block;
  font-family: var(--mono); font-weight: 400;
  font-size: .62rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted-2);
  margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  font-size: .92rem; font-weight: 500;
  color: var(--text); text-decoration: none;
  padding: .5rem .62rem; border-radius: var(--r);
  white-space: nowrap;
}
.nav a:hover { background: var(--rule-soft); color: var(--text); }
.nav a[aria-current="page"] {
  color: var(--link-up-dk);
  box-shadow: inset 0 -2px 0 var(--link-up);
}

.nav-toggle {
  display: none;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--r); padding: .58rem .8rem;
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); cursor: pointer; min-height: 44px;
}

/* ------------------------------------------------------------ buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  min-height: 48px;                 /* Android touch target */
  padding: .7rem 1.3rem;
  border-radius: var(--r);
  font-family: var(--body);
  font-size: .96rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }

.btn--go { background: var(--signal); color: #fff; }
.btn--go:hover { background: var(--signal-dk); color: #fff; }

.btn--wa { background: var(--link-up); color: #fff; }
.btn--wa:hover { background: var(--link-up-dk); color: #fff; }

.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--rule);
}
.btn--ghost:hover { background: var(--white); color: var(--text); }

.btn--on-dark { background: transparent; color: var(--on-dark); border-color: var(--ink-3); }
.btn--on-dark:hover { background: var(--ink-2); color: var(--white); }

.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; }

/* --------------------------------------------------------------- hero -- */
.hero { background: var(--white); border-bottom: 1px solid var(--rule); }
.hero__in { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 56ch; margin-top: .4rem; }
.hero .btn-row { margin-top: 1.7rem; }

/* Desktop: headline and supporting copy sit side by side, baseline-aligned
   at the foot of the headline. Keeps the measure short and fills the width. */
@media (min-width: 980px) {
  .hero__in {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    column-gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
  }
  .hero__in > .eyebrow,
  .hero__in > .porttag { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
  .hero__in > h1 {
    grid-column: 1; grid-row: 2;
    margin-bottom: 0; max-width: none;
    font-size: clamp(2.9rem, 4.1vw, 4rem);
  }
  .hero__in > .lede {
    grid-column: 2; grid-row: 2;
    align-self: end; margin: 0 0 .3rem;
  }
  .hero__in > .btn-row { grid-column: 2; grid-row: 3; margin-top: 1.6rem; }
  .hero__in > .hero__meta { grid-column: 2; grid-row: 4; }
}

.hero__meta {
  margin-top: 1.6rem;
  font-family: var(--mono); font-size: .78rem;
  color: var(--muted-2); letter-spacing: .03em;
}

/* ------------------------------------------- SIGNATURE: the patch panel -- */
.panel {
  background: var(--ink);
  border-radius: 4px;
  padding: clamp(1rem, 2.5vw, 1.4rem);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow);
}
.panel__rail {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-dark-mu);
  padding-bottom: .85rem; margin-bottom: .85rem;
  border-bottom: 1px solid var(--ink-3);
}
.panel__ports {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 2px;
  background: var(--ink-3);
  border: 1px solid var(--ink-3);
  border-radius: 3px;
  overflow: hidden;
}
@media (min-width: 700px) {
  /* fixed 4-column grid so 7 ports sit 4+3, not 6+1 with an orphan row */
  .panel__ports { grid-template-columns: repeat(4, 1fr); }
}
.port {
  display: block;
  background: var(--ink-2);
  padding: .95rem .95rem 1.05rem;
  text-decoration: none;
  color: var(--on-dark);
  min-height: 92px;
  transition: background-color .14s ease;
}
.port:hover, .port:focus-visible { background: #22303E; color: var(--white); }
.port__id {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .14em; color: var(--on-dark-mu);
  margin-bottom: .5rem;
}
.led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--link-up); flex: none;
  box-shadow: 0 0 0 0 rgba(23,135,108,.55);
}
.port__name {
  display: block;
  font-family: var(--display); font-weight: 600;
  font-size: 1rem; letter-spacing: -0.01em;
  line-height: 1.15; margin-bottom: .25rem;
}
.port__note {
  display: block;
  font-size: .8rem; color: var(--on-dark-mu); line-height: 1.35;
}

/* one orchestrated moment: ports come up in sequence, like a switch booting */
@media (prefers-reduced-motion: no-preference) {
  .panel--live .led { animation: linkup .9s ease-out both; }
  .panel--live .port:nth-child(1) .led { animation-delay: .10s; }
  .panel--live .port:nth-child(2) .led { animation-delay: .20s; }
  .panel--live .port:nth-child(3) .led { animation-delay: .30s; }
  .panel--live .port:nth-child(4) .led { animation-delay: .40s; }
  .panel--live .port:nth-child(5) .led { animation-delay: .50s; }
  .panel--live .port:nth-child(6) .led { animation-delay: .60s; }
  .panel--live .port:nth-child(7) .led { animation-delay: .70s; }
}
@keyframes linkup {
  0%   { background: #3A4A59; box-shadow: 0 0 0 0 rgba(23,135,108,0); }
  45%  { background: #4FD1A5; box-shadow: 0 0 0 5px rgba(23,135,108,.28); }
  100% { background: var(--link-up); box-shadow: 0 0 0 0 rgba(23,135,108,0); }
}

/* page-header port tag on inner pages (quiet echo of the signature) */
.porttag {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--ink); color: var(--on-dark);
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase;
  padding: .4rem .7rem; border-radius: 3px;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------- grids -- */
.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 1.5rem;
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card__no {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .14em; color: var(--link-up);
  display: block; margin-bottom: .7rem;
}

.card--link { text-decoration: none; color: inherit; display: block; transition: border-color .14s ease; }
.card--link:hover { border-color: var(--link-up); color: inherit; }
.card__go {
  display: inline-block; margin-top: .9rem;
  font-family: var(--mono); font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--signal); font-weight: 500;
}

/* ---------------------------------------------------------- prose bits -- */
.ticks { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.ticks li {
  position: relative; padding-left: 1.7rem; margin-bottom: .55rem;
  color: var(--muted);
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--link-up);
}
.ticks strong { color: var(--text); font-weight: 600; }

/* real sequences only — an install genuinely has an order */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li {
  counter-increment: s;
  position: relative; padding-left: 3.1rem;
  padding-bottom: 1.4rem; margin-bottom: 0;
  border-left: 1px solid var(--rule);
  margin-left: 1rem;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: -1rem; top: -2px;
  width: 2rem; height: 2rem;
  background: var(--ink); color: #4FD1A5;
  border-radius: 3px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
}
.steps h3 { margin-bottom: .25rem; }
.steps p { color: var(--muted); font-size: .95rem; }

/* spec table — reads like a quote sheet */
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec caption {
  text-align: left; font-family: var(--mono);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); padding-bottom: .7rem;
}
.spec th, .spec td {
  text-align: left; padding: .85rem .9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.spec th {
  font-family: var(--body); font-weight: 600;
  color: var(--text); width: 46%;
}
.spec td { color: var(--muted); font-family: var(--mono); font-size: .88rem; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details {
  border-bottom: 1px solid var(--rule);
  background: var(--white);
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.15rem 2.6rem 1.15rem 1.15rem;
  font-weight: 600; position: relative;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono); font-size: 1.25rem; color: var(--link-up);
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details > p {
  margin: 0; padding: 0 1.15rem 1.3rem;
  color: var(--muted); font-size: .95rem;
}

/* areas served — plain, dense, and genuinely useful for local search */
.areas {
  display: flex; flex-wrap: wrap; gap: .45rem;
  list-style: none; padding: 0; margin: 0;
}
.areas li {
  font-family: var(--mono); font-size: .78rem;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 2px; padding: .38rem .62rem; color: var(--muted);
}

/* CTA band */
.cta__in { display: grid; gap: 1.6rem; align-items: center; }
.cta h2 { max-width: 18ch; }
.cta .lede { color: var(--on-dark-mu); max-width: 48ch; }
@media (min-width: 800px) {
  .cta__in { grid-template-columns: 1.35fr .95fr; gap: 2.5rem; }
}

/* callout */
.note {
  background: var(--white);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  border-radius: var(--r);
  padding: 1.15rem 1.3rem;
  font-size: .95rem; color: var(--muted);
}
.note strong { color: var(--text); }

/* -------------------------------------------------------------- footer -- */
.foot { background: var(--ink); color: var(--on-dark-mu); font-size: .92rem; }
.foot a { color: var(--on-dark); text-decoration: none; }
.foot a:hover { color: #4FD1A5; }
.foot__grid { display: grid; gap: 2rem; padding-block: clamp(2.5rem, 6vw, 3.5rem); }
@media (min-width: 720px) { .foot__grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.foot h4 {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-dark-mu); margin-bottom: .9rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .5rem; }
.foot__legal {
  border-top: 1px solid var(--ink-3);
  padding-block: 1.3rem;
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .03em; color: #6B7A87;
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  justify-content: space-between;
}

/* --------------------------------------------- sticky mobile call bar -- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; gap: 1px;
  background: var(--ink-3);
  border-top: 1px solid var(--ink-3);
  padding-bottom: env(safe-area-inset-bottom);
}
.callbar a {
  flex: 1 1 0; min-height: 56px;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  text-decoration: none; color: #fff; font-weight: 600; font-size: .95rem;
}
.callbar .c-call { background: var(--signal); }
.callbar .c-wa   { background: var(--link-up); }

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    padding: .25rem 0 .75rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .85rem .3rem; border-bottom: 1px solid var(--rule-soft); min-height: 48px; display: flex; align-items: center; }
  .nav a:last-child { border-bottom: 0; }
  .masthead__in { position: relative; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .callbar { display: flex; }
  .foot { padding-bottom: 60px; }
  .hero__in { padding-bottom: 2.25rem; }
  .port { min-height: 84px; }
  .steps li { padding-left: 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .masthead, .callbar, .topbar, .btn-row { display: none; }
  body { background: #fff; }
}
