/* ==========================================================================
   InsuranceMatrix — coveragematrix.org
   Design tokens + shared components
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Canvas / surfaces */
  --canvas: #080D16;
  --hero: #122033;
  --card: #173044;
  --header: #02070D;

  /* Accents */
  --cta: #0F9D8A;
  --cta-hover: #12b39d;
  --bronze: #B98252;
  --ice: #67D9E8;
  --lime: #A3D977;
  --amber: #D6A84F;

  /* Text */
  --text-primary: #F1F5F9;
  --text-secondary: #9AAABD;

  /* Borders */
  --border: #2A4053;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.font-mono-data {
  font-family: var(--font-mono);
}

::selection {
  background: var(--cta);
  color: var(--header);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--header);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cta);
}

/* ==========================================================================
      Signature: Coverage Matrix grid motif
      ========================================================================== */

.matrix-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(103, 217, 232, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(103, 217, 232, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

.matrix-node {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ice);
  opacity: 0;
  animation: node-pulse 4s ease-in-out infinite;
}

@keyframes node-pulse {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.3);
  }
}

/* Logo icon: layered shield built from grid cells */
.logo-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
      Layout helpers
      ========================================================================== */

.container-x {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 768px) {
  .container-x {
    padding-inline: 2.5rem;
  }
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}

/* ==========================================================================
      Header / Nav
      ========================================================================== */

.site-header {
  background: var(--header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--cta);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

#mobile-menu.open {
  max-height: 480px;
}

.hamburger-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open .line-1 {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.open .line-2 {
  opacity: 0;
}

.hamburger.open .line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
      Buttons
      ========================================================================== */

.btn-primary {
  background: var(--cta);
  color: var(--header);
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 0 0 rgba(15, 157, 138, 0);
}

.btn-primary:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(15, 157, 138, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--ice);
  background: rgba(103, 217, 232, 0.06);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ==========================================================================
      Cards
      ========================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--ice);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.6);
}

.card-small {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Badges / tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.tag-status {
  color: var(--lime);
  border-color: rgba(163, 217, 119, 0.35);
  background: rgba(163, 217, 119, 0.08);
}

.tag-alert {
  color: var(--amber);
  border-color: rgba(214, 168, 79, 0.35);
  background: rgba(214, 168, 79, 0.08);
}

.tag-info {
  color: var(--ice);
  border-color: rgba(103, 217, 232, 0.35);
  background: rgba(103, 217, 232, 0.08);
}

.tag-accent {
  color: var(--bronze);
  border-color: rgba(185, 130, 82, 0.35);
  background: rgba(185, 130, 82, 0.08);
}

/* ==========================================================================
      Scroll reveal
      ========================================================================== */

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.in-view .stagger-item {
  opacity: 1;
  transform: translateY(0);
}

.stagger-item {
  opacity: 1;
  transform: none;
}

.stagger-item:nth-child(1) {
  transition-delay: 0.05s;
}

.stagger-item:nth-child(2) {
  transition-delay: 0.15s;
}

.stagger-item:nth-child(3) {
  transition-delay: 0.25s;
}

.stagger-item:nth-child(4) {
  transition-delay: 0.35s;
}

.stagger-item:nth-child(5) {
  transition-delay: 0.45s;
}

.stagger-item:nth-child(6) {
  transition-delay: 0.55s;
}

/* ==========================================================================
      Hero entrance
      ========================================================================== */

.hero-fade-up {
  opacity: 1;
  transform: none;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-delay-1 {
  animation-delay: 0.1s;
}

.hero-delay-2 {
  animation-delay: 0.25s;
}

.hero-delay-3 {
  animation-delay: 0.4s;
}

.hero-delay-4 {
  animation-delay: 0.55s;
}

/* Ambient float for hero art */
.float-slow {
  animation: float-y 7s ease-in-out infinite;
}

@keyframes float-y {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ==========================================================================
      3D coverage stack (home hero signature element)
      Three policy-layer panels arranged in 3D space, rotating slowly around
      a shared vertical axis. Pure CSS — no JS required.
      ========================================================================== */

.hero-3d-stage {
  perspective: 1500px;
}

.hero-3d-scene {
  position: relative;
  width: 300px;
  height: 340px;
  transform-style: preserve-3d;
  animation: scene-rotate 16s linear infinite;
}

.hero-3d-scene:hover {
  animation-play-state: paused;
}

@keyframes scene-rotate {
  from {
    transform: rotateX(-10deg) rotateY(0deg);
  }

  to {
    transform: rotateX(-10deg) rotateY(360deg);
  }
}

.hero-3d-layer {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(23, 48, 68, 0.75), rgba(18, 32, 51, 0.55));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem;
  box-shadow: 0 25px 70px -25px rgba(0, 0, 0, 0.7);
  backface-visibility: hidden;
}

.hero-3d-layer .layer-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
}

.hero-3d-layer .layer-glow {
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  opacity: 0.35;
  pointer-events: none;
  box-shadow: 0 0 40px 0 currentColor inset;
}

.layer-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.layer-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.layer-stat-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.layer-stat-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
}

