/* ==========================================================================
   Edgeli, Inc. — edgeli.io
   Transitional corporate site. Product lives at capacitimap.com.

   Colour and type are taken directly from capacitimap.com (apps/web in
   ai-capacitimap) so a visitor moving between the two sites sees one brand:
   a white page with deep-navy bands, #0064b3 as the single accent, and
   Overpass throughout. Hex values below are the literal values used on the
   CapacitiMap landing page — keep them in sync if that page changes.
   ========================================================================== */

:root {
  /* Ink — CapacitiMap's text ramp */
  --ink:       #0b2138;  /* headings, strong text */
  --body-fg:   #4a6070;  /* body copy */
  --muted:     #7089a0;
  --faint:     #8199ac;  /* small uppercase labels */
  --fainter:   #94a7b8;

  /* Brand blue */
  --blue:      #0064b3;
  --blue-hov:  #0071c9;
  --blue-deep: #003c69;
  --blue-lit:  #7cc4ff;  /* accent on dark ground */
  --blue-pale: #9fd0f5;

  /* Deep navy band */
  --navy:      #001d33;
  --navy-hi:   #004a80;  /* radial gradient stops */
  --navy-mid:  #00243f;
  --navy-lo:   #001523;

  /* Hairlines and tints */
  --line:      #dce7f1;
  --line-soft: #e7eef5;
  --line-faint:#eef3f8;
  --tint:      #f3f7fb;
  --tint-soft: #f7fafd;

  /* Type — Overpass carries the whole page, as on capacitimap.com */
  --body: "Overpass", "Helvetica Neue", Arial, sans-serif;

  /* Measure */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --max:    72rem;
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

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

/* --------------------------------------------------------------------------
   Utility type
   -------------------------------------------------------------------------- */

/* CapacitiMap's eyebrow: Overpass semibold, uppercase, 0.14em tracking,
   brand blue on light and #7cc4ff on the navy band. */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}

/* The eyebrow is a <p>, so the paragraph rules in .prose and .stub would
   otherwise outrank .eyebrow on specificity and grey it out. */
.prose .eyebrow,
.stub .eyebrow { color: var(--blue); }

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

/* --------------------------------------------------------------------------
   Header — light by default (privacy, 404, stubs); inverted inside the
   navy hero band on the home page.
   -------------------------------------------------------------------------- */

.masthead {
  padding-block: 1.5rem;
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.masthead img {
  display: block;
  height: 32px;
  width: auto;
  transition: opacity 0.2s ease;
}

.masthead a:hover img { opacity: 0.8; }

.masthead nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.masthead nav a {
  color: var(--body-fg);
  text-decoration: none;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.masthead nav a:hover { color: var(--blue); }

/* Inverted, as on the CapacitiMap hero nav */
.hero .masthead img { filter: brightness(0) invert(1); opacity: 0.95; }
.hero .masthead a:hover img { opacity: 1; }
.hero .masthead nav a { color: rgba(255, 255, 255, 0.85); }
.hero .masthead nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

/* --------------------------------------------------------------------------
   Hero — the navy band, with CapacitiMap's radial gradient
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 120% at 80% -10%,
    var(--navy-hi) 0%, var(--navy-mid) 48%, var(--navy-lo) 100%);
}

/* The masthead sits inside the band, so the hero's own content carries the
   top padding (matching CapacitiMap's nav-inside-hero layout). */
.hero > .wrap { padding-top: clamp(2rem, 5vw, 3.5rem); }

.hero .eyebrow { color: var(--blue-lit); }

.hero h1 {
  font-weight: 700;
  font-size: clamp(2.25rem, 5.4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 1.25rem 0 0;
  max-width: 18ch;
}

.hero h1 .lit { color: var(--blue-lit); }

.hero .lede {
  margin: 1.5rem 0 0;
  max-width: 56ch;
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.75);
}

.hero .lede strong {
  color: #fff;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Signature: the one-line diagram.

   An electrical single-line diagram is the native way this industry draws
   "power flows from here to there." Here it carries the actual message —
   the company energizes the product; nothing was disconnected.

   Framed like CapacitiMap's hero panel: a translucent white card on the
   navy ground, 1rem radius, hairline border.
   -------------------------------------------------------------------------- */

.oneline {
  margin: clamp(2.75rem, 6vw, 4rem) 0 0;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.75rem);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
}

.oneline-track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.5rem);
}

.node {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.node-name {
  font-weight: 700;
  font-size: clamp(1rem, 2.6vw, 1.375rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  white-space: nowrap;
  color: #fff;
}

.node-role {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.node-b .node-name { color: var(--blue-lit); }

.node-b a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.node-b a:hover { border-bottom-color: var(--blue-lit); }

/* The conductor */
.conductor {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  overflow: visible;
}

/* Energized fill, drawn left to right on load */
.conductor::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--blue), var(--blue-lit));
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: energize 1.15s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
}

