/* ==========================================================================
   TrunkHive — site styles
   Palette: switchboard ink + hive honey, with a teal "line is live" signal.
   Type: Bricolage Grotesque (display/body) + IBM Plex Mono (technical labels).
   ========================================================================== */

:root {
  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Light theme (default tokens) */
  --bg: #f7f4ee;
  --bg-2: #efe9dd;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --line: #ddd5c6;
  --line-strong: #c3b8a4;
  --text: #161a21;
  --muted: #535b67;
  --accent: #f5b23d;          /* honey — used for fills, always with --on-accent text */
  --accent-strong: #e79a12;
  --on-accent: #1b1305;
  --accent-text: #8a5300;     /* honey dark enough for text on light bg */
  --signal: #0f766e;          /* "live" teal */
  --signal-bg: #d6f2ee;
  --grid: rgba(22, 26, 33, 0.14);
  --focus: #1d4ed8;
  --shadow: 0 1px 0 rgba(22, 26, 33, 0.04), 0 12px 32px -18px rgba(22, 26, 33, 0.28);
  --header-bg: rgba(247, 244, 238, 0.82);

  --radius: 14px;
  --radius-sm: 9px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 120px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1016;
    --bg-2: #121720;
    --surface: #161c26;
    --surface-2: #1b222e;
    --line: #283140;
    --line-strong: #3a4557;
    --text: #ece7dc;
    --muted: #a4acb9;
    --accent: #f5b23d;
    --accent-strong: #ffc663;
    --on-accent: #1b1305;
    --accent-text: #f5b23d;
    --signal: #4fd1c5;
    --signal-bg: rgba(79, 209, 197, 0.12);
    --grid: rgba(236, 231, 220, 0.12);
    --focus: #8ab4ff;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
    --header-bg: rgba(13, 16, 22, 0.78);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1016;
  --bg-2: #121720;
  --surface: #161c26;
  --surface-2: #1b222e;
  --line: #283140;
  --line-strong: #3a4557;
  --text: #ece7dc;
  --muted: #a4acb9;
  --accent: #f5b23d;
  --accent-strong: #ffc663;
  --on-accent: #1b1305;
  --accent-text: #f5b23d;
  --signal: #4fd1c5;
  --signal-bg: rgba(79, 209, 197, 0.12);
  --grid: rgba(236, 231, 220, 0.12);
  --focus: #8ab4ff;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
  --header-bg: rgba(13, 16, 22, 0.78);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -0.03em; }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; }

::selection { background: var(--accent); color: var(--on-accent); }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before {
  content: "";
  width: 10px; height: 11px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  color: var(--muted);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1.5px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-bd: var(--accent);
}
.btn--primary:hover { --btn-bg: var(--accent-strong); --btn-bd: var(--accent-strong); }
.btn--sm { min-height: 40px; padding: 9px 16px; font-size: 0.94rem; }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name span { color: var(--accent-text); }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 550;
  font-size: 0.98rem;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { color: var(--text); background: var(--bg-2); }
.nav-link[aria-current="page"] { color: var(--text); }
.nav-link[aria-current="page"]::after {
  content: "";
  width: 6px; height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-signin { margin-left: 8px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.icon-btn:hover { border-color: var(--line-strong); background: var(--bg-2); }
.icon-btn svg { width: 19px; height: 19px; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { min-height: 48px; font-size: 1.08rem; padding: 10px 12px; border-radius: 10px; }
  .nav-signin { margin: 10px 0 0; }
  .nav-signin .btn { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }
.section-head--stack { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { margin-bottom: 22px; }
.hero h1 em {
  font-style: normal;
  color: var(--accent-text);
}
.hero .lead { margin-bottom: 32px; }
.hero-proto {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 36px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
}
.hero-proto li { display: inline-flex; align-items: center; gap: 8px; }
.hero-proto li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Hex network visual ---------- */
.switchboard {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% 45%, var(--surface) 0%, var(--bg-2) 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.switchboard-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.switchboard-bar .live {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--signal);
}
.switchboard-bar .live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: live-pulse 2.2s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); }
  80%, 100% { box-shadow: 0 0 0 9px transparent; }
}

.hexnet {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 440;
}
.hn-grid { fill: none; stroke: var(--grid); stroke-width: 1; }
.hn-cell { fill: transparent; }
.hn-cell--warm { fill: var(--accent); opacity: 0.09; }
.hn-core { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: var(--accent); stroke-width: 2; }
.hn-core-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  fill: var(--accent-text);
  text-anchor: middle;
}
.hn-trace {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hn-trace--signal { stroke: var(--signal); }
.hn-head { fill: var(--text); }
.hn-node { fill: var(--accent); }
.hn-node--signal { fill: var(--signal); }
.hn-ping {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: hn-ping 1s ease-out forwards;
}
.hn-ping--signal { stroke: var(--signal); }
@keyframes hn-ping {
  from { transform: scale(0.3); opacity: 1; }
  to { transform: scale(2.6); opacity: 0; }
}

.ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 14px 16px 16px;
  list-style: none;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}
