/*
Theme Name: ERGENTUM
Theme URI: https://ergentum.io
Author: ERGENTUM
Author URI: https://ergentum.io
Description: ERGENTUM Landing Page — Agent Monetary Infrastructure. Fully customizable via Appearance > Customize.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ergentum
*/

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #13140f;
  --carbon:     #1a1b15;
  --slate:      #2a2b22;
  --stone:      #6a6a50;
  --vellum:     #F2EDD8;
  --cream:      #FAF7EE;
  --green:      #1D9E75;
  --green-deep: #0F6E56;
  --green-mid:  #5DCAA5;
  --gold:       #BA7517;
  --gold-mid:   #EF9F27;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--vellum);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--green); }

/* ── UTILITIES ── */
.green  { color: var(--green); }
.gold   { color: var(--gold); }
.muted  { color: var(--stone); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s;
}
nav.scrolled {
  background: rgba(19,20,15,.96);
  border-color: var(--slate);
}
.nav-logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 700; letter-spacing: -.5px;
  text-decoration: none;
}
.nav-logo span.erg  { color: var(--green); }
.nav-logo span.ent  { color: var(--vellum); }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--stone); text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--vellum); }
.nav-cta {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 9px 22px; border: 1px solid var(--green);
  color: var(--green); background: transparent; text-decoration: none;
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--green); color: var(--ink); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 120px 48px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: .025; pointer-events: none;
}

.hero-rule-top {
  width: 100%; max-width: 760px;
  margin-bottom: 40px;
  display: flex; align-items: center; gap: 0;
  opacity: 0; animation: fadeUp .8s .1s forwards;
}
.hero-rule-top .r1 { flex: 1; height: 2px; background: var(--green); }
.hero-rule-top .r2 { flex: 1; height: 2px; background: var(--gold); }

.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 28px;
  opacity: 0; animation: fadeUp .7s .25s forwards;
}

.hero-wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(72px, 14vw, 148px);
  font-weight: 700; line-height: .9;
  letter-spacing: -3px;
  margin-bottom: 32px;
  opacity: 0; animation: fadeUp .9s .35s forwards;
}
.hero-wordmark .erg  { color: var(--green); }
.hero-wordmark .ent  { color: var(--vellum); font-weight: 300; }

.hero-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 300; font-style: italic;
  color: var(--stone); letter-spacing: .04em;
  margin-bottom: 52px;
  opacity: 0; animation: fadeUp .7s .5s forwards;
}
.hero-tagline strong { color: var(--vellum); font-style: normal; font-weight: 400; }

.hero-rule-bottom {
  width: 100%; max-width: 760px;
  margin-bottom: 52px;
  opacity: 0; animation: fadeUp .8s .55s forwards;
}
.hero-rule-bottom .r1 { width: 100%; height: .5px; background: var(--gold); }
.hero-rule-bottom .r2 { width: 100%; height: 2px; background: var(--green); margin-top: 5px; }

.hero-ctas {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  opacity: 0; animation: fadeUp .7s .65s forwards;
}
.btn-primary {
  padding: 14px 40px;
  background: var(--green); color: var(--ink);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-family: 'DM Sans', sans-serif; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--green-mid); }
.btn-ghost {
  padding: 14px 40px;
  background: transparent; color: var(--vellum);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-family: 'DM Sans', sans-serif; font-weight: 400;
  text-decoration: none; border: 1px solid var(--slate); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--vellum); color: var(--vellum); }

.hero-scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; animation: fadeUp .6s 1s forwards;
}
.hero-scroll span {
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--stone);
}
.scroll-line {
  width: 1px; height: 40px; background: var(--slate);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 1px; height: 100%; background: var(--green);
  animation: scrollDrop 1.8s 1.2s infinite;
}

/* ── TICKER ── */
.ticker-wrap {
  background: var(--slate); overflow: hidden;
  border-top: 1px solid var(--carbon);
  border-bottom: 1px solid var(--carbon);
  padding: 12px 0;
}
.ticker {
  display: flex; gap: 0;
  animation: ticker 28s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--stone); padding: 0 40px;
  display: flex; align-items: center; gap: 14px;
}
.ticker-item .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* ── SECTION COMMONS ── */
section { padding: 120px 48px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before {
  content: ''; width: 28px; height: 1px; background: var(--gold);
}
.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700; line-height: 1.1;
  letter-spacing: -1px; color: var(--vellum);
  margin-bottom: 20px;
}
.section-title .accent { color: var(--green); }
.section-rule {
  width: 60px; height: 2px; background: var(--green);
  margin-bottom: 48px;
}
.section-body {
  font-size: 16px; color: var(--stone);
  line-height: 1.8; max-width: 640px;
}

/* reveal on scroll */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s, transform .7s;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .35s; }
.reveal-delay-4 { transition-delay: .5s; }

/* ── ORIGIN ── */
#origin { background: var(--carbon); }
.origin-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; margin-top: 64px;
}
.origin-card {
  background: var(--ink); padding: 48px 44px;
  border-top: 2px solid var(--green);
  position: relative;
}
.origin-card.silver { border-top-color: var(--gold); }
.origin-word {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 48px; font-weight: 700; letter-spacing: -1px;
  margin-bottom: 6px;
}
.origin-card:not(.silver) .origin-word { color: var(--green); }
.origin-card.silver .origin-word { color: var(--stone); }
.origin-meta {
  font-size: 11px; color: var(--stone); font-style: italic;
  margin-bottom: 28px; padding-bottom: 20px;
  border-bottom: 1px solid var(--slate);
}
.origin-text {
  font-size: 14px; color: var(--stone); line-height: 1.85;
}
.origin-text strong { color: var(--vellum); font-weight: 400; }
.origin-plus {
  position: absolute; bottom: -22px; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; color: var(--green);
  border: 1px solid var(--slate);
  z-index: 2;
}

