/* ═══════════════════════════════════════════════════
   MHEA — Mazās Hidroenerģijas Asociācija
   Shared stylesheet · LV + EN
   ═══════════════════════════════════════════════════ */

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

:root {
  --deep:        #0B2447;
  --mid:         #163A6B;
  --bg:          #F0F6FF;
  --surface:     #FFFFFF;
  --text:        #0F172A;
  --muted:       #64748B;
  --accent:      #0EA5E9;
  --accent-d:    #0284C7;
  --border:      #DDE8F5;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease:        cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --container:   1080px;
  --r:           8px;
}

html { scroll-behavior: smooth; font-size: 16px; }

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

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

/* ── NAV ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: 64px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: rgba(11, 36, 71, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 350ms var(--ease), box-shadow 350ms var(--ease);
}
.nav.scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 1px 0 var(--border);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo img {
  height: 36px;
  width: auto;
}
.nav__logo-text {
  line-height: 1.2;
}
.nav__logo-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  letter-spacing: -0.01em;
  display: block;
  transition: color 350ms;
}
.nav__logo-sub {
  font-size: 0.6rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  display: block;
  transition: color 350ms;
  white-space: nowrap;
}
.nav.scrolled .nav__logo-name { color: var(--text); }
.nav.scrolled .nav__logo-sub { color: var(--muted); }

.nav__center {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
.nav__center a {
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 200ms;
}
.nav__center a:hover { color: rgba(255,255,255,0.95); }
.nav.scrolled .nav__center a { color: var(--muted); }
.nav.scrolled .nav__center a:hover { color: var(--text); }

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Lang switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 2px;
  transition: background 350ms;
}
.nav.scrolled .lang-switch { background: var(--border); }
.lang-switch a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  transition: background 200ms, color 200ms;
}
.lang-switch a.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.nav.scrolled .lang-switch a { color: var(--muted); }
.nav.scrolled .lang-switch a.active {
  background: var(--deep);
  color: #fff;
}

.nav__cta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--deep);
  background: var(--accent);
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 200ms;
}
.nav__cta:hover { background: var(--accent-d); color: #fff; }

/* Mobile hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: background 350ms;
}
.nav.scrolled .nav__hamburger span { background: var(--text); }

/* Mobile nav overlay */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--deep);
  z-index: 490;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 200ms;
}
.nav__mobile a:hover { color: var(--accent); }

