/* Public site of gotopay.cl (landing, legal pages, 404). The CRM has its own styles. */

/* Poppins, latin subset (SIL OFL 1.1, see fonts/OFL.txt). */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/site/fonts/poppins-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/site/fonts/poppins-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/site/fonts/poppins-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/site/fonts/poppins-700.woff2') format('woff2');
}

/* System font stretched to Poppins' metrics: the swap when Poppins arrives barely moves text (CLS). */
@font-face {
  font-family: 'Poppins Fallback';
  src: local('Arial'), local('Roboto');
  size-adjust: 112.5%;
  ascent-override: 93%;
  descent-override: 31%;
  line-gap-override: 9%;
}

:root {
  --font-main: 'Poppins', 'Poppins Fallback', -apple-system, BlinkMacSystemFont, sans-serif;
  --color-primary: #335cff;
  --color-primary-dark: #1f3fd6;
  /* Brand blue as TEXT: ≥ 5.2:1 on white and on its own tint; on dark the lighter tint keeps 6:1. */
  --color-primary-text: #2b50f0;
  --color-primary-tint: rgba(51, 92, 255, 0.1);
  --color-accent-orange: #f7a300;
  --color-accent-teal: #4db89e;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f6fc;
  --color-card-bg: #ffffff;
  --color-text: #0b1226;
  --color-text-muted: #4a5672;
  --color-border: #dde3f0;
  /* Input outlines are the field's only boundary: ≥ 3:1 against the card (WCAG 1.4.11). */
  --color-input-border: #64748b;
  --color-error: #b91c1c;
  --color-success: #047857;
  --color-header-bg: rgba(255, 255, 255, 0.86);
  --color-focus: #2b50f0;
  /* The primary action: brand orange with navy text (9:1), reserved for it. */
  --color-cta: #f7a300;
  --color-cta-hover: #ffb733;
  --color-cta-text: #0b1226;
  /* Network bands (hero, download, contact card): dark in both themes, like the footer. */
  --net-bg: #060a1c;
  --net-bg-2: #0d1640;
  --net-text: #f5f7ff;
  --net-muted: #aab6d8;
  --net-line: rgba(143, 166, 255, 0.28);
  --net-surface: rgba(255, 255, 255, 0.05);
  --net-border: rgba(255, 255, 255, 0.12);
  --signal-teal: #5fd0b3;
  --signal-orange: #ffb733;
  --signal-blue: #9db2ff;
  --shadow-sm: 0 1px 2px 0 rgba(11, 18, 38, 0.06);
  --shadow-md: 0 6px 16px -4px rgba(11, 18, 38, 0.12), 0 2px 4px -1px rgba(11, 18, 38, 0.06);
  --shadow-lg: 0 18px 40px -12px rgba(31, 63, 214, 0.25), 0 8px 12px -8px rgba(11, 18, 38, 0.12);
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-primary-text: #8fa6ff;
    --color-primary-tint: rgba(143, 166, 255, 0.14);
    --color-bg: #070b1a;
    --color-bg-alt: #0b1124;
    --color-card-bg: #111a33;
    --color-text: #eef2ff;
    --color-text-muted: #a3b0cf;
    --color-border: #233056;
    --color-input-border: #8b95a7;
    --color-error: #fca5a5;
    --color-success: #6ee7b7;
    --color-header-bg: rgba(7, 11, 26, 0.86);
    --color-focus: #8fa6ff;
    --shadow-md: 0 6px 16px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme='dark'] {
  --color-primary-text: #8fa6ff;
  --color-primary-tint: rgba(143, 166, 255, 0.14);
  --color-bg: #070b1a;
  --color-bg-alt: #0b1124;
  --color-card-bg: #111a33;
  --color-text: #eef2ff;
  --color-text-muted: #a3b0cf;
  --color-border: #233056;
  --color-input-border: #8b95a7;
  --color-error: #fca5a5;
  --color-success: #6ee7b7;
  --color-header-bg: rgba(7, 11, 26, 0.86);
  --color-focus: #8fa6ff;
  --shadow-md: 0 6px 16px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* A dark "network" band: its own text colors and focus ring, whatever the theme. */
.net {
  --color-focus: var(--signal-orange);
  background-color: var(--net-bg);
  color: var(--net-text);
}

/* ------------------------------------------------------------------ header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--color-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
}

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 40px;
  flex: none;
}

.logo-container svg {
  height: 100%;
  width: auto;
}

.logo-text {
  fill: var(--color-primary-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.925rem;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--color-primary-text);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-teal), var(--color-primary));
  transition: width 0.2s ease;
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  color: var(--color-text);
  cursor: pointer;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded='true'] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded='true'] .icon-close {
  display: block;
}

/* ----------------------------------------------------------------- buttons */
.cta-btn,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

/* The single primary action of the page: brand orange, reserved for it. */
.cta-btn {
  background-color: var(--color-cta);
  color: var(--color-cta-text);
  border: none;
  box-shadow: 0 8px 24px -6px rgba(247, 163, 0, 0.55);
}

.cta-btn:hover {
  background-color: var(--color-cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -6px rgba(247, 163, 0, 0.65);
}

.cta-btn:disabled,
.cta-btn[aria-disabled='true'],
.btn-secondary[aria-disabled='true'] {
  opacity: 0.6;
  pointer-events: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--color-bg-alt);
  color: var(--color-text);
  font-weight: 600;
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary-text);
  transform: translateY(-2px);
}

