@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Raleway:wght@300;400;500&family=Courier+Prime:wght@400&display=swap');

:root {
  --paper:      #f5f9ff;
  --mist:       #e8f2fa;
  --pale-blue:  #d0e8f8;
  --rain-blue:  #90c0e0;
  --mid-blue:   #4080b0;
  --deep-blue:  #1a5080;
  --pond:       #0d3a60;
  --cloud:      #b8ccd8;
  --thunder-g:  #485870;
  --earth:      #607040;
  --text-dark:  #1a2a38;
  --text-mid:   #3a5068;
  --text-light: #708898;
  --card-bg:    rgba(255,255,255,0.82);
  --card-border:rgba(64,128,176,0.15);
  --mono:       'Courier Prime', monospace;
  --shadow-soft: 0 4px 28px rgba(26,80,128,0.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  background: var(--paper);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Rain background layers ── */
.sky-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(175deg,
    #e8f3fd 0%, #f0f7ff 35%, #eef5fc 65%, #f5f9ff 100%);
}

#rain-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55;
}

#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--deep-blue), var(--rain-blue));
  z-index: 9999;
}

/* ── Layout ── */
.wrap {
  position: relative; z-index: 1;
  max-width: 980px; margin: 0 auto; padding: 0 28px 100px;
}

/* ══ HERO ══ */
.hero {
  padding: 90px 0 70px; text-align: center;
  opacity: 0; animation: dropIn 1s 0.15s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes dropIn {
  from { opacity:0; transform:translateY(-20px); }
  to   { opacity:1; transform:none; }
}

.hero-tag {
  font-family: var(--mono); font-size: 0.67rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--mid-blue); margin-bottom: 24px;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(5rem, 14vw, 12rem);
  font-weight: 400; font-style: italic;
  line-height: 0.88; letter-spacing: -0.04em;
  color: var(--deep-blue); margin-bottom: 28px;
}

.hero-divider {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin: 28px 0;
}
.hero-divider::before, .hero-divider::after {
  content: ''; flex: 1; max-width: 220px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rain-blue));
}
.hero-divider::after { transform: scaleX(-1); }
.hero-divider span { font-size: 0.9rem; color: var(--cloud); letter-spacing: 0.2em; }

.hero-desc {
  font-size: 1.12rem; line-height: 1.88; color: var(--text-light);
  max-width: 620px; margin: 0 auto 36px; font-weight: 300;
}

.hero-stats {
  display: flex; gap: 0; justify-content: center;
  border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden;
  background: var(--card-bg); box-shadow: var(--shadow-soft);
  max-width: 700px; margin: 0 auto;
  backdrop-filter: blur(10px);
}
.hero-stat {
  flex: 1; padding: 20px; border-right: 1px solid var(--card-border); text-align: center;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-val {
  font-family: 'Playfair Display', serif; font-size: 2rem; font-style: italic;
  color: var(--mid-blue); display: block; margin-bottom: 4px; line-height: 1;
}
.hero-stat-lbl { font-size: 0.78rem; color: var(--text-light); line-height: 1.4; }

/* ── Divider ── */
.rain-rule {
  width: 100%; height: 1px; margin: 64px 0;
  background: linear-gradient(90deg, transparent, var(--pale-blue), transparent);
}

/* ── Sec util ── */
.sec-tag {
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--mid-blue); margin-bottom: 10px;
}
.sec-h2 {
  font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 400; font-style: italic; color: var(--pond);
  margin-bottom: 30px; line-height: 1.1;
}

/* ══ FORMATION ══ */
.formation-section { opacity: 0; animation: rise 0.8s forwards; }

.drop-steps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  background: var(--card-border); border-radius: 14px; overflow: hidden;
}
.drop-step {
  background: var(--card-bg); padding: 26px 18px; text-align: center;
  transition: background 0.3s; position: relative;
}
.drop-step:hover { background: rgba(208,232,248,0.8); }
.drop-num { font-family: var(--mono); font-size: 0.62rem; color: var(--rain-blue); margin-bottom: 12px; display: block; letter-spacing: 0.1em; }
.drop-icon { font-size: 1.8rem; display: block; margin-bottom: 12px; }
.drop-step h3 { font-family: 'Playfair Display', serif; font-style: italic; font-size: 0.95rem; color: var(--deep-blue); margin-bottom: 8px; }
.drop-step p  { font-size: 0.82rem; line-height: 1.65; color: var(--text-light); }

/* ══ TYPES ══ */
.types-section { opacity: 0; animation: rise 0.8s forwards; }

