/* =========================================================
   HyProto — Global stylesheet
   Precision-industrial aesthetic: deep navy + signal orange,
   technical mono for specs, generous type scale.
   ========================================================= */

:root {
  --hy-ink:        #0B1A2B;
  --hy-carbon:     #111B28;
  --hy-steel:      #1F2D3F;
  --hy-mist:       #E6ECF2;
  --hy-bone:       #F5F1EA;
  --hy-blue:       #1D4E8C;
  --hy-blue-light: #3B82C4;
  --hy-orange:     #F26522;
  --hy-orange-deep:#C94E12;
  --hy-amber:      #F59E0B;
  --hy-line:       #D7DEE6;
  --hy-muted:      #6B7887;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Alpine cloak */
[x-cloak] { display: none !important; }

/* Selection */
::selection { background: var(--hy-orange); color: #fff; }

/* =========================================================
   Typography rhythm for content pages
   ========================================================= */
.prose-hy {
  font-size: 17px;
  line-height: 1.7;
  color: #243040;
}
.prose-hy h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--hy-ink);
  margin: 3rem 0 1rem;
  line-height: 1.15;
}
.prose-hy h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--hy-ink);
  margin: 2rem 0 .75rem;
}
.prose-hy h4 {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--hy-ink);
  margin: 1.5rem 0 .5rem;
}
.prose-hy p { margin: 0 0 1.25rem; }
.prose-hy strong { color: var(--hy-ink); font-weight: 600; }
.prose-hy a { color: var(--hy-blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose-hy a:hover { color: var(--hy-orange); }

.prose-hy ul, .prose-hy ol {
  margin: 0 0 1.5rem;
  padding-left: 0;
  list-style: none;
}
.prose-hy ul li, .prose-hy ol li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: .6rem;
}
.prose-hy ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .7em;
  width: 10px;
  height: 2px;
  background: var(--hy-orange);
}
.prose-hy ol { counter-reset: hyol; }
.prose-hy ol li { counter-increment: hyol; }
.prose-hy ol li::before {
  content: counter(hyol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .8em;
  color: var(--hy-orange);
  font-weight: 600;
}

/* Tables inside prose */
.prose-hy table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.5rem 0;
  border: 1px solid var(--hy-line);
  border-radius: 8px;
  overflow: hidden;
}
.prose-hy thead {
  background: var(--hy-ink);
  color: #fff;
}
.prose-hy th, .prose-hy td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hy-line);
}
.prose-hy th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.prose-hy tbody tr:hover { background: var(--hy-mist); }
.prose-hy tbody tr:last-child td { border-bottom: none; }

.prose-hy blockquote {
  border-left: 3px solid var(--hy-orange);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--hy-steel);
  background: linear-gradient(to right, rgba(242,101,34,.04), transparent);
}

.prose-hy code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--hy-mist);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--hy-ink);
}

/* =========================================================
   Utility components
   ========================================================= */

/* Technical eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hy-orange);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--hy-orange);
}

/* Spec pill / tag */
.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--hy-line);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--hy-muted);
  background: #fff;
}
.spec-pill--dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.8); }

/* Grid background pattern */
.grid-bg {
  background-image:
    linear-gradient(var(--hy-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hy-line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}
.grid-bg-dark {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Dotted pattern */
.dots-bg {
  background-image: radial-gradient(var(--hy-line) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Cards */
.hy-card {
  background: #fff;
  border: 1px solid var(--hy-line);
  border-radius: 12px;
  transition: all .25s ease;
}
.hy-card:hover {
  border-color: var(--hy-orange);
  box-shadow: 0 2px 4px rgba(11,26,43,.06), 0 20px 40px -12px rgba(11,26,43,.15);
  transform: translateY(-2px);
}

/* Section separators with index number */
.section-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--hy-muted);
  font-weight: 500;
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--hy-orange);
  color: #fff;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 6px;
  transition: all .2s ease;
  box-shadow: 0 4px 14px -4px rgba(242,101,34,.45);
}
.btn-primary:hover {
  background: var(--hy-orange-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(242,101,34,.55);
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--hy-ink);
  font-weight: 600;
  padding: 12px 25px;
  border-radius: 6px;
  border: 1.5px solid var(--hy-ink);
  transition: all .2s ease;
}
.btn-secondary:hover {
  background: var(--hy-ink);
  color: #fff;
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--hy-orange);
  font-weight: 600;
  border-bottom: 1.5px solid var(--hy-orange);
  padding-bottom: 2px;
  transition: all .2s ease;
}
.btn-ghost:hover { color: var(--hy-ink); border-color: var(--hy-ink); }

/* Ticker-style stat block */
.stat-block {
  padding: 1.5rem 0;
  border-top: 1px solid var(--hy-line);
}
.stat-block .stat-value {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--hy-ink);
}
.stat-block .stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hy-muted);
  margin-top: .5rem;
}

/* Section headers */
.section-heading {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--hy-ink);
}

/* Hero display heading */
.hero-heading {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: .98;
}

/* Marquee ticker */
.marquee {
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Reveal on scroll (pure CSS via IntersectionObserver if added, else default visible) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed; right: 24px; bottom: 24px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
  z-index: 40;
  transition: transform .2s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); background: #1DA851; }
.whatsapp-fab i { font-size: 28px; color: #fff; }

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--hy-orange);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Print: hide navigation for cleaner printouts */
@media print {
  header, footer, .whatsapp-fab { display: none; }
  body { color: #000; }
}

/* Responsive type tweaks */
@media (max-width: 640px) {
  .prose-hy { font-size: 16px; }
}