.net .btn-secondary {
  background-color: var(--net-surface);
  color: var(--net-text);
  border-color: rgba(255, 255, 255, 0.28);
}

.net .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-ghost {
  background: none;
  border: 1px solid transparent;
  color: var(--color-primary-text);
  font-weight: 600;
  padding: 0.7rem 1rem;
  min-height: 44px;
}

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

/* ------------------------------------------------------------ shared parts */
.pulse-dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-accent-teal);
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--color-accent-teal);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from {
    transform: scale(0.6);
    opacity: 0.9;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}

section {
  padding: 110px 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-primary-text);
  margin-bottom: 0.85rem;
}

/* Signal bars before every section tag. */
.section-tag::before {
  content: '';
  width: 14px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 3px 40% no-repeat,
    linear-gradient(currentColor, currentColor) 5px 100% / 3px 70% no-repeat,
    linear-gradient(currentColor, currentColor) 10px 100% / 3px 100% no-repeat;
}

.net .section-tag {
  color: var(--signal-teal);
}

.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 72px;
  background:
    radial-gradient(ellipse 60% 55% at 78% 30%, rgba(51, 92, 255, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 8% 90%, rgba(77, 184, 158, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, var(--net-bg) 0%, var(--net-bg-2) 100%);
}

/* Dot grid that fades out at the edges: the "coverage map" texture. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(157, 178, 255, 0.22) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--net-border);
  background-color: var(--net-surface);
  color: var(--net-text);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-title span {
  background: linear-gradient(100deg, var(--signal-teal) 0%, var(--signal-blue) 60%, #c7d2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--net-muted);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* The tower illustration. */
.hero-visual {
  position: relative;
}

/* Layers share the 520×440 canvas of the tower; % positions are relative to it. */
.tower-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 520 / 440;
  margin: 0 auto;
}

.tower-stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Only transform and opacity are animated below: the compositor runs them off the main thread. */
.hero-visual .ring {
  position: absolute;
  left: 50%;
  top: 25%;
  width: 57.7%;
  aspect-ratio: 1;
  margin: -28.85% 0 0 -28.85%;
  border-radius: 50%;
  border: 1.5px solid rgba(95, 208, 179, 0.35);
  opacity: 0;
  animation: ring 6s linear infinite;
}

.hero-visual .ring:nth-child(2) {
  animation-delay: 2s;
}

.hero-visual .ring:nth-child(3) {
  animation-delay: 4s;
}

