/* Homepage presentation layer.
   The homepage is intentionally map-first; shared entity and account styles
   remain in style.css while this file owns only the public landing surface. */

.home-page {
  overflow: hidden;
}

.home-page .hero-section {
  min-height: auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 2.25rem;
  text-align: left;
  background:
    radial-gradient(circle at 75% 12%, rgba(56, 189, 248, 0.14), transparent 28rem),
    radial-gradient(circle at 15% 30%, rgba(253, 119, 99, 0.1), transparent 26rem);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.home-page .hero-content {
  max-width: 680px;
  margin: 0;
}

.home-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.35rem;
  padding: 0.5rem 0.85rem;
  color: var(--color-water-light);
  background: rgba(56, 189, 248, 0.09);
  border-color: rgba(125, 211, 252, 0.24);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.home-page .hero-heading {
  max-width: 760px;
  margin: 0 0 1.25rem;
  font-size: clamp(3rem, 5.3vw, 5rem);
  font-weight: 780;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.home-page .hero-heading span {
  color: var(--color-water-light);
}

.home-page .hero-subtitle {
  max-width: 640px;
  margin: 0 0 1.75rem;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
}

.home-page .hero-search {
  max-width: none;
  margin: 0 0 0.8rem;
}

.home-page .hero-search .form-control {
  min-height: 60px;
  padding: 1rem 3.5rem 1rem 1.15rem;
  border: 1px solid rgba(184, 220, 243, 0.24);
  border-radius: 14px;
  background: rgba(5, 17, 29, 0.82);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
}

.home-page .hero-search .form-control:focus {
  border-color: var(--color-water);
  background: rgba(8, 27, 43, 0.96);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15), var(--shadow-sm);
}

.home-page .hero-search-icon {
  right: 1.2rem;
  color: var(--color-water-light);
}

.home-page .hero-search-results {
  background: rgba(7, 22, 35, 0.98);
  border-color: rgba(184, 220, 243, 0.2);
  box-shadow: var(--shadow-lg);
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
}

.hero-quick-links::before {
  content: 'Browse:';
  color: var(--color-text-dim);
}

.hero-quick-links a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.28);
  text-underline-offset: 0.25rem;
}

.hero-quick-links a:hover {
  color: var(--color-water-light);
  text-decoration-color: currentColor;
}

.home-page .hero-actions {
  justify-content: flex-start;
  margin: 0 0 1rem;
  gap: 0.75rem;
}

.home-page .hero-actions .btn-lg {
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border-radius: 11px;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.hero-account-note {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0;
  color: var(--color-text-dim);
  font-size: 0.8rem;
}

.hero-account-note a {
  color: var(--color-text);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(253, 119, 99, 0.45);
  text-underline-offset: 0.2rem;
}

.hero-map-preview {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(184, 220, 243, 0.17);
  border-radius: 24px;
  background:
    linear-gradient(rgba(125, 211, 252, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 72% 20%, rgba(56, 189, 248, 0.16), transparent 34%),
    linear-gradient(145deg, #0b2335, #07131f 70%);
  background-size: 42px 42px, 42px 42px, auto, auto;
  box-shadow: var(--shadow-lg);
}

.hero-map-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 10, 18, 0.82));
}

.map-preview-topline {
  position: absolute;
  inset: 1.15rem 1.2rem auto;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.map-preview-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.map-preview-live > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.11);
}

.map-preview-rivers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.river-line {
  fill: none;
  stroke-linecap: round;
}

.river-line-faint {
  stroke: rgba(125, 211, 252, 0.18);
  stroke-width: 2;
}

.river-line-main {
  stroke: #4cc9f0;
  stroke-width: 7;
  filter: url('#river-glow');
}

.river-line-branch {
  stroke: rgba(76, 201, 240, 0.74);
  stroke-width: 4;
}

.map-point {
  stroke: #06111d;
  stroke-width: 5;
}

