/* ==========================================================================
   Hydrogeological Repository — theme stylesheet
   ========================================================================== */

:root {
  --navy-950: #050e1a;
  --navy-900: #0a1d30;
  --navy-800: #10304d;
  --navy-700: #16416a;
  --teal-400: #2dd4bf;
  --teal-300: #5eead4;
  --amber-400: #f2b134;
  --slate-50: #f5f8fa;
  --slate-100: #eaf0f4;
  --slate-500: #5b6b7a;
  --text-light: #eaf2f8;
  --text-muted: #9fb3c4;
  --text-body: #46586a;
  --shadow-lg: 0 20px 50px -20px rgba(10, 29, 48, 0.35);
  --shadow-sm: 0 8px 20px -10px rgba(10, 29, 48, 0.25);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  color: var(--navy-900);
  margin: 0 0 14px;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 17px;
}

section {
  padding: 96px 0;
}

/* -------------------------------------------------- Navigation */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 22px 0;
  transition: all 0.3s ease;
}

.site-nav.is-scrolled {
  padding: 14px 0;
  background: rgba(5, 14, 26, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal-400), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-950);
  font-weight: 800;
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 10px 16px;
  color: var(--text-light);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links li.active a {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-links .btn-cta a {
  background: var(--teal-400);
  color: var(--navy-950);
  padding: 10px 22px;
}

.nav-links .btn-cta a:hover {
  background: var(--teal-300);
  color: var(--navy-950);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* -------------------------------------------------- Hero */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: #fff;
  background: #030a13 url("../images/header_main.png") center/cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 14, 26, 0.55) 0%, rgba(5, 14, 26, 0.78) 55%, var(--slate-50) 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 120px;
}

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

.hero h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--teal-400);
  color: var(--navy-950);
}

.btn-primary:hover {
  background: var(--teal-300);
  color: var(--navy-950);
  box-shadow: 0 14px 30px -10px rgba(45, 212, 191, 0.55);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-soft {
  background: var(--slate-100);
  color: var(--navy-900);
}

.btn-soft:hover {
  background: var(--slate-50);
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
}

.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stats div strong {
  display: block;
  font-size: 26px;
  color: #fff;
  font-weight: 800;
}

.hero-stats div span {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* -------------------------------------------------- About */

#about {
  background: var(--slate-50);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-copy p {
  font-size: 17px;
  color: var(--text-body);
  margin: 0 0 16px;
}

.about-card {
  background: linear-gradient(150deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius);
  padding: 40px;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.about-card ul {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.about-card li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: var(--text-muted);
}

.about-card li strong {
  color: #fff;
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.check {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.18);
  color: var(--teal-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

/* -------------------------------------------------- Resources / cards */

#resources {
  background: var(--slate-100);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(16, 48, 77, 0.06);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(45, 212, 191, 0.18), rgba(16, 48, 77, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon img {
  width: 24px;
  height: 24px;
}

.card h3 {
  color: var(--navy-900);
  font-size: 19px;
  margin: 0 0 16px;
}

.card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.card ul.dataset-list {
  columns: 2;
  column-gap: 24px;
}

.card ul.dataset-list li {
  break-inside: avoid;
}

.card li {
  font-size: 14.5px;
  color: var(--text-body);
  padding-left: 18px;
  position: relative;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-400);
}

.card li a {
  color: var(--navy-900);
  font-weight: 600;
}

.card li a:hover {
  color: var(--teal-400);
}

.card--wide {
  grid-column: 1 / -1;
}

/* -------------------------------------------------- Support */

#support {
  background: var(--slate-50);
}

.support-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 44px;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(16, 48, 77, 0.06);
}

.support-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
}

.support-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-panel h4 {
  margin: 0 0 6px;
  font-size: 21px;
  color: var(--navy-900);
}

.support-panel h5 {
  margin: 0 0 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--slate-500);
}

.support-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.support-meta li {
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--navy-900);
  font-weight: 600;
}

.support-meta li a {
  color: inherit;
}

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

.site-footer {
  background: var(--navy-950);
  color: var(--text-muted);
  padding: 72px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
  max-width: 320px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.site-footer h3 {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.site-footer ul a {
  color: var(--text-muted);
  font-size: 14.5px;
}

.site-footer ul a:hover {
  color: var(--teal-300);
}

.footer-bottom {
  padding-top: 28px;
  text-align: center;
  font-size: 13.5px;
  color: var(--slate-500);
}

/* -------------------------------------------------- Back to top */

.js-gotop {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--teal-400);
  color: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 999;
}

.js-gotop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* -------------------------------------------------- Reveal-on-scroll */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------- Auth pages (login / forgot / change password) */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--navy-900), var(--navy-700));
  padding: 140px 24px 60px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow-lg);
}

.auth-card .eyebrow {
  margin-bottom: 10px;
}

.auth-card h1 {
  font-size: 26px;
  color: var(--navy-900);
  margin: 0 0 8px;
  font-weight: 700;
}

.auth-card p.sub {
  color: var(--slate-500);
  font-size: 14.5px;
  margin: 0 0 28px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(16, 48, 77, 0.14);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--navy-900);
  background: var(--slate-50);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
  background: #fff;
}

.auth-form input[type="submit"] {
  width: 100%;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  background: var(--teal-400);
  color: var(--navy-950);
  transition: background 0.2s ease, transform 0.2s ease;
}

.auth-form input[type="submit"]:hover {
  background: var(--teal-300);
  transform: translateY(-2px);
}

.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 14.5px;
}

.auth-foot {
  margin-top: 8px;
  text-align: center;
}

/* -------------------------------------------------- Member portal */

.welcome-banner {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(16, 48, 77, 0.06);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.welcome-banner h2 {
  margin: 0;
  font-size: 22px;
  color: var(--navy-900);
}

.welcome-banner p {
  margin: 4px 0 0;
  color: var(--slate-500);
  font-size: 14.5px;
}

/* -------------------------------------------------- Responsive */

@media (max-width: 900px) {
  .about-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

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

  .support-panel {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--navy-950);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    padding: 32px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links a {
    padding: 14px 18px;
  }

  .nav-toggle {
    display: flex;
  }

  section {
    padding: 72px 0;
  }

  .card ul.dataset-list {
    columns: 1;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .welcome-banner {
    padding: 24px;
  }
}