@keyframes ring {
  0% {
    transform: scale(0.2);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.hero-visual .links path {
  stroke: var(--net-line);
  stroke-width: 2;
  stroke-dasharray: 3 9;
  stroke-linecap: round;
}

.hero-visual .tower path,
.hero-visual .tower rect {
  stroke: #c7d2ff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-visual .tower rect {
  fill: var(--net-bg-2);
}

.hero-visual .wave {
  opacity: 0.15;
  animation: wave 2.4s ease-in-out infinite;
}

.hero-visual .wave path {
  stroke: var(--signal-teal);
  stroke-width: 3;
  stroke-linecap: round;
}

.hero-visual .wave-2 {
  animation-delay: 0.3s;
}

.hero-visual .wave-3 {
  animation-delay: 0.6s;
}

@keyframes wave {
  0%,
  100% {
    opacity: 0.15;
  }
  40% {
    opacity: 1;
  }
}

.hero-visual .beacon {
  fill: var(--color-accent-orange);
}

.hero-visual .beacon-glow {
  position: absolute;
  left: 50%;
  top: 21.8%;
  width: 6.2%;
  aspect-ratio: 1;
  margin: -3.1% 0 0 -3.1%;
  border-radius: 50%;
  background-color: rgba(247, 163, 0, 0.3);
  animation: beacon 2.4s ease-in-out infinite;
}

@keyframes beacon {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.hero-visual .node circle {
  fill: rgba(13, 22, 64, 0.9);
  stroke: rgba(157, 178, 255, 0.45);
  stroke-width: 1.5;
}

.hero-visual .node path,
.hero-visual .node rect {
  stroke: var(--net-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  margin-top: 0.75rem;
}

.hero-tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--net-border);
  background-color: var(--net-surface);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--net-text);
}

.tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tag-dot--teal {
  background-color: var(--signal-teal);
}

.tag-dot--orange {
  background-color: var(--signal-orange);
}

.tag-dot--blue {
  background-color: var(--signal-blue);
}

/* Metrics strip: the results of the system, under the hero. */
.metrics {
  margin-top: 4rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--net-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.metrics-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--net-muted);
  margin-bottom: 1.5rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
}

.metric {
  --metric-color: var(--signal-teal);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.25rem 1.25rem 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  background-color: rgba(6, 10, 28, 0.55);
  border: 1px solid var(--net-border);
  overflow: hidden;
}

.metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background-color: var(--metric-color);
  box-shadow: 0 0 14px var(--metric-color);
}

.metric--orange {
  --metric-color: var(--signal-orange);
}

.metric--blue {
  --metric-color: var(--signal-blue);
}

.metric-icon {
  color: var(--metric-color);
  margin-bottom: 0.4rem;
}

.metric-value {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--net-text);
}

.metric-label {
  font-size: 0.875rem;
  color: var(--net-muted);
}

/* ------------------------------------------------------------- app download */
.download {
  background-color: var(--color-bg-alt);
}

.download-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 3.5rem 3.5rem 0;
  border-radius: 2rem;
  border: 1px solid var(--net-border);
  background:
    radial-gradient(ellipse 50% 70% at 78% 60%, rgba(51, 92, 255, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 0% 0%, rgba(77, 184, 158, 0.2) 0%, transparent 70%),
    linear-gradient(135deg, var(--net-bg) 0%, var(--net-bg-2) 100%);
  box-shadow: var(--shadow-lg);
}

/* Signal rings behind the phones. */
.download-panel::before {
  content: '';
  position: absolute;
  right: -12%;
  top: 50%;
  width: 720px;
  height: 720px;
  transform: translateY(-40%);
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    transparent 0 58px,
    rgba(157, 178, 255, 0.12) 58px 60px
  );
  pointer-events: none;
}

.download-copy {
  position: relative;
  padding-bottom: 3.5rem;
}

.download-title {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.download-lead {
  font-size: 1.125rem;
  color: var(--net-muted);
  margin-bottom: 2rem;
}

.cta-btn--xl {
  min-height: 64px;
  padding: 1rem 2.4rem;
  font-size: 1.15rem;
  gap: 0.75rem;
  box-shadow:
    0 0 0 6px rgba(247, 163, 0, 0.16),
    0 14px 34px -8px rgba(247, 163, 0, 0.6);
}

.cta-btn--xl:hover {
  box-shadow:
    0 0 0 9px rgba(247, 163, 0, 0.2),
    0 18px 40px -8px rgba(247, 163, 0, 0.7);
}

/* Web app (primary) and APK (secondary, only while its download is on): side by side while they
   fit, stacked at full width on phones. */
.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.download-actions [hidden] {
  display: none;
}

.btn-secondary--xl {
  min-height: 64px;
  padding: 1rem 1.9rem;
  font-size: 1.05rem;
  gap: 0.65rem;
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 1.5rem;
}

.app-meta[hidden] {
  display: none;
}

.app-meta li {
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--net-border);
  background-color: var(--net-surface);
  font-size: 0.8rem;
  color: var(--net-muted);
}

.app-meta strong {
  color: var(--net-text);
  font-weight: 600;
}

.app-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--net-muted);
}

.app-qr {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 22rem;
}

.app-qr img {
  flex: none;
  width: 96px;
  height: 96px;
  padding: 6px;
  border-radius: 0.75rem;
  background-color: #ffffff;
}