.origin-story {
  margin-top: 64px; padding: 52px 56px;
  background: var(--slate);
  border-left: 4px solid var(--green);
  position: relative;
}
.origin-story p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 300; font-style: italic;
  line-height: 1.65; color: var(--vellum);
}
.origin-story p strong {
  font-style: normal; font-weight: 600; color: var(--green);
}
.origin-story-attr {
  margin-top: 20px; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}

/* ── ECOSYSTEM ── */
#ecosystem { background: var(--ink); }
.eco-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; margin-top: 64px;
}
.eco-card {
  background: var(--carbon); padding: 36px 32px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, background .2s;
  cursor: default;
}
.eco-card:hover { background: var(--slate); border-bottom-color: var(--green); }
.eco-card.gold:hover { border-bottom-color: var(--gold); }
.eco-num {
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 20px;
}
.eco-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px; font-weight: 700; color: var(--vellum);
  margin-bottom: 4px; letter-spacing: -.5px;
}
.eco-name .ticker-tag {
  font-size: 13px; font-weight: 400; color: var(--green); margin-left: 6px;
}
.eco-type {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone); margin-bottom: 20px; padding-bottom: 18px;
  border-bottom: 1px solid var(--slate);
}
.eco-desc { font-size: 13px; color: var(--stone); line-height: 1.75; }

/* ── SLOGANS ── */
#slogans {
  background: var(--carbon);
  position: relative; overflow: hidden;
}
#slogans::before {
  content: 'ERGENTUM';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 28vw; font-weight: 700;
  color: var(--slate); opacity: .08;
  white-space: nowrap; pointer-events: none;
  letter-spacing: -4px;
}
.slogans-list {
  margin-top: 64px; display: flex; flex-direction: column; gap: 0;
  position: relative;
}
.slogan-item {
  padding: 36px 0;
  border-bottom: 1px solid var(--slate);
  display: flex; align-items: baseline; gap: 32px;
  transition: padding-left .2s;
}
.slogan-item:hover { padding-left: 12px; }
.slogan-item:first-child { border-top: 1px solid var(--slate); }
.slogan-n {
  font-size: 10px; color: var(--stone); min-width: 28px;
  font-family: 'Cormorant Garamond', serif; font-style: italic;
}
.slogan-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 300; line-height: 1.4;
  color: var(--vellum); flex: 1;
}
.slogan-text em { font-style: italic; color: var(--green); }
.slogan-use {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone); min-width: 160px; text-align: right;
}

/* ── MANIFESTO ── */
#manifesto { background: var(--ink); }
.manifesto-text {
  max-width: 820px; margin: 0 auto;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 300; line-height: 1.75;
  color: var(--stone); text-align: center;
}
.manifesto-text strong { color: var(--vellum); font-weight: 600; }
.manifesto-text .highlight { color: var(--green); font-style: italic; }
.manifesto-cta {
  text-align: center; margin-top: 64px;
}
.manifesto-hero-line {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 700; color: var(--vellum);
  text-align: center; margin-top: 48px;
  letter-spacing: -.5px;
}
.manifesto-hero-line .green { color: var(--green); }

/* ── PALETTE STRIP ── */
.palette-strip {
  display: flex; height: 6px;
  position: relative; overflow: hidden;
}
.palette-strip div { flex: 1; }

/* ── FOOTER ── */
footer {
  background: var(--carbon);
  border-top: 1px solid var(--slate);
  padding: 64px 48px 40px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 52px;
}
.footer-brand {}
.footer-wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px; font-weight: 700; letter-spacing: -1px;
  margin-bottom: 12px;
}
.footer-wordmark .erg { color: var(--green); }
.footer-wordmark .ent { color: var(--vellum); font-weight: 300; }
.footer-tagline {
  font-size: 11px; color: var(--stone);
  font-style: italic; font-family: 'Cormorant Garamond', serif;
  margin-bottom: 24px;
}
.footer-col h4 {
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 13px; color: var(--stone); text-decoration: none;
  transition: color .2s;
}
.footer-col ul li a:hover { color: var(--vellum); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--slate);
}
.footer-bottom p {
  font-size: 11px; color: var(--stone); letter-spacing: .04em;
}
.footer-stamp {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px; color: var(--stone); letter-spacing: .1em;
  text-transform: uppercase;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scrollDrop {
  0%   { top: -100%; opacity: 1; }
  80%  { top: 100%;  opacity: 1; }
  100% { top: 100%;  opacity: 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  .nav-links { display: none; }
  section { padding: 80px 24px; }
  #hero { padding: 100px 24px 60px; }
  .origin-grid { grid-template-columns: 1fr; }
  .eco-grid { grid-template-columns: 1fr 1fr; }
  footer { padding: 48px 24px 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .slogan-use { display: none; }
  .origin-story { padding: 36px 28px; }
}
@media (max-width: 600px) {
  .eco-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .origin-card { padding: 32px 28px; }
}