.map-point.gauge { fill: #3b82f6; }
.map-point.access { fill: #4ade80; }
.map-point.tide { fill: #22d3ee; }
.map-point.run { fill: #fb923c; }

.map-preview-card {
  position: absolute;
  right: 1.25rem;
  bottom: 3.2rem;
  left: 1.25rem;
  z-index: 2;
  padding: 1.15rem;
  border: 1px solid rgba(184, 220, 243, 0.17);
  border-radius: 16px;
  background: rgba(6, 19, 31, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.map-preview-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-water-light);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-preview-card strong {
  display: block;
  max-width: 430px;
  font-size: 1rem;
  line-height: 1.4;
}

.map-preview-layers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  margin-top: 0.9rem;
  color: var(--color-text-muted);
  font-size: 0.7rem;
}

.map-preview-layers span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

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

.layer-dot.river { background: var(--color-water); }
.layer-dot.gauge { background: #3b82f6; }
.layer-dot.access { background: #4ade80; }
.layer-dot.whitewater { background: #fb923c; }

.map-preview-source {
  position: absolute;
  right: 1.4rem;
  bottom: 1.1rem;
  z-index: 2;
  color: var(--color-text-dim);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
}

.home-page .hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: rgba(8, 24, 39, 0.74);
}

.home-page .stat-item {
  padding: 1rem 1.25rem;
  text-align: left;
}

.home-page .stat-item + .stat-item {
  border-left: 1px solid var(--color-border);
}

.home-page .stat-number {
  color: var(--color-text);
  font-size: 1.2rem;
}

.home-page .stat-label {
  margin-top: 0.35rem;
  color: var(--color-text-dim);
  font-size: 0.62rem;
}

.home-page .value-strip,
.home-page .how-it-works-section,
.home-page .use-cases-section,
.home-page .cta-section {
  background: transparent;
}

.home-page .value-strip {
  padding-block: clamp(2.25rem, 5vw, 4rem) !important;
}

.home-page .value-pill,
.home-page .use-case-card {
  border-color: rgba(184, 220, 243, 0.13);
  background: rgba(13, 32, 49, 0.72);
  box-shadow: var(--shadow-sm);
}

.home-page .value-icon,
.home-page .feature-icon {
  color: var(--color-water-light);
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(125, 211, 252, 0.15);
}

.home-page .trusted-sources {
  background: rgba(4, 15, 25, 0.52);
}

.home-page .trust-chip {
  border-color: rgba(184, 220, 243, 0.14);
  background: rgba(13, 32, 49, 0.66);
}

.home-page .cta-card {
  background:
    radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(253, 119, 99, 0.1), rgba(13, 32, 49, 0.9));
  border-color: rgba(184, 220, 243, 0.16);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 991.98px) {
  .home-page .hero-section {
    padding-top: 3.5rem;
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .home-page .hero-content {
    max-width: 760px;
  }

  .hero-map-preview {
    min-height: 380px;
  }
}

@media (max-width: 576px) {
  .home-page .hero-section {
    padding: 2.25rem 0 1.5rem;
  }

  .home-page .hero-content {
    text-align: left;
  }

  .home-page .hero-badge {
    margin-bottom: 1rem;
  }

  .home-page .hero-heading {
    margin-bottom: 1rem;
    font-size: clamp(2.65rem, 13vw, 3.35rem) !important;
    line-height: 0.98;
    white-space: normal;
  }

  .home-page .hero-subtitle {
    margin-bottom: 1.35rem;
    font-size: 0.95rem !important;
    line-height: 1.55;
  }

  .home-page .hero-search .form-control {
    min-height: 56px;
    padding-left: 1rem;
    font-size: 0.9rem !important;
  }

  .hero-quick-links {
    gap: 0.45rem 0.8rem;
    line-height: 1.8;
  }

  .home-page .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .home-page .hero-actions .btn-lg {
    width: 100%;
  }

  .hero-account-note {
    display: block;
    line-height: 1.55;
  }

  .hero-account-note > i {
    margin-right: 0.35rem;
  }

  .hero-map-preview {
    min-height: 320px;
    border-radius: 18px;
  }

  .map-preview-topline {
    inset: 0.9rem 0.9rem auto;
  }

  .map-preview-card {
    right: 0.85rem;
    bottom: 2.8rem;
    left: 0.85rem;
    padding: 0.9rem;
  }

  .map-preview-card strong {
    font-size: 0.9rem;
  }

  .map-preview-source {
    right: 1rem;
    bottom: 0.9rem;
  }

  .home-page .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 1.5rem;
  }

  .home-page .stat-item {
    padding: 0.85rem;
    text-align: left;
  }

  .home-page .stat-item + .stat-item {
    border-left: 0;
  }

  .home-page .stat-item:nth-child(even) {
    border-left: 1px solid var(--color-border);
  }

  .home-page .stat-item:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }

  .home-page .value-pill,
  .home-page .use-case-card {
    text-align: left;
  }

  .home-page .value-icon,
  .home-page .feature-icon {
    margin-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-preview-rivers {
    filter: none;
  }
}