.app-qr p {
  font-size: 0.85rem;
  color: var(--net-muted);
}

.download-devices {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 100%;
  padding-top: 1rem;
}

.phone {
  position: relative;
  padding: 9px;
  border-radius: 2.25rem;
  background: linear-gradient(160deg, #2a3560, #0a0f24);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.7rem;
}

.phone--front {
  width: 240px;
  margin-left: -70px;
  transform: translateY(24px) rotate(3deg);
  z-index: 1;
}

.phone--back {
  width: 210px;
  transform: translateY(70px) rotate(-7deg);
  opacity: 0.85;
}

/* ---------------------------------------------------------------- services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* A "fiber" line along the top edge that lights up on hover. */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-teal), var(--color-primary), var(--color-accent-orange));
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-text);
  background-color: var(--color-primary-tint);
  margin-bottom: 1.5rem;
}

.service-index {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.925rem;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------------- about */
.about {
  background-color: var(--color-bg-alt);
}

/* Three steps joined by a fiber line with a travelling light. */
.signal-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  list-style: none;
}

.signal-path::before,
.signal-path::after {
  content: '';
  position: absolute;
  top: 28px;
  left: 16.6%;
  height: 2px;
}

.signal-path::before {
  right: 16.6%;
  background: linear-gradient(90deg, var(--color-accent-teal), var(--color-primary));
}

/* The light is 10% wide and crosses a line 66.8% wide: 568% of its own width. */
.signal-path::after {
  width: 10%;
  background: linear-gradient(90deg, transparent, var(--color-accent-orange), transparent);
  opacity: 0;
  animation: travel 3.5s linear infinite;
}

@keyframes travel {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  10%,
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(568%);
    opacity: 0;
  }
}

.signal-step {
  position: relative;
  text-align: center;
  padding: 0 0.5rem;
}

.signal-node {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background-color: var(--color-card-bg);
  border: 2px solid var(--color-primary-text);
  color: var(--color-primary-text);
  font-weight: 700;
  box-shadow: 0 0 0 8px var(--color-bg-alt);
}

.signal-step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.signal-step p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  max-width: 22rem;
  margin: 0 auto;
}

/* ----------------------------------------------------------------- contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 2.5rem;
  align-items: stretch;
}

.contact-info-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--net-border);
  padding: 2.5rem;
  background:
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(51, 92, 255, 0.35) 0%, transparent 70%),
    linear-gradient(160deg, var(--net-bg) 0%, var(--net-bg-2) 100%);
}

/* Signal rings from the bottom corner fill the space under the details. */
.contact-info-box::after {
  content: '';
  position: absolute;
  right: -180px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--signal-teal) 0 7px, rgba(95, 208, 179, 0.25) 8px 16px, transparent 17px),
    repeating-radial-gradient(circle, transparent 0 40px, rgba(157, 178, 255, 0.18) 40px 42px);
  -webkit-mask-image: radial-gradient(circle, #000 0 70%, transparent 71%);
  mask-image: radial-gradient(circle, #000 0 70%, transparent 71%);
  pointer-events: none;
}

.contact-info-box > * {
  position: relative;
  z-index: 1;
}

.contact-info-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--signal-teal);
  background-color: var(--net-surface);
  border: 1px solid var(--net-border);
}

.contact-text h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--net-muted);
}

.contact-text p,
.contact-text a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--net-text);
  word-break: break-word;
}

.contact-text .placeholder {
  color: var(--net-text);
}

.contact-form {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-input-border);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 1rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

textarea.form-control {
  min-height: 120px;
  padding: 0.85rem 1rem;
  resize: vertical;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(51, 92, 255, 0.25);
}

.form-control[aria-invalid='true'] {
  border-color: var(--color-error);
}

.field-error {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-error);
}

.field-error[hidden] {
  display: none;
}

.field-error::before {
  content: '⚠';
  font-size: 0.9em;
}

/* Two classes: it must beat `.form-group label` (block, bold). */
.form-group .checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.checkbox-row input {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  accent-color: var(--color-primary);
}

.checkbox-row a {
  color: var(--color-primary-text);
}

/* Honeypot: off screen rather than display:none, which some bots detect. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.925rem;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
}

.form-status[hidden] {
  display: none;
}

.form-status.is-success {
  color: var(--color-success);
}

.form-status.is-error {
  color: var(--color-error);
}

.submit-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 0.85rem;
}

/* ------------------------------------------------------------------ footer */
footer {
  background-color: var(--net-bg);
  color: var(--net-muted);
  padding: 64px 0 30px 0;
  border-top: 1px solid #1a2446;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 40px;
}