.ladder li {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.35;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.ladder li b { font-weight: 500; color: var(--text); }
.ladder li.is-on { opacity: 1; }
.ladder li.is-on::before { background: var(--signal); }
.ladder li::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
@media (max-width: 520px) {
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 28px;
  background: var(--surface);
  transition: background-color 0.2s ease;
}
.service:hover { background: var(--surface-2); }
.hex-num {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 50px;
  margin-bottom: 22px;
  background: var(--accent);
  color: var(--on-accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
}
.service p { color: var(--muted); margin-bottom: 18px; }
.service .tags {
  margin-top: auto;
  color: var(--accent-text);
  font-size: 0.72rem;
}
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .services { grid-template-columns: 1fr; } }

/* ---------- Tech stack: patch panel ---------- */
.patch-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.port-group {
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.port-group h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 1.08rem;
}
.port-group h3 .mono { color: var(--muted); font-size: 0.7rem; font-weight: 500; }
.port-list { margin: 0; padding: 0; list-style: none; }
.port-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-weight: 520;
}
.port-list li::before {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-radius: 3px;
  border: 1.5px solid var(--line-strong);
  background: radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px);
}
@media (max-width: 1000px) { .patch-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .patch-panel { grid-template-columns: 1fr; } }

/* ---------- Product selector ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.product-grid > li { display: flex; }
.product-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 260px;
  padding: 24px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}
.product-tile .tile-icon {
  width: 46px; height: 46px;
  margin-bottom: 26px;
  color: var(--muted);
}
.product-tile h3 { font-size: 1.35rem; margin-bottom: 8px; }
.product-tile p { color: var(--muted); font-size: 0.98rem; margin: 0 0 20px; }
.product-tile .tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.badge--live {
  border-color: transparent;
  background: var(--signal-bg);
  color: var(--signal);
}
.badge--live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}

a.product-tile {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
a.product-tile .tile-icon { color: var(--accent-text); }
a.product-tile:hover { transform: translateY(-3px); background: var(--surface-2); }
a.product-tile .go {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  transition: transform 0.2s ease;
}
a.product-tile:hover .go { transform: translateX(3px); }
a.product-tile:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

.product-tile[aria-disabled="true"] {
  border-style: dashed;
  background: transparent;
  cursor: not-allowed;
}
.product-tile[aria-disabled="true"] h3,
.product-tile[aria-disabled="true"] .tile-icon { color: var(--muted); }

@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-tile { min-height: 0; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-aside .email-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 28px;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 650;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  word-break: break-all;
}
.contact-aside .email-link:hover { text-decoration-thickness: 3px; }
.contact-points { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.contact-points li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px dashed var(--line-strong); }
.contact-points li:last-child { border-bottom: 1px dashed var(--line-strong); }
.contact-points .mono { color: var(--text); min-width: 88px; padding-top: 3px; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--focus); outline-offset: 1px; border-radius: var(--radius-sm); }
.field [aria-invalid="true"] { border-color: #c2410c; }
.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.form-note { margin: 0; color: var(--muted); font-size: 0.9rem; }
.form-status { grid-column: 1 / -1; margin: 0; font-weight: 550; min-height: 1.2em; }
.form-status.is-ok { color: var(--signal); }
.form-status.is-err { color: #c2410c; }
:root[data-theme="dark"] .form-status.is-err,
:root[data-theme="dark"] .field [aria-invalid="true"] { color: #fb923c; border-color: #fb923c; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .form { grid-template-columns: 1fr; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero .lead { margin-bottom: 30px; }
.page-hero::after {
  /* faint honeycomb texture, right side */
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: min(560px, 60%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16.2v32.3L28 64.7 0 48.5V16.2zM28 64.7V97' fill='none' stroke='%23888' stroke-opacity='.28' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  -webkit-mask-image: linear-gradient(to left, #000 10%, transparent 90%);
  mask-image: linear-gradient(to left, #000 10%, transparent 90%);
  pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Calling page ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature svg { width: 30px; height: 30px; margin-bottom: 18px; color: var(--accent-text); }
.feature p { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps::before {
  /* the "wire" connecting the steps */
  content: "";
  position: absolute;
  top: 25px;
  left: 30px; right: 30px;
  border-top: 2px dashed var(--line-strong);
}
.step { position: relative; counter-increment: step; }
.step .hex-num { margin-bottom: 20px; position: relative; }
.step .hex-num::after { content: counter(step, decimal-leading-zero); }
.step p { color: var(--muted); margin: 0; max-width: 34ch; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 10px; bottom: 10px; left: 21px; right: auto; border-top: 0; border-left: 2px dashed var(--line-strong); }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; }
  .step .hex-num { grid-row: span 2; margin: 0; }
}

.under-hood {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.spec-list { margin: 0; padding: 0; list-style: none; }
.spec-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px dashed var(--line-strong);
}
.spec-list li:last-child { border-bottom: 1px dashed var(--line-strong); }
.spec-list .mono { color: var(--accent-text); padding-top: 4px; }
.spec-list span:last-child { color: var(--muted); }
@media (max-width: 860px) { .under-hood { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .spec-list li { grid-template-columns: 1fr; gap: 4px; } }

.faq { max-width: 860px; }
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-weight: 650;
  font-size: 1.14rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: translateY(-4px) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq summary:focus-visible { border-radius: 4px; }
.faq .answer { padding: 0 40px 24px 0; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 22px;
  background: var(--accent);
  color: var(--on-accent);
}
.cta-band h2 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { margin: 0; max-width: 52ch; }
.cta-band .btn { --btn-bg: var(--on-accent); --btn-fg: #fdf6e8; --btn-bd: var(--on-accent); }
.cta-band .btn:hover { --btn-bg: #000; --btn-bd: #000; }
.cta-band .btn--ghost { --btn-bg: transparent; --btn-fg: var(--on-accent); --btn-bd: var(--on-accent); }
.cta-band .btn--ghost:hover { --btn-bg: rgba(0, 0, 0, 0.08); --btn-bd: var(--on-accent); }
.cta-band :focus-visible { outline-color: var(--on-accent); }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 48px 36px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-grid .brand { margin-bottom: 12px; color: var(--text); }
.footer-grid h2 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding: 5px 0; text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.footer-legal p { margin: 0; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(80px, 14vw, 160px); text-align: left; }
.notfound .code { font-family: var(--font-mono); color: var(--accent-text); font-size: 0.9rem; margin-bottom: 14px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .switchboard-bar .live::before { animation: none; }
  a.product-tile:hover, a.product-tile:hover .go, .btn:hover .arrow { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .switchboard, .form, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Small utilities ---------- */
.section--flush-top { padding-top: 0; }
.eyebrow .badge { margin-left: 6px; }
.page-hero h1 em { font-style: normal; color: var(--accent-text); }
.page-hero h1 { max-width: 20ch; }
.btn svg { width: 18px; height: 18px; flex: none; }
a.product-tile .go svg { width: 18px; height: 18px; }
.btn { white-space: nowrap; }

/* ==========================================================================
   Hero flow map (Twilio · Flex · SIP)
   ========================================================================== */
.switchboard-bar { flex-wrap: wrap; row-gap: 10px; }
.flow-title { color: var(--text); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: none; }
.flow-controls { display: flex; align-items: center; gap: 8px; }
.flow-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.flow-tabs button {
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.flow-tabs button:hover { color: var(--text); }
.flow-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.flow-pause {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.flow-pause:hover { border-color: var(--line-strong); }
.flow-pause svg { width: 14px; height: 14px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.flow-pause .i-pause { fill: none; }
.flow-pause .i-play { display: none; }
.flow-pause[aria-pressed="true"] .i-play { display: block; }
.flow-pause[aria-pressed="true"] .i-pause { display: none; }
@media (prefers-reduced-motion: reduce) { .flow-pause { display: none; } }

.fm-edge { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 5; }
.fm-lit { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.fm-lit--sip { stroke: var(--signal); }

.fm-node polygon {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  transition: fill 0.3s ease, stroke 0.3s ease;
}
.fm-node--twilio polygon { stroke: color-mix(in srgb, var(--accent) 70%, var(--line-strong)); }
.fm-node--sip polygon { stroke: color-mix(in srgb, var(--signal) 70%, var(--line-strong)); }
.fm-node--core polygon { stroke-width: 2.5; stroke: var(--accent); }
.fm-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-anchor: middle;
  fill: var(--muted);
  transition: fill 0.3s ease;
}
.fm-cap {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-anchor: middle;
  fill: var(--muted);
  transition: fill 0.3s ease;
}
.fm-node.is-lit .fm-cap { fill: var(--text); }
.fm-node.is-lit .fm-code { fill: var(--text); }
.fm-node--twilio.is-lit polygon,
.fm-node--end.is-lit polygon { fill: color-mix(in srgb, var(--accent) 24%, var(--surface)); stroke: var(--accent); stroke-width: 2.5; }
.fm-node--sip.is-lit polygon { fill: color-mix(in srgb, var(--signal) 22%, var(--surface)); stroke: var(--signal); stroke-width: 2.5; }
.fm-node--end.is-lit polygon { fill: color-mix(in srgb, var(--text) 10%, var(--surface)); stroke: var(--text); }
.hn-head { fill: var(--text); stroke: var(--surface); stroke-width: 2; }

.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0 16px 12px;
  list-style: none;
  color: var(--muted);
  font-size: 0.7rem;
}
.flow-legend li { display: inline-flex; align-items: center; gap: 7px; }
.flow-legend li::before {
  content: "";
  width: 10px; height: 11px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.lg-twilio::before { background: var(--accent); }
.lg-sip::before { background: var(--signal); }
.lg-end::before { background: var(--muted); }

.ladder { grid-template-columns: 1fr; gap: 5px; padding: 12px 16px 14px; }
.ladder li { opacity: 0.3; }
.ladder li .t { flex: none; min-width: 42px; color: var(--muted); }
.ladder li.is-on { opacity: 1; color: var(--text); }
.ladder li.is-empty::before { visibility: hidden; }
@media (max-width: 520px) { .ladder { grid-template-columns: 1fr; font-size: 0.7rem; } }

/* ==========================================================================
   Services (9) · Twilio engagements · wide Twilio patch group
   ========================================================================== */
.engage {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.engage .lead { margin-bottom: 28px; }
.engage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.engage-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px dashed var(--line-strong);
}
.engage-list .mono { color: var(--accent-text); padding-top: 4px; }
.engage-list h3 { font-size: 1.08rem; margin-bottom: 6px; }
.engage-list p { margin: 0; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 900px) { .engage { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .engage-list { grid-template-columns: 1fr; } }

.patch-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.port-group--wide { grid-column: 1 / -1; }
.port-group--wide .port-list { columns: 3 220px; column-gap: 28px; }
.port-group--wide .port-list li { break-inside: avoid; }
@media (max-width: 860px) { .patch-panel { grid-template-columns: 1fr; } }
.fm-cap { paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
@media (max-width: 600px) {
  .fm-cap { font-size: 16px; }
  .fm-code { font-size: 12px; }
  .ladder li { white-space: normal; align-items: flex-start; }
  .ladder li::before { margin-top: 0.45em; }
}
