/* ════════════════════════════════════════
   COOPORIGEN · Ecosistema Digital — Hub
   ════════════════════════════════════════ */

:root {
  --verde-oscuro: #102824;
  --verde-mas-oscuro: #0a1f1d;
  --verde-medio: #315C55;
  --verde-claro: #E8F0EE;
  --dorado: #FAC569;
  --dorado-hover: #f0b84a;
  --dorado-soft: rgba(250, 197, 105, 0.14);
  --blanco: #ffffff;
  --texto-suave: rgba(255,255,255,0.72);
  --texto-muy-suave: rgba(255,255,255,0.5);
  --borde: rgba(255,255,255,0.10);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Sora', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--verde-mas-oscuro);
  color: var(--blanco);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ═══ REVEAL ANIMATION ═══ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,.84,.44,1), transform .8s cubic-bezier(.16,.84,.44,1);
  transition-delay: var(--d, 0s);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ═══════ HEADER ═══════ */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 20px 0;
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease;
}
.header.scrolled {
  background: rgba(10, 31, 29, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: 12px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--borde);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--blanco);
  padding: 4px;
  object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}
.brand-sub {
  font-size: 10.5px;
  color: var(--texto-muy-suave);
  letter-spacing: 0.4px;
}

.nav { display: flex; gap: 32px; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--texto-suave);
  position: relative;
  padding: 6px 0;
  transition: color .25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--dorado); }
.nav-link.active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--dorado); border-radius: 2px;
}

.header-tag {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--texto-suave);
  border: 1px solid var(--borde);
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
}
.header-tag .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.05); }
}

/* ═══════ HERO ═══════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 140px 32px 80px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  filter: saturate(0.9) contrast(1.05);
  transform: scale(1.04);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 900px 600px at 78% 12%, rgba(250,197,105,0.16) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10,20,18,0.55) 0%, rgba(10,25,22,0.72) 45%, rgba(9,22,20,0.94) 80%, #0a1917 100%),
    linear-gradient(90deg, rgba(8,20,18,0.75) 0%, rgba(8,20,18,0.25) 45%, rgba(8,20,18,0.6) 100%);
}
#particles { position: absolute; inset: 0; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 1.6px;
  color: var(--dorado);
  background: var(--dorado-soft);
  border: 1px solid rgba(250,197,105,0.3);
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dorado);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 6.2vw, 72px);
  line-height: 1.06;
  letter-spacing: -1px;
  margin: 0 0 24px;
}
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(120deg, var(--dorado) 20%, #fff3d6 50%, var(--dorado) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 17px;
  color: var(--texto-suave);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-cta { display: flex; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  transition: transform .3s cubic-bezier(.16,.84,.44,1), box-shadow .3s ease, background .3s ease;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s ease; }
.btn-gold {
  background: linear-gradient(135deg, var(--dorado), var(--dorado-hover));
  color: var(--verde-oscuro);
  box-shadow: 0 8px 28px rgba(250, 197, 105, 0.28);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(250, 197, 105, 0.4);
}
.btn-gold:hover svg { transform: translateX(3px); }

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--texto-muy-suave);
  font-size: 11px;
  letter-spacing: 1px;
}
.scroll-cue-mouse {
  width: 24px; height: 38px;
  border: 1.5px solid var(--texto-muy-suave);
  border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px;
}
.scroll-cue-wheel {
  width: 4px; height: 8px; border-radius: 2px;
  background: var(--dorado);
  animation: scrollwheel 1.8s ease infinite;
}
@keyframes scrollwheel {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0; transform: translateY(10px); }
}

/* ═══════ MOSAICO ═══════ */
.mosaic {
  position: relative;
  background: var(--verde-mas-oscuro);
  padding: 0 0 64px;
}
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  height: 340px;
}
.mosaic-item { position: relative; overflow: hidden; }
.mosaic-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.35) sepia(0.35) saturate(1.4) hue-rotate(70deg) brightness(0.62) contrast(1.05);
  transform: scale(1.08);
  transition: transform 1.2s cubic-bezier(.16,.84,.44,1), filter .6s ease;
}
.mosaic-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,25,22,0.15) 0%, rgba(10,25,22,0.55) 100%);
  mix-blend-mode: multiply;
}
.mosaic-item:hover img {
  transform: scale(1.16);
  filter: grayscale(0.15) sepia(0.35) saturate(1.5) hue-rotate(70deg) brightness(0.72) contrast(1.05);
}
.mosaic-caption {
  max-width: 640px;
  margin: 40px auto 0;
  text-align: center;
  padding: 0 32px;
}
.mosaic-caption p {
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
  color: var(--texto-suave);
  line-height: 1.6;
}