/* ── HERO ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 9s ease-out;
}
.hero:hover .hero__bg { transform: scale(1.04); }
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(11,36,71,0.2) 0%,
    rgba(11,36,71,0.5) 55%,
    rgba(11,36,71,0.92) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem 5.5rem;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.hero__title {
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: #fff;
  max-width: 700px;
  margin-bottom: 1.25rem;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.62);
  max-width: 540px;
  line-height: 1.72;
  margin-bottom: 2.5rem;
}
.hero__btns {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.78rem 1.75rem;
  border-radius: 6px;
  transition: background 200ms, opacity 200ms, color 200ms;
  cursor: pointer;
  border: none;
}
.btn--white { background: #fff; color: var(--deep); }
.btn--white:hover { opacity: 0.9; }
.btn--outline-white {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn--outline-white:hover { border-color: rgba(255,255,255,0.65); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-d); }
.btn--deep { background: var(--deep); color: #fff; }
.btn--deep:hover { background: var(--mid); }

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem; right: 2rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  animation: scrollPulse 2.5s ease-in-out infinite;
}
.hero__scroll-hint::after {
  content: '';
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.2);
}
@keyframes scrollPulse {
  0%,100% { transform: translateY(0); opacity: .35; }
  50% { transform: translateY(7px); opacity: .65; }
}

/* ── STATS ────────────────────────────────────────── */
.stats {
  background: var(--deep);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.stats__grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 2rem 1.5rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.stat:last-child { border-right: none; }
.stat__num {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat__num em { color: var(--accent); font-style: normal; }
.stat__label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.02em;
}

/* ── SECTIONS ─────────────────────────────────────── */
.section {
  padding: 6rem 2rem;
}
.section__inner {
  max-width: var(--container);
  margin: 0 auto;
}
.section--surface { background: var(--surface); }
.section--deep { background: var(--deep); }

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section--deep .eyebrow { color: rgba(14,165,233,.7); }

.section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 1rem;
  color: var(--text);
}
.section--deep .section__title { color: #fff; }

.section__lead {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 580px;
}
.section--deep .section__lead { color: rgba(255,255,255,.45); }

/* ── ABOUT ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-top: 3.5rem;
}
.about__body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
}
.about__body p + p { margin-top: 1rem; }

.about__photo-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(11,36,71,0.2);
  aspect-ratio: 4/3;
}
.about__photo-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.about__photo-wrap:hover img { transform: scale(1.04); }
.about__badge {
  position: absolute;
  bottom: 1.5rem; left: 1.5rem;
  background: rgba(11,36,71,0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: #fff;
}
.about__badge-num {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.about__badge-text {
  font-size: 0.7rem;
  color: rgba(255,255,255,.5);
  margin-top: 0.2rem;
}

/* ── ACTIVITIES ───────────────────────────────────── */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.activity {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  transition: background 200ms, border-color 200ms;
}
.activity:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(14,165,233,.3);
}
.activity__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(14,165,233,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}
.activity__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}
.activity__text {
  font-size: 0.83rem;
  color: rgba(255,255,255,.45);
  line-height: 1.65;
}

/* ── BOARD ────────────────────────────────────────── */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.board-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 250ms var(--ease), transform 250ms var(--ease);
}
.board-card:hover {
  box-shadow: 0 12px 40px rgba(11,36,71,0.12);
  transform: translateY(-3px);
}
.board-card__photo {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.board-card__photo-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
}
.board-card__body {
  padding: 1.5rem;
}
.board-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.board-card__role {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.board-card__bio {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.board-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 200ms;
}
.board-card__link:hover { color: var(--accent-d); }

/* ── CONTACT ──────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  margin-top: 3rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-item__icon {
  width: 40px; height: 40px;
  background: rgba(14,165,233,.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-item__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.contact-item__value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* Contact form */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
}
.form__input,
.form__textarea {
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  transition: border-color 200ms, box-shadow 200ms;
  outline: none;
  width: 100%;
}
.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}
.form__textarea { resize: vertical; min-height: 120px; }
.form__note {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.form__note a { color: var(--accent); }

/* ── FOOTER ───────────────────────────────────────── */
.footer {
  background: var(--deep);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer__main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.footer__logo img { height: 32px; }
.footer__brand-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}
.footer__desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,.32);
  line-height: 1.65;
  max-width: 240px;
}
.footer__col-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: 1rem;
}
.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer__links a {
  font-size: 0.82rem;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color 200ms;
}
.footer__links a:hover { color: rgba(255,255,255,.85); }

.footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255,255,255,.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer__copy {
  font-size: 0.72rem;
  color: rgba(255,255,255,.22);
}
.footer__photo-credit {
  font-size: 0.7rem;
  color: rgba(255,255,255,.18);
}

/* ── REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 70ms; }
.d2 { transition-delay: 140ms; }
.d3 { transition-delay: 210ms; }
.d4 { transition-delay: 280ms; }

/* ── MOBILE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .nav__center { display: none; }
  .nav__cta { display: none; }
  .nav__hamburger { display: flex; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-right: 1px solid rgba(255,255,255,0.05); border-top: 1px solid rgba(255,255,255,0.05); }
  .stat:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.05); }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .activities-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .form__row { grid-template-columns: 1fr; }

  .footer__main { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .section { padding: 4rem 1.5rem; }
  .footer__main { grid-template-columns: 1fr; }
  .board-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(2rem, 8vw, 3rem); }
}