.footer-brand {
  display: inline-block;
  height: 38px;
  margin-bottom: 1.25rem;
}

.footer-brand svg {
  height: 100%;
}

.footer-brand .logo-text {
  fill: #ffffff;
}

.footer-grid p {
  font-size: 0.9rem;
  max-width: 22rem;
}

.footer-col h2 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.25rem;
}

.footer-col ul li a,
.footer-col ul li button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--net-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: var(--font-main);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover,
.footer-col ul li button:hover {
  color: #ffffff;
}

footer :focus-visible {
  outline-color: var(--signal-orange);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #1a2446;
  font-size: 0.875rem;
}

.footer-bottom a {
  color: #cbd5e1;
}

/* ------------------------------------------------------------ cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-card-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cookie-banner a {
  color: var(--color-primary-text);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-banner__actions .btn-secondary {
  flex: 1 1 10rem;
}

/* ------------------------------------------------------------- legal pages */
.legal {
  padding-top: 140px;
  padding-bottom: 80px;
}

.legal article {
  max-width: 820px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 2.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.legal .updated {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}

.legal h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

.legal p,
.legal li {
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.legal ul,
.legal ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal a {
  color: var(--color-primary-text);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

.legal th,
.legal td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  color: var(--color-text-muted);
}

.legal th {
  color: var(--color-text);
  font-weight: 600;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.placeholder {
  background: rgba(247, 163, 0, 0.18);
  border-radius: 0.3rem;
  padding: 0 0.3rem;
  color: var(--color-text);
}

/* -------------------------------------------------------------- error page */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 1.5rem 80px;
}

.error-page .code {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(100deg, var(--color-accent-teal), var(--color-primary-text));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--color-text-muted);
  max-width: 460px;
  margin: 0 auto 2rem;
}

.error-page nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .nav-links {
    gap: 1.25rem;
  }

  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .tower-stage {
    max-width: 400px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-panel {
    grid-template-columns: 1fr;
    padding: 3rem 2.5rem 0;
    text-align: center;
  }

  .download-copy {
    padding-bottom: 0;
  }

  .app-meta,
  .app-qr,
  .download-actions {
    justify-content: center;
  }

  /* The QR is for desktops: on a phone or tablet the button itself downloads. */
  .app-qr {
    display: none;
  }

  .download-devices {
    height: 360px;
    overflow: hidden;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    min-height: 48px;
    font-size: 1rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-actions .btn-ghost {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  section {
    padding: 80px 0;
  }

  .hero {
    padding: 120px 0 56px;
  }

  /* On phones the tower would push the download button and the metrics out of view. */
  .hero-visual {
    display: none;
  }

  .metrics {
    margin-top: 2.5rem;
    padding: 1.25rem;
  }

  .signal-path {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .signal-path::before {
    top: 0;
    bottom: 0;
    left: 27px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--color-accent-teal), var(--color-primary));
  }

  .signal-path::after {
    display: none;
  }

  .signal-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 1.25rem;
    text-align: left;
    padding: 0;
  }

  .signal-node {
    grid-row: span 2;
    margin: 0;
  }

  .signal-step p {
    margin: 0;
  }

  .service-card,
  .contact-form,
  .contact-info-box {
    padding: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  /* Logo, header CTA (inner pages) and menu button share 360 px. */
  .logo-container {
    height: 34px;
  }

  .nav-cta {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
  }

  .signal-chip {
    font-size: 0.78rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .metric {
    padding: 1rem 0.9rem 1rem 1.1rem;
  }

  .metric-label {
    font-size: 0.8rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .download-panel {
    padding: 2.25rem 1.25rem 0;
    border-radius: 1.5rem;
  }

  .download-devices {
    height: 300px;
  }

  .phone--front {
    width: 170px;
    margin-left: -50px;
  }

  .phone--back {
    width: 150px;
  }

  .hero-actions .cta-btn,
  .hero-actions .btn-secondary,
  .cta-btn--xl,
  .btn-secondary--xl {
    width: 100%;
  }

  .legal h1 {
    font-size: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .hero-visual .ring {
    opacity: 0;
  }

  .hero-visual .wave {
    opacity: 0.8;
  }
}