/* ═══════ SISTEMAS ═══════ */
.systems {
  position: relative;
  background: var(--verde-oscuro);
  padding: 100px 32px 90px;
}
.systems::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 800px 500px at 15% 0%, rgba(49,92,85,0.35) 0%, transparent 55%);
  pointer-events: none;
}
.systems-head {
  position: relative;
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  color: var(--dorado); margin-bottom: 14px;
}
.systems-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 0 0 16px;
  font-weight: 700;
}
.systems-head p {
  color: var(--texto-suave);
  font-size: 15.5px;
  line-height: 1.7;
}

.systems-grid {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 1100px) {
  .systems-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .systems-grid { grid-template-columns: 1fr; }
}

.sys-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  border: 1px solid var(--borde);
  border-radius: 20px;
  padding: 30px 26px 26px;
  backdrop-filter: blur(6px);
  transition: transform .1s linear, border-color .35s ease, box-shadow .35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.sys-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(250,197,105,0.5), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.sys-card:hover {
  border-color: rgba(250,197,105,0.35);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35);
}
.sys-card:hover::before { opacity: 1; }

.sys-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--dorado-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--dorado);
  margin-bottom: 22px;
}
.sys-icon svg { width: 26px; height: 26px; }

.sys-kicker {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px;
  color: var(--texto-muy-suave);
  margin-bottom: 8px;
}
.sys-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.sys-card p {
  font-size: 13.5px;
  color: var(--texto-suave);
  line-height: 1.65;
  margin: 0 0 26px;
  min-height: 66px;
}

.sys-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600;
  color: var(--verde-oscuro);
  background: var(--dorado);
  padding: 10px 18px;
  border-radius: 100px;
  border: none;
  transition: background .25s ease, transform .25s ease, gap .25s ease;
}
.sys-btn svg { width: 15px; height: 15px; }
.sys-btn:hover { background: var(--dorado-hover); gap: 11px; }

.sys-card--soon { opacity: 0.82; }
.sys-card--soon .sys-icon { background: rgba(255,255,255,0.06); color: var(--texto-muy-suave); }
.soon-badge {
  position: absolute; top: 22px; right: 22px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  color: #ffd27a;
  background: rgba(250,197,105,0.12);
  border: 1px solid rgba(250,197,105,0.3);
  padding: 5px 11px;
  border-radius: 100px;
}
.sys-btn--disabled {
  background: rgba(255,255,255,0.08);
  color: var(--texto-suave);
}
.sys-btn--disabled:hover { background: rgba(255,255,255,0.13); gap: 8px; }

/* ═══════ BRAND STRIP ═══════ */
.brand-strip {
  background: var(--verde-mas-oscuro);
  border-top: 1px solid var(--borde);
  border-bottom: 1px solid var(--borde);
  padding: 30px 32px;
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.brand-strip-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500;
  color: var(--texto-suave);
}
.brand-strip-item svg { width: 18px; height: 18px; color: var(--dorado); flex-shrink: 0; }

/* ═══════ FOOTER ═══════ */
.footer { background: var(--verde-mas-oscuro); padding: 48px 32px 32px; }
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--borde);
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 9px; background: #fff; padding: 4px; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.footer-tagline { font-size: 12.5px; color: var(--texto-muy-suave); margin-top: 2px; font-style: italic; }
.footer-links {
  display: flex; flex-direction: column; gap: 10px;
  justify-self: end;
  font-size: 13.5px;
}
.footer-links a { color: var(--texto-suave); transition: color .25s ease; }
.footer-links a:hover { color: var(--dorado); }
.footer-links-soon { color: var(--texto-muy-suave); }
.footer-copy {
  max-width: 1240px; margin: 20px auto 0;
  font-size: 12px; color: var(--texto-muy-suave);
  text-align: center;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-self: start; }
  .nav { display: none; }
  .header-tag span { display: none; }
}

/* ═══════ TOAST ═══════ */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translate(-50%, 20px);
  z-index: 1000;
  display: flex; align-items: center; gap: 12px;
  background: rgba(16, 40, 36, 0.96);
  border: 1px solid rgba(250,197,105,0.3);
  color: var(--blanco);
  padding: 16px 22px;
  border-radius: 14px;
  max-width: 420px;
  font-size: 13.5px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast svg { width: 22px; height: 22px; color: var(--dorado); flex-shrink: 0; }
