@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;700&family=Lora:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --stone-0:  #f5f0ea;
  --stone-1:  #e2d5c3;
  --stone-2:  #c4a882;
  --stone-3:  #9b7d58;
  --stone-4:  #6e5438;
  --stone-5:  #4a3520;
  --stone-6:  #2d1e0e;
  --slate:    #3a3d4a;
  --rust:     #a84030;
  --clay:     #c86030;
  --mineral:  #5090a0;
  --text-main: #f0ead8;
  --text-muted: #9a8870;
  --card-bg: rgba(45,30,14,0.7);
  --card-border: rgba(196,168,130,0.2);
  --accent: #c86030;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Lora', Georgia, serif;
  background: var(--stone-6);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Strata background ── */
.strata-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(
      4deg,
      transparent 0px,
      transparent 38px,
      rgba(196,168,130,0.035) 38px,
      rgba(196,168,130,0.035) 40px
    ),
    repeating-linear-gradient(
      -2deg,
      transparent 0px,
      transparent 78px,
      rgba(168,64,48,0.025) 78px,
      rgba(168,64,48,0.025) 80px
    ),
    radial-gradient(ellipse 110% 60% at 0% 100%, rgba(110,84,56,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 100% 0%,  rgba(80,144,160,0.12) 0%, transparent 55%),
    linear-gradient(165deg, #1a1208 0%, #2a1a0c 35%, #1e140a 70%, #100c06 100%);
  pointer-events: none;
}

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

/* ── Hero: big offset title ── */
.hero {
  padding: 90px 0 40px;
  position: relative;
  border-bottom: 1px solid rgba(196,168,130,0.15);
  margin-bottom: 60px;
  opacity: 0;
  animation: revealHero 1s 0.15s forwards;
}

.hero-tag {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 700;
  line-height: 0.88;
  color: var(--stone-1);
  letter-spacing: -0.04em;
  position: relative;
}

.hero-title .shadow-text {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(196,168,130,0.3);
  margin-top: 6px;
  font-size: 80%;
}

.hero-sub {
  max-width: 560px;
  margin-top: 28px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  font-style: italic;
}

.hero-badge {
  position: absolute;
  right: 0; bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.badge-num {
  font-family: 'Unbounded', sans-serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--clay);
  line-height: 1;
}
.badge-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 3px;
  line-height: 1.4;
}

/* ── Section utility ── */
.sec-tag {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 8px;
}

.sec-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--stone-1);
  margin-bottom: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ── Types of erosion: stacked panels ── */
.types-section { margin-bottom: 60px; opacity: 0; animation: rise 0.8s 0.7s forwards; }

.type-panels { display: flex; flex-direction: column; gap: 0; }

.type-panel {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0;
  border-top: 1px solid rgba(196,168,130,0.12);
  padding: 24px 0;
  cursor: default;
  transition: background 0.3s;
  border-radius: 0;
  padding-left: 4px;
}
.type-panel:last-child { border-bottom: 1px solid rgba(196,168,130,0.12); }
.type-panel:hover { background: rgba(200,96,48,0.07); }

.type-num {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  color: rgba(196,168,130,0.35);
  padding-top: 4px;
  letter-spacing: 0.1em;
}

.type-body {}
.type-body h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--stone-1);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.type-body p {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-muted);
}
.type-body .type-meta {
  margin-top: 8px;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mineral);
}

/* ── Factors grid ── */
.factors-section { margin: 60px 0; opacity: 0; animation: rise 0.8s 1s forwards; }

.factors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(196,168,130,0.1);
  border-radius: 12px;
  overflow: hidden;
}

.factor-cell {
  background: var(--card-bg);
  padding: 22px 20px;
  transition: background 0.3s;
}
.factor-cell:hover { background: rgba(200,96,48,0.12); }

.factor-icon { font-size: 1.6rem; margin-bottom: 10px; display: block; }
.factor-cell h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--stone-2);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.factor-cell p { font-size: 0.88rem; line-height: 1.65; color: var(--text-muted); }

/* ── Erosion rate table ── */
.rate-section { margin: 60px 0; opacity: 0; animation: rise 0.8s 1.3s forwards; }

.rate-table {
  width: 100%;
  border-collapse: collapse;
}
.rate-table th {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(196,168,130,0.15);
}
.rate-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(196,168,130,0.07);
  font-size: 0.92rem;
  color: var(--text-muted);
  vertical-align: middle;
}
.rate-table tr:hover td { background: rgba(200,96,48,0.07); }
.rate-table td:first-child { color: var(--stone-1); font-style: italic; }

.severity-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.sev-low    { background: #4a8060; }
.sev-med    { background: #c8a030; }
.sev-high   { background: #c86030; }
.sev-crit   { background: #a02020; }

/* ── Consequences accordion ── */
.consequences-section { margin: 60px 0; opacity: 0; animation: rise 0.8s 1.5s forwards; }

.accord-item {
  border-top: 1px solid rgba(196,168,130,0.12);
  overflow: hidden;
}
.accord-item:last-child { border-bottom: 1px solid rgba(196,168,130,0.12); }

.accord-trigger {
  width: 100%;
  background: none;
  border: none;
  color: var(--stone-1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-align: left;
  transition: color 0.25s;
}
.accord-trigger:hover { color: var(--clay); }
.accord-arrow {
  width: 20px; height: 20px;
  border: 1px solid rgba(196,168,130,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: transform 0.3s, background 0.3s;
}
.accord-item.open .accord-arrow { transform: rotate(45deg); background: rgba(200,96,48,0.2); }

.accord-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.accord-body-inner {
  padding: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ── Prevention ── */
.prevention-section { margin: 60px 0; opacity: 0; animation: rise 0.8s 1.7s forwards; }

.prev-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.prev-item {
  padding: 18px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--clay);
  border-radius: 0 10px 10px 0;
  transition: transform 0.25s;
}
.prev-item:hover { transform: translateX(4px); }
.prev-item h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--stone-2);
  margin-bottom: 7px;
}
.prev-item p { font-size: 0.88rem; line-height: 1.65; color: var(--text-muted); }

/* ── Keyquote ── */
.keyquote {
  margin: 60px 0;
  padding: 36px 40px;
  background: rgba(80,144,160,0.08);
  border: 1px solid rgba(80,144,160,0.2);
  border-radius: 16px;
  opacity: 0;
  animation: rise 0.8s 2s forwards;
}
.keyquote blockquote {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--stone-1);
  margin-bottom: 12px;
}
.keyquote cite {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--mineral);
  text-transform: uppercase;
}

/* ── Footer ── */
footer {
  margin-top: 80px;
  padding-top: 22px;
  border-top: 1px solid rgba(196,168,130,0.12);
  text-align: center;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.58rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
}

/* ── Animations ── */
@keyframes revealHero { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:none; } }
@keyframes rise       { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }

/* ── Responsive ── */
@media (max-width: 700px) {
  .factors-grid { grid-template-columns: 1fr 1fr; }
  .prev-list    { grid-template-columns: 1fr; }
  .hero-badge   { position: static; margin-top: 24px; align-items: flex-start; }
  .hero-title   { font-size: clamp(2.8rem, 14vw, 5rem); }
}
@media (max-width: 480px) {
  .factors-grid { grid-template-columns: 1fr; }
}