.types-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px;
}
.type-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 24px 22px; box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
}
.type-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(26,80,128,0.12); }
.type-icon { font-size: 1.9rem; margin-bottom: 13px; display: block; }
.type-card h3 { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.1rem; color: var(--deep-blue); margin-bottom: 8px; }
.type-card p  { font-size: 0.9rem; line-height: 1.73; color: var(--text-light); }
.type-measure { margin-top: 10px; font-family: var(--mono); font-size: 0.65rem; color: var(--mid-blue); letter-spacing: 0.1em; }

/* ══ PLUVIOMÉTRIE ══ */
.pluvio-section { opacity: 0; animation: rise 0.8s forwards; }

.pluvio-table { width: 100%; border-collapse: collapse; }
.pluvio-table th {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mid-blue); padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--card-border);
}
.pluvio-table td {
  padding: 13px 16px; border-bottom: 1px solid rgba(64,128,176,0.08);
  font-size: 0.91rem; color: var(--text-light); vertical-align: middle;
}
.pluvio-table tr:hover td { background: rgba(144,192,224,0.1); }
.pluvio-table td:first-child { font-style: italic; color: var(--text-dark); font-family: 'Playfair Display', serif; }
.pluvio-table .mono-val { font-family: var(--mono); color: var(--mid-blue); font-size: 0.88rem; }
.rain-bar-w { width: 110px; height: 6px; background: rgba(64,128,176,0.12); border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.rain-bar   { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--mid-blue), var(--rain-blue)); width: 0; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }

/* ══ IMPACTS ══ */
.impacts-section { opacity: 0; animation: rise 0.8s forwards; }

.impacts-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.impacts-col {}
.impacts-col-label {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 1.2rem; color: var(--mid-blue); margin-bottom: 16px; display: block;
}
.impact-item {
  display: flex; gap: 14px; padding: 16px 18px; margin-bottom: 12px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 10px; box-shadow: var(--shadow-soft);
  align-items: flex-start; transition: transform 0.25s;
}
.impact-item:hover { transform: translateX(4px); }
.impact-icon { font-size: 1.5rem; flex-shrink: 0; }
.impact-item h3 { font-size: 0.93rem; font-weight: 500; color: var(--text-dark); margin-bottom: 4px; }
.impact-item p  { font-size: 0.87rem; line-height: 1.65; color: var(--text-light); }

/* ══ RECORDS ══ */
.records-section { opacity: 0; animation: rise 0.8s forwards; }

.records-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.record-tile {
  padding: 22px 20px; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; box-shadow: var(--shadow-soft);
  transition: transform 0.25s;
}
.record-tile:hover { transform: scale(1.03); }
.record-tile h3 { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cloud); margin-bottom: 8px; }
.record-tile .rval { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-style: italic; color: var(--deep-blue); line-height: 1; margin-bottom: 4px; }
.record-tile .rloc { font-size: 0.85rem; color: var(--text-light); font-style: italic; margin-bottom: 2px; }
.record-tile .ryear { font-family: var(--mono); font-size: 0.72rem; color: var(--rain-blue); }

/* ══ QUOTE ══ */
.rain-quote {
  margin: 64px 0; padding: 36px 44px;
  background: rgba(26,80,128,0.04);
  border-left: 3px solid var(--rain-blue);
  border-radius: 0 14px 14px 0;
  opacity: 0; animation: rise 0.8s forwards;
}
.rain-quote blockquote {
  font-family: 'Playfair Display', serif; font-size: 1.3rem; font-style: italic;
  line-height: 1.68; color: var(--pond); margin-bottom: 14px;
}
.rain-quote cite {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mid-blue);
}

/* ══ FOOTER ══ */
footer {
  margin-top: 80px; padding-top: 22px;
  border-top: 1px solid var(--card-border);
  text-align: center; font-family: var(--mono);
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-light); opacity: 0.7;
}

@keyframes rise { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

.formation-section { animation-delay: 0.7s; }
.types-section     { animation-delay: 0.9s; }
.pluvio-section    { animation-delay: 1.1s; }
.impacts-section   { animation-delay: 1.3s; }
.records-section   { animation-delay: 1.5s; }
.rain-quote        { animation-delay: 1.7s; }

@media (max-width: 720px) {
  .drop-steps   { grid-template-columns: 1fr 1fr; }
  .impacts-2col { grid-template-columns: 1fr; }
  .hero-stats   { flex-direction: column; }
  .hero-stat    { border-right: none; border-bottom: 1px solid var(--card-border); }
  .hero-stat:last-child { border-bottom: none; }
}
@media (max-width: 480px) {
  .drop-steps { grid-template-columns: 1fr; }
}
