/*
Theme Name: WATERDEAL Landing

Theme URI: https://example.com/waterdeal
Author: WATERDEAL Consortium
Author URI: https://example.com
Description: A single-page landing theme for the WATERDEAL project (Water Data Exchange and Advanced Learning for Sustainable Management) — HORIZON MSCA Staff Exchange, Grant Agreement No. 101299840. Activate it and your front page becomes the project landing page. Brand teal palette with an animated data-network-over-water hero.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: waterdeal
*/

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --ink:        #0F2A2F;   /* darkest text */
  --water-deep: #1B3A40;   /* hero / footer ground */
  --water-deep2:#214A52;   /* gradient partner */
  --teal:       #76A5AF;   /* brand primary */
  --teal-mid:   #5A8A94;
  --teal-deep:  #3D6B75;
  --node:       #2E86AB;   /* accent, from logo nodes */
  --aqua:       #E8F0F1;   /* pale section wash */
  --aqua-2:     #F3F8F8;
  --paper:      #FFFFFF;
  --muted:      #5C7378;   /* muted body text */
  --line:       #DDE8E9;

  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1120px;
  --gap: clamp(1.25rem, 4vw, 3rem);
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wd-container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.wd-eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.wd-eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--teal);
  display: inline-block;
}

/* ============================================================
   Skip link / a11y
   ============================================================ */
.wd-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.wd-skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--node); outline-offset: 2px; }

/* ============================================================
   Header / nav
   ============================================================ */
.wd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.wd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .7rem;
}
.wd-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  font-size: 1.1rem;
}
.wd-brand:hover { text-decoration: none; }
.wd-brand img { width: 34px; height: 34px; }
.wd-navlinks { display: flex; gap: 1.6rem; align-items: center; }
.wd-navlinks a {
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 500;
  color: var(--teal-deep);
}
.wd-navlinks a:hover { color: var(--node); text-decoration: none; }
.wd-navtoggle { display: none; }

/* ============================================================
   Hero
   ============================================================ */
.wd-hero {
  position: relative;
  min-height: clamp(560px, 88vh, 820px);
  display: flex;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(120% 90% at 80% 10%, #2B5A63 0%, transparent 60%),
    linear-gradient(160deg, #173238 0%, #1B3A40 45%, #214A52 100%);
  overflow: hidden;
  isolation: isolate;
}
#wd-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .9;
}
.wd-hero__waves {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}
.wd-hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(3rem, 10vh, 7rem);
}
.wd-hero__logo {
  width: clamp(64px, 10vw, 96px);
  margin-bottom: 1.5rem;
}
.wd-hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  margin: 0 0 .35em;
  max-width: 16ch;
}
.wd-hero__tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  color: #CFE2E5;
  max-width: 30ch;
  margin: 0 0 2rem;
  letter-spacing: -0.01em;
}
.wd-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
  margin-bottom: 2.4rem;
}
.wd-hero__meta div { line-height: 1.3; }
.wd-hero__meta dt {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .66rem;
  color: #8FB8BE;
  margin-bottom: .25rem;
}
.wd-hero__meta dd {
  margin: 0;
  font-weight: 600;
  font-size: 1.02rem;
  color: #fff;
}
.wd-cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: #fff;
  color: var(--water-deep);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .2s ease;
}
.wd-cta:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.wd-cta svg { width: 16px; height: 16px; }

/* ============================================================
   Sections
   ============================================================ */
.wd-section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.wd-section--wash { background: var(--aqua-2); }
.wd-section__head { max-width: 62ch; margin-bottom: 2.8rem; }
.wd-section h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.wd-section__head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* About: lead + supporting columns */
.wd-lead {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.5;
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 30ch;
}
.wd-about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.wd-about-grid p { margin: 0 0 1.1rem; color: var(--muted); }
.wd-about-grid p:last-child { margin-bottom: 0; }

/* Fact callouts */
.wd-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.wd-fact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.6rem 1.4rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.wd-fact:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(27,58,64,.10); }
.wd-fact__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--teal-deep);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.wd-fact__label {
  margin-top: .4rem;
  font-size: .9rem;
  color: var(--muted);
}

/* Consortium logo grid */
.wd-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.wd-logo {
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  padding: 2.2rem 1.4rem;
  min-height: 168px;
  text-align: center;
  transition: background .2s ease;
}
.wd-logo:hover { background: var(--aqua); }
.wd-logo img {
  max-height: 58px;
  width: auto;
  object-fit: contain;
  filter: saturate(1);
}
.wd-logo span {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
}

/* Associated partners */
.wd-assoc {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .9rem 2.5rem;
  margin-top: 2.5rem;
}
.wd-assoc__item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
}
.wd-assoc__name { font-weight: 600; color: var(--ink); }
.wd-assoc__loc {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal-deep);
  white-space: nowrap;
}

/* ============================================================
   Footer (EU compliance)
   ============================================================ */
.wd-footer {
  background: var(--water-deep);
  color: #CFE2E5;
  padding-block: clamp(3rem, 7vw, 5rem);
}
.wd-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.wd-footer__brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.wd-footer__brand img { width: 42px; }
.wd-footer__brand strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: .02em;
}
.wd-footer p { margin: 0 0 .7rem; font-size: .95rem; }
.wd-eu {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
}
.wd-eu img { width: 66px; flex: 0 0 auto; border-radius: 3px; }
.wd-eu p { font-size: .82rem; line-height: 1.55; margin: 0; color: #B9D2D6; }
.wd-footer__bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  justify-content: space-between;
  font-size: .82rem;
  color: #8FB8BE;
}
.wd-footer__bottom a { color: #CFE2E5; }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.wd-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.wd-reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .wd-about-grid { grid-template-columns: 1fr; }
  .wd-facts { grid-template-columns: repeat(2, 1fr); }
  .wd-logos { grid-template-columns: repeat(3, 1fr); }
  .wd-footer__top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wd-navlinks {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gap) 1rem;
    display: none;
  }
  .wd-navlinks.is-open { display: flex; }
  .wd-navlinks a { padding: .55rem 0; width: 100%; }
  .wd-navtoggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
  }
  .wd-logos { grid-template-columns: repeat(2, 1fr); }
  .wd-assoc { grid-template-columns: 1fr; }
  .wd-assoc__loc { margin-left: 0; }
  .wd-hero__meta { gap: 1.2rem 1.8rem; }
}
@media (max-width: 380px) {
  .wd-facts { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wd-reveal { opacity: 1; transform: none; transition: none; }
  .wd-cta:hover, .wd-fact:hover { transform: none; }
  #wd-net { display: none; }
}