/* Terminals at each end of the conductor */
.conductor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--blue-lit);
  box-shadow: 0 0 0 4px rgba(124, 196, 255, 0.16);
}

/* Delivery node — lights up as the pulse arrives */
.term-b {
  position: absolute;
  top: 50%;
  right: 0;
  width: 9px; height: 9px;
  margin-top: -4.5px;
  margin-right: -4.5px;
  border-radius: 50%;
  background: var(--blue-lit);
  box-shadow: 0 0 0 5px rgba(124, 196, 255, 0.14), 0 0 12px 2px rgba(124, 196, 255, 0.5);
  opacity: 0;
  animation: arrive 0.4s ease 1.35s forwards;
}

@keyframes arrive {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

/* Travelling pulse — one pass, then it rests */
.pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px; height: 9px;
  margin-top: -4.5px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: #cfe9ff;
  box-shadow: 0 0 14px 3px rgba(124, 196, 255, 0.85);
  opacity: 0;
  animation: travel 1.15s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
}

@keyframes energize {
  to { transform: scaleX(1); }
}

@keyframes travel {
  0%   { left: 0;    opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Caption under the diagram */
.oneline-note {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Buttons — CapacitiMap's pill sizing and colours
   -------------------------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 2.25rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 100, 179, 0.3);
}

.btn-primary:hover { background: var(--blue-hov); }

/* Ghost, on light ground */
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Ghost, on the navy band */
.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.hero .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

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

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

/* The capabilities band, tinted like CapacitiMap's alternating sections */
.section-tint {
  background: var(--tint);
  border-block: 1px solid var(--line-soft);
}

.section h2 {
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 1rem 0 0;
  max-width: 22ch;
}

.section-intro {
  margin: 1.5rem 0 0;
  max-width: 60ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: var(--body-fg);
}

/* Capability grid — hairline gaps, white cells, and the short blue rule
   above each title that CapacitiMap uses on its feature cards. */
.caps {
  list-style: none;
  margin: clamp(2.25rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
}

.caps li {
  background: #fff;
  padding: 1.75rem 1.5rem;
}

.caps h3 {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

/* Icon plate above each card title, in place of the old accent bar. */
.cap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--tint);
  border: 1px solid var(--line-soft);
  color: var(--blue);
  margin-bottom: 1.25rem;
}

.cap-icon svg {
  width: 1.375rem;
  height: 1.375rem;
  display: block;
}

.caps p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--body-fg);
}

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

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
}

.contact-block h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1rem;
}

.contact-block p {
  margin: 0 0 0.45rem;
  color: var(--body-fg);
}

.contact-block a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-block a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* --------------------------------------------------------------------------
   Prose (privacy policy)
   -------------------------------------------------------------------------- */

.prose {
  max-width: 46rem;
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3.5rem, 8vw, 6rem);
}

.prose h1 {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 1rem 0 0;
}

.prose .updated {
  font-size: 0.875rem;
  color: var(--fainter);
  margin-top: 0.9rem;
}

.prose h2 {
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 3rem 0 0.9rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.prose p, .prose li {
  color: var(--body-fg);
}

.prose p { margin: 0 0 1rem; }

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

.prose li { margin-bottom: 0.4rem; }

.prose li::marker { color: var(--blue); }

.prose a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.prose a:hover { border-bottom-color: var(--blue); }

.prose strong { color: var(--ink); font-weight: 700; }

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

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: #fff;
  padding-block: 2rem 2.5rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--body-fg);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover { color: var(--blue); }

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
}

/* --------------------------------------------------------------------------
   Redirect stub pages and 404
   -------------------------------------------------------------------------- */

.stub {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.75rem;
  padding-block: 4rem;
}

.stub h1 {
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.025em;
  margin: 0;
}

.stub p { color: var(--body-fg); margin: 0; max-width: 40ch; }

.stub a { color: var(--blue); }

/* --------------------------------------------------------------------------
   Narrow screens: the one-line diagram rotates to vertical, which is also
   how a real one-line is drawn on a portrait sheet.
   -------------------------------------------------------------------------- */

@media (max-width: 34rem) {
  .oneline-track {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.85rem;
  }

  .conductor {
    width: 2px;
    height: 40px;
    margin-left: 5px;
  }

  .conductor::before {
    transform-origin: top center;
    transform: scaleY(0);
    animation-name: energize-v;
  }

  .conductor::after {
    top: 0;
    left: 50%;
  }

  .pulse { animation-name: travel-v; }

  @keyframes energize-v {
    to { transform: scaleY(1); }
  }

  @keyframes travel-v {
    0%   { top: 0;    opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }

  .pulse { left: 50%; margin-left: -4.5px; }

  .term-b {
    top: auto;
    bottom: 0;
    right: auto;
    left: 50%;
    margin: 0 0 -4.5px -4.5px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: the diagram arrives already energized.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }

  .conductor::before { transform: none; }
  .pulse { display: none; }
  .term-b { opacity: 1; transform: none; }
}
