/* Groumind · sitio web — port del candidato Claude Design (Sitio Web Groumind / Groumind.dc.html)
   Sin versión visible (documento comercial, §12 del AGENT_PROTOCOL); el versionado vive en git.
   Tokens embebidos desde brand/tokens.css y tokens-light.css (el deploy publica solo este folder). */

/* ---------- Fuentes (self-hosted) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/SpaceGrotesk-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/SpaceGrotesk-700.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/IBMPlexSans-var.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IBMPlexMono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/IBMPlexMono-500.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --accent: #2EC98A;        /* Verde Mente */
  --accent-deep: #1B9E6E;   /* Verde Profundo */
  --accent-surface: #173023;
  --bg: #0C100E;            /* Verde Noche */
  --raised: #141C18;        /* Carbón */
  --card: #1B241F;          /* Pizarra */
  --border: #2A332D;
  --border-sub: #1B241F;
  --text: #ECF1ED;
  --text-2: #9AA8A0;
  --muted: #67756C;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}
/* Secciones claras — valores de tokens-light.css */
.section--light {
  --bg: #F6F8F5;
  --raised: #FFFFFF;
  --card: #FFFFFF;
  --border: #C7CEC8;
  --border-sub: #E9EDE8;
  --text: #0C100E;
  --text-2: #48544C;
  --muted: #808E86;
  --accent: #1B9E6E;        /* verde profundo sobre claro */
}
.section--light-alt {
  --bg: #EDEEED;
  --border-sub: #D9DED9;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: #0C100E;
  color: #ECF1ED;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
::selection { background: rgba(46, 201, 138, .28); color: #ECF1ED; }
img { max-width: 100%; display: block; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #0C100E; padding: 10px 18px;
  font-family: var(--font-body); font-weight: 600; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: 1120px; margin: 0 auto; padding-left: clamp(20px, 5vw, 40px); padding-right: clamp(20px, 5vw, 40px); }

/* ---------- Tipografía ---------- */
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 5.4vw, 58px); line-height: 1.04; letter-spacing: -.028em; color: var(--text);
}
h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 4.6vw, 46px); line-height: 1.12; letter-spacing: -.02em; color: var(--text);
}
h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 20px; letter-spacing: -.01em; color: var(--text);
}
.lead { font-size: clamp(17px, 2.1vw, 20px); line-height: 1.6; color: var(--text-2); }
.body { font-size: clamp(16px, 2vw, 18px); line-height: 1.65; color: var(--text-2); }
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px;
}
.eyebrow-accent { color: var(--accent); }
.max-16ch { max-width: 16ch; }
.max-20ch { max-width: 20ch; }
.max-44ch { max-width: 44ch; margin-left: auto; margin-right: auto; }
.max-56ch { max-width: 56ch; }
.max-60ch { max-width: 60ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #0C100E;
  font-family: var(--font-body); font-weight: 600;
  border-radius: 11px; box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset;
  transition: background .18s ease, transform .12s ease;
}
.btn:hover { background: #25B87A; color: #0C100E; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-sm { font-size: 13px; padding: 9px 16px; border-radius: 8px; }
.btn-lg { font-size: 16px; height: 54px; padding: 0 30px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 16, 14, .72);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border-sub);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; }
.brand-wordmark { height: 22px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav-link {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-2);
}
.nav-link:hover { color: var(--text); }

/* ---------- Secciones ---------- */
.section { background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border-sub); }
.section > .container { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); }
section[id] { scroll-margin-top: 72px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--bg); border-bottom: 1px solid var(--border-sub); overflow: hidden; }
.hero-field { position: absolute; inset: 0; opacity: .9; pointer-events: none; }
.hero-svg { position: absolute; right: -4%; top: 0; height: 100%; width: min(70%, 780px); }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 34%, rgba(12, 16, 14, .4) 62%, rgba(12, 16, 14, 0) 100%); }
.hero-inner { position: relative; padding-top: clamp(44px, 6vw, 76px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero-copy { max-width: 660px; }
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-copy .lead { margin-top: 24px; max-width: 52ch; }
.hero-cta { margin-top: 38px; }

/* ---------- Problema ---------- */
.sources-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px; margin-top: 48px;
}
.source-card { border: 1px dashed var(--border); border-radius: 12px; padding: 20px; background: var(--raised); }
.source-dots { display: flex; gap: 5px; margin-bottom: 16px; }
.source-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.source-dots span:nth-child(2) { opacity: .5; }
.source-dots span:nth-child(3) { opacity: .25; }
.source-name { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--text-2); }
.section .body { margin-top: 32px; }
.beat { margin-top: 56px; border-left: 3px solid var(--accent); padding: 8px 0 8px 28px; }
.beat p {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 4.4vw, 44px); line-height: 1.16; letter-spacing: -.02em;
  color: var(--text); max-width: 22ch;
}
.beat .accent { color: var(--accent); }

/* ---------- Cerebro ---------- */
.cerebro-cols {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px); align-items: center;
}
.cerebro-cols .body { margin-top: 26px; }
.cerebro-svg { width: 100%; height: auto; display: block; }

/* ---------- Bento (qué incluye) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 48px; }
.bento-card {
  grid-column: span 5;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: clamp(22px, 2.6vw, 30px);
}
.bento-card h3 { margin-top: 0; }
.bento-card p { font-size: 15px; line-height: 1.6; color: var(--text-2); margin-top: 10px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.card-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.card-num--accent { color: #2EC98A; }
.card-icon {
  width: 34px; height: 34px; border-radius: 9px; background: #EAF0EC;
  display: inline-flex; align-items: center; justify-content: center; color: #2A332D;
}
.card-icon--dark { background: #173023; color: #2EC98A; }

.bento-card--feature {
  grid-column: span 7; grid-row: span 2;
  background: #0C100E; border-color: var(--accent);
  display: flex; flex-direction: column; min-height: 280px;
  position: relative; overflow: hidden;
  padding: clamp(24px, 3vw, 36px);
}
.bento-card--feature .card-head { margin-bottom: auto; }
.bento-deco { position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; opacity: .5; pointer-events: none; }
.bento-deco svg { width: 100%; height: 100%; }
.bento-feature-body { margin-top: clamp(40px, 6vw, 72px); }
.bento-feature-body h3 { font-size: clamp(22px, 2.6vw, 28px); color: #ECF1ED; }
.bento-feature-body p { font-size: 16px; color: #9AA8A0; margin-top: 12px; max-width: 42ch; }

.bento-card--wide {
  grid-column: span 12;
  display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap;
}
.bento-wide-copy { flex: 1; min-width: 240px; }
.bento-wide-copy .card-head { margin-bottom: 16px; }
.bento-wide-svg { width: min(280px, 100%); height: auto; }

/* ---------- Cómo arrancamos ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 44px; }
.step-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.step-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.step-text { font-weight: 500; font-size: 16px; line-height: 1.5; color: var(--text); margin-top: 12px; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 44px; max-width: 780px; display: grid; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 14px; }
.faq-q { font-weight: 600; font-size: 16px; line-height: 1.45; color: var(--text); }
.faq-chevron { flex-shrink: 0; color: var(--muted); transition: transform .25s ease; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-a {
  padding: 0 24px 22px; font-size: 15px; line-height: 1.65;
  color: var(--text-2); max-width: 62ch;
}
.faq-a ul { margin: 10px 0; padding-left: 20px; display: grid; gap: 8px; }
.faq-a p + p { margin-top: 10px; }
.faq-a strong { color: var(--text); font-weight: 600; }

/* ---------- Cierre ---------- */
.cierre { position: relative; overflow: hidden; border-bottom: none; }
.cierre-field {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: .6;
}
.cierre-svg { width: min(90%, 720px); height: auto; }
.cierre-inner { position: relative; text-align: center; padding-top: clamp(72px, 10vw, 120px); padding-bottom: clamp(72px, 10vw, 120px); }
.cierre h2 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.08; letter-spacing: -.025em; margin-left: auto; margin-right: auto; }
.cierre .lead { margin: 22px auto 0; }
.cierre .hero-cta { margin-top: 38px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--border-sub); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 26px;
}
.footer-wordmark { height: 18px; width: auto; opacity: .75; }

/* ---------- Animaciones ---------- */
@keyframes gm-drift  { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(0, -9px); } }
@keyframes gm-driftB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(7px, 7px); } }
@keyframes gm-driftC { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6px, 6px); } }
@keyframes gm-pulse  { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .12; transform: scale(1.35); } }
@keyframes gm-flow   { to { stroke-dashoffset: -52; } }

.drift-a { animation: gm-drift 11s ease-in-out infinite; }
.drift-b { animation: gm-driftB 13s ease-in-out infinite; }
.drift-c { animation: gm-driftC 12s ease-in-out infinite; }
.pulse { transform-box: fill-box; transform-origin: center; animation: gm-pulse 4.5s ease-in-out infinite; }
.flow { animation: gm-flow 2.6s linear infinite; }

/* Reveal al hacer scroll — el estado oculto lo aplica app.js (sin JS todo queda visible) */
.reveal-init { opacity: 0; transform: translateY(20px); }
.reveal-in {
  opacity: 1; transform: none;
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-link { display: none; }
  .cerebro-cols { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento-card, .bento-card--feature, .bento-card--wide { grid-column: auto; grid-row: auto; }
  .hero-svg { opacity: .55; }
  .hero-fade { background: linear-gradient(90deg, var(--bg) 46%, rgba(12, 16, 14, .55) 74%, rgba(12, 16, 14, .2) 100%); }
}