.layer-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 34px;
}

.layer-bars span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: currentColor;
  opacity: 0.5;
}

.layer-divider {
  height: 1px;
  background: currentColor;
  opacity: 0.16;
}

.layer-1 {
  transform: translateZ(78px);
  color: var(--ice);
}

.layer-2 {
  transform: rotateY(120deg) translateZ(78px);
  color: var(--lime);
}

.layer-3 {
  transform: rotateY(240deg) translateZ(78px);
  color: var(--amber);
}

.hero-3d-orbit {
  position: absolute;
  inset: -60px;
  border: 1px dashed rgba(103, 217, 232, 0.18);
  border-radius: 50%;
  transform: rotateX(78deg);
  animation: orbit-spin 24s linear infinite;
}

.hero-3d-orbit-outer {
  position: absolute;
  inset: -130px;
  border: 1px dashed rgba(185, 130, 82, 0.14);
  border-radius: 50%;
  transform: rotateX(78deg) rotateZ(35deg);
  animation: orbit-spin 34s linear infinite reverse;
}

.hero-3d-floor {
  position: absolute;
  left: 50%;
  bottom: -50px;
  transform: translateX(-50%);
  width: 480px;
  height: 160px;
  background: radial-gradient(ellipse at center, rgba(15, 157, 138, 0.28) 0%, rgba(15, 157, 138, 0.08) 45%, transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}

.hero-3d-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 12px 4px rgba(103, 217, 232, 0.6), 0 0 40px 14px rgba(103, 217, 232, 0.25);
  animation: core-pulse 3s ease-in-out infinite;
}

@keyframes core-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

.hero-3d-satellite {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2, 7, 13, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  animation: float-y 6s ease-in-out infinite;
}

.hero-3d-satellite .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.satellite-1 {
  top: -8%;
  left: -18%;
  animation-delay: 0s;
}

.satellite-2 {
  bottom: 6%;
  right: -22%;
  animation-delay: 1.4s;
}

.satellite-3 {
  top: 42%;
  right: -30%;
  animation-delay: 2.6s;
}

.satellite-4 {
  bottom: -10%;
  left: -8%;
  animation-delay: 3.6s;
}

@keyframes orbit-spin {
  from {
    transform: rotateX(78deg) rotateZ(0deg);
  }

  to {
    transform: rotateX(78deg) rotateZ(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  .hero-3d-scene,
  .hero-3d-orbit,
  .hero-3d-orbit-outer {
    animation: none;
    transform: rotateX(-10deg) rotateY(24deg);
  }

  .hero-3d-satellite,
  .hero-3d-core {
    animation: none;
  }
}

/* ==========================================================================
      Forms
      ========================================================================== */

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: var(--hero);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: #5E7185;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: var(--cta);
  box-shadow: 0 0 0 3px rgba(15, 157, 138, 0.18);
  outline: none;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cta);
  border: 3px solid var(--header);
  cursor: pointer;
  transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cta);
  border: 3px solid var(--header);
  cursor: pointer;
}

/* ==========================================================================
      Calculator result animation
      ========================================================================== */

.result-flash {
  animation: flash-update 0.5s ease;
}

@keyframes flash-update {
  0% {
    background-color: rgba(15, 157, 138, 0.22);
  }

  100% {
    background-color: transparent;
  }
}

/* ==========================================================================
      Timeline (Claim Pathways)
      ========================================================================== */

.timeline-line {
  background: linear-gradient(to bottom, var(--cta), var(--border) 90%);
}

.timeline-dot {
  box-shadow: 0 0 0 4px var(--canvas), 0 0 0 5px var(--border);
}

/* ==========================================================================
      Misc
      ========================================================================== */

.divider-hair {
  height: 1px;
  background: var(--border);
}

.backdrop-radial {
  background: radial-gradient(circle at 50% 0%, rgba(15, 157, 138, 0.12), transparent 60%);
}

.text-balance {
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cta);
  color: var(--header);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}


/* Hide Scrollbar */
html,
body {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-top: 22px;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}