/* =============================================
   HAPPY BRAIN EXPLAINER — Shared Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --green:       #1A5C45;
  --green-light: #2D7A5F;
  --green-pale:  #EAF4EF;
  --warm:        #F7F4EE;
  --accent:      #E07B3F;
  --text:        #1A1A1A;
  --muted:       #666666;
  --border:      #E0DDD7;
  --white:       #FFFFFF;
  --radius:      12px;
  --max-w:       720px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

/* ---- TYPOGRAPHY ---- */
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
p  { color: var(--text); }

/* ---- LAYOUT ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 64px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ---- NAV ---- */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo span {
  font-weight: 400;
  color: var(--muted);
}

/* ---- HERO ---- */
.hero {
  background: var(--green);
  color: var(--white);
  padding: 80px 0 72px;
  border-top: none;
}

.hero h1 { color: var(--white); margin-bottom: 20px; }

.hero .subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

/* ---- PAIN LIST ---- */
.pain-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.pain-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 1rem;
}

.pain-list li::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- SECTION LABEL ---- */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

/* ---- CAPAS / LADDER ---- */
.capas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.capa {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.capa::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--green);
}

.capa.c2::before { background: var(--green-light); }
.capa.c3::before { background: var(--accent); }

.capa-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.capa-num {
  background: var(--green-pale);
  color: var(--green);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 100px;
}

.capa.c2 .capa-num { background: #EAF4EF; color: var(--green-light); }
.capa.c3 .capa-num { background: #FEF0E6; color: var(--accent); }

.capa h3 { margin: 0; }

.capa p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.capa-fit {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

/* ---- CALLOUT ---- */
.callout {
  background: var(--green-pale);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
}

.callout.accent {
  background: #FEF0E6;
  border-left-color: var(--accent);
}

.callout p {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}

.callout strong { color: var(--green); }
.callout.accent strong { color: var(--accent); }

/* ---- CREDIBILIDAD ---- */
.credibilidad {
  background: var(--warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 32px;
}

.credibilidad-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.credibilidad p {
  font-size: 0.97rem;
  color: var(--text);
}

/* ---- CTA ---- */
.cta-section {
  background: var(--green);
  color: var(--white);
  text-align: center;
  padding: 72px 0;
  border-top: none;
}

.cta-section h2 { color: var(--white); margin-bottom: 16px; }

.cta-section p {
  color: rgba(255,255,255,0.8);
  max-width: 480px;
  margin: 0 auto 36px;
}

.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-primary {
  background: var(--white);
  color: var(--green);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

/* ---- FOOTER ---- */
footer {
  background: var(--warm);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

footer p {
  font-size: 0.88rem;
  color: var(--muted);
}

footer a {
  color: var(--green);
  text-decoration: none;
}

/* ---- INDEX HUB ---- */
.hub-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.hub-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  background: var(--white);
}

.hub-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.hub-card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.hub-card h3 { margin-bottom: 8px; }

.hub-card p {
  font-size: 0.95rem;
  color: var(--muted);
}

.hub-card .hub-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  section { padding: 48px 0; }
  .hub-cards { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 52px; }
}
