/* ============================================================
   SERENA Wellbeing — Hoja de estilos principal
   Enfoque: Mobile First · Cross-browser · Accesible
   Paleta de marca SERENA
   ============================================================ */

/* ---------- 1. Variables de marca ---------- */
:root {
  --pine:        #1B2A22;
  --forest:      #1E3D30;
  --green:       #2C5A45;
  --sage:        #84B59F;
  --sage-light:  #AFC0A8;
  --mint:        #CFE3DD;
  --cream:       #E7F0EC;
  --bone:        #F4F6F1;
  --line:        #E1E8DD;
  --gray:        #5E6F65;
  --ink:         #33463C;
  --white:       #FFFFFF;

  --font: "Lato", "Segoe UI", Roboto, "Helvetica Neue", Arial,
          "Noto Sans", sans-serif;

  --maxw: 1140px;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(27, 42, 34, 0.08);
  --transition: 220ms ease;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px; /* compensa header fijo al navegar por anclas */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--forest); }

h1, h2, h3 {
  color: var(--pine);
  line-height: 1.22;
  margin: 0 0 .5em;
  font-weight: 900;
  letter-spacing: -0.01em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; font-weight: 700; }

p  { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; color: var(--pine); }

/* Accesibilidad: foco visible en todos los navegadores */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: #fff;
  padding: 12px 18px;
  z-index: 999;
}
.skip:focus { left: 8px; top: 8px; color: #fff; }

/* ---------- 3. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.narrow { max-width: 760px; }
.center { text-align: center; }

.section { padding: 56px 0; }
.section-bone { background: var(--bone); }
.section-dark { background: var(--forest); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark strong { color: var(--white); }

.kicker {
  font-size: .72rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 6px;
}
.kicker-light { color: var(--sage); }

.sub-h { font-size: 1.05rem; margin-bottom: .8rem; }

/* ---------- 4. Header ---------- */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 42, 34, 0.97);
  border-bottom: 1px solid rgba(132, 181, 159, .22);
}
/* Mejora progresiva: sólo si el navegador soporta blur */
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .site-header {
    background: rgba(27, 42, 34, 0.82);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
  }
}

.header-inner {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 10px;
  color: var(--white);
}
.brand:hover { color: var(--mint); }
.brand-mark { width: 30px; height: 30px; color: var(--sage-light); flex-shrink: 0; }
.brand-text { display: block; line-height: 1.1; }
.brand-text strong {
  display: block;
  color: inherit;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 3px;
}
.brand-text small {
  display: block;
  font-size: .52rem;
  letter-spacing: 1.6px;
  color: var(--sage-light);
  margin-top: 2px;
}

/* Botón hamburguesa (sólo móvil) */
.nav-toggle {
  -webkit-appearance: none; appearance: none;
  background: transparent;
  border: 1px solid rgba(175, 192, 168, .45);
  border-radius: 8px;
  width: 42px; height: 38px;
  padding: 9px 9px;
  cursor: pointer;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
}
.nav-toggle .bar {
  display: block; height: 2px; width: 100%;
  background: var(--sage-light); border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Navegación móvil: oculta por defecto */
.nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--pine);
  border-bottom: 1px solid rgba(132, 181, 159, .25);
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}
.nav.open { max-height: 460px; }
.nav ul { padding: 8px 20px 18px; }
.nav li { border-bottom: 1px solid rgba(175, 192, 168, .14); }
.nav li:last-child { border-bottom: 0; }
.nav a {
  display: block;
  padding: 13px 2px;
  color: var(--cream);
  font-size: .95rem;
  font-weight: 400;
}
.nav a:hover { color: var(--sage); }
.nav-cta {
  margin-top: 10px;
  background: var(--sage);
  color: var(--pine) !important;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  padding: 12px 16px !important;
}
.nav-cta:hover { background: var(--mint); }

/* ---------- 5. Botones ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              transform var(--transition), border-color var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--forest); color: #fff; }
.btn-solid { background: var(--sage); color: var(--pine); }
.btn-solid:hover { background: var(--mint); color: var(--pine); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(207, 227, 221, .55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost-light { background: transparent; color: var(--cream); border-color: rgba(207,227,221,.5); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--pine);
  background: -webkit-linear-gradient(top, #172820 0%, #203E30 100%);
  background: linear-gradient(180deg, #172820 0%, #203E30 100%);
  color: var(--cream);
  padding: 64px 0 56px;
}
.hero-bg { position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; }
.hero-waves { width: 100%; height: 100%; opacity: .85; }
.hero-inner { position: relative; z-index: 2; }

.eyebrow {
  font-size: .68rem;
  letter-spacing: 2.8px;
  color: var(--sage-light);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 {
  color: var(--white);
  font-size: 2.1rem;
  margin-bottom: .4em;
}
.hero h1 em { color: var(--mint); font-style: normal; }
.hero-sub {
  color: var(--cream);
  font-size: 1rem;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(132, 181, 159, .6);
  display: inline-block;
  margin-bottom: 20px;
}
.hero-lead { color: var(--mint); font-size: 1rem; max-width: 620px; font-weight: 300; }

.hero-actions {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 12px;
  margin: 26px 0 24px;
}
.center-actions { -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
.hero-creds {
  font-size: .82rem;
  color: var(--sage-light);
  margin: 0;
  letter-spacing: .3px;
}

/* ---------- 7. Tipografía de contenido ---------- */
.highlight {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--green);
}
blockquote {
  margin: 20px 0 0;
  padding: 16px 20px;
  background: var(--white);
  border-left: 4px solid var(--sage);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--forest);
  box-shadow: var(--shadow);
}
.section-dark blockquote, .quote-light {
  background: rgba(255,255,255,.07);
  color: var(--cream);
  border-left-color: var(--sage);
  box-shadow: none;
}
.note {
  font-size: .9rem;
  color: var(--gray);
  background: rgba(132,181,159,.12);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.closing-note { color: var(--mint); font-style: italic; max-width: 640px; margin: 24px auto 0; }
.flow-note { color: var(--green); font-weight: 900; letter-spacing: 1.5px; margin-top: 26px; font-size: .9rem; }
.impact-intro { color: var(--mint); max-width: 640px; }

/* ---------- 8. Grids (móvil = 1 columna) ---------- */
.grid {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
/* Mejora progresiva a CSS Grid donde esté soportado */
@supports (display: grid) {
  .grid { display: grid; grid-template-columns: 1fr; }
}

/* Tarjetas de servicio */
.card {
  position: relative;
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-num {
  display: inline-block;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff;
  background: var(--green);
  border-radius: 6px;
  padding: 3px 9px;
  margin-bottom: 10px;
}
.card h3 { color: var(--green); margin-bottom: .35em; }
.card-lead { color: var(--pine); font-weight: 700; font-size: .95rem; margin-bottom: .5rem; }
.card-detail { color: var(--gray); font-size: .86rem; margin-bottom: .7rem; }
.card-tag {
  color: var(--green);
  font-weight: 700;
  font-size: .82rem;
  margin: 0;
}
.card-tag::before { content: "\25B8\00A0"; }

/* Pilares */
.pillar {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(175,192,168,.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.pillar h3 { color: var(--white); }
.pillar p { color: var(--mint); font-size: .92rem; margin: 0; }

/* Pasos */
.steps {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 4px 14px;
}
.step-num {
  -ms-flex-negative: 0; flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--sage-light);
  font-weight: 900;
  font-size: .88rem;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.step h3 { margin: 0; font-size: 1.02rem; }
.step p { margin: 0; color: var(--gray); font-size: .88rem; width: 100%; padding-left: 56px; }

/* Stats */
.stat {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(175,192,168,.22);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
}
.stat-big {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--mint);
  letter-spacing: -0.5px;
}
.stat-label {
  display: block;
  font-size: .68rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-top: 4px;
}

/* Necesidades / venta consultiva */
.need {
  background: var(--bone);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.need-q { color: var(--pine); font-weight: 700; font-size: .96rem; margin-bottom: .3rem; }
.need-a { color: var(--green); font-weight: 700; font-size: .88rem; margin: 0; }
.need-a::before { content: "\2192\00A0"; }

/* Fases */
.phase {
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.phase-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: 1.8px;
  color: var(--green);
  margin-bottom: 8px;
}
.phase h3 { color: var(--forest); margin-bottom: .2em; }
.phase-time { color: var(--green); font-weight: 700; font-size: .85rem; margin-bottom: .5rem; }
.phase p:last-child { color: var(--gray); font-size: .9rem; margin: 0; }

/* Listas con viñeta sage */
.ticks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage);
}
.ticks strong { display: block; color: var(--forest); font-size: .96rem; }
.ticks span { display: block; color: var(--gray); font-size: .86rem; }

/* Chips */
.chips {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.chips li {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--green);
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
}

.role { color: var(--green); font-weight: 700; margin-top: -.3rem; }

/* Dos columnas (móvil = apiladas) */
.two-col {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 34px;
}

/* ---------- 9. CTA final ---------- */
.section-cta {
  background: var(--forest);
  background: -webkit-linear-gradient(top, #1E3D30 0%, #172820 100%);
  background: linear-gradient(180deg, #1E3D30 0%, #172820 100%);
  color: var(--cream);
  padding: 62px 0;
}
.section-cta h2 { color: var(--white); }
.cta-lead { color: var(--mint); max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-mail {
  color: var(--sage-light);
  font-weight: 700;
  font-size: .95rem;
  margin: 8px 0 0;
  word-break: break-word;
}

/* ---------- 10. Footer ---------- */
.site-footer {
  background: var(--pine);
  color: var(--sage-light);
  padding: 34px 0;
  text-align: center;
}
.footer-brand { color: var(--white); font-size: .98rem; margin-bottom: 6px; }
.footer-brand strong { color: var(--white); letter-spacing: 2px; }
.footer-meta { font-size: .86rem; margin-bottom: 4px; }
.footer-meta a { color: var(--mint); }
.footer-meta a:hover { color: var(--white); }
.footer-legal { font-size: .74rem; color: var(--gray); margin: 14px 0 0; }

/* ============================================================
   11. BREAKPOINTS — Mobile First (se amplía hacia arriba)
   ============================================================ */

/* --- Tablet vertical: 600px --- */
@media screen and (min-width: 600px) {
  .wrap { padding-left: 28px; padding-right: 28px; }
  .section { padding: 68px 0; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.95rem; }
  .hero { padding: 84px 0 72px; }
  .hero h1 { font-size: 2.7rem; }
  .hero-sub { font-size: 1.1rem; }
  .hero-lead { font-size: 1.05rem; }

  .hero-actions {
    -webkit-box-orient: horizontal; -webkit-box-direction: normal;
    -ms-flex-direction: row; flex-direction: row;
    -ms-flex-wrap: wrap; flex-wrap: wrap;
  }
  .center-actions { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }

  @supports (display: grid) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
  }
  .stat-big { font-size: 1.6rem; }
}

/* --- Tablet horizontal / laptop: 900px --- */
@media screen and (min-width: 900px) {
  html { scroll-padding-top: 84px; }
  .section { padding: 86px 0; }
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  .hero { padding: 108px 0 92px; }
  .hero h1 { font-size: 3.3rem; }

  /* Navegación de escritorio */
  .nav-toggle { display: none; }
  .nav {
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
    width: auto;
  }
  .nav ul {
    display: -webkit-box; display: -ms-flexbox; display: flex;
    -webkit-box-align: center; -ms-flex-align: center; align-items: center;
    gap: 22px;
    padding: 0;
  }
  .nav li { border: 0; }
  .nav a { padding: 6px 0; font-size: .88rem; }
  .nav-cta { margin-top: 0; padding: 10px 18px !important; font-size: .84rem; }

  @supports (display: grid) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
  }

  .two-col {
    -webkit-box-orient: horizontal; -webkit-box-direction: normal;
    -ms-flex-direction: row; flex-direction: row;
    gap: 52px;
  }
  .two-col .col { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }

  /* Pasos en fila horizontal */
  .steps {
    -webkit-box-orient: horizontal; -webkit-box-direction: normal;
    -ms-flex-direction: row; flex-direction: row;
  }
  .step {
    -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
    -webkit-box-orient: vertical; -webkit-box-direction: normal;
    -ms-flex-direction: column; flex-direction: column;
    text-align: center;
    padding: 24px 14px;
  }
  .step p { padding-left: 0; text-align: center; }
  .step h3 { margin-top: 8px; }

  .stat-big { font-size: 1.75rem; }
  .hero-creds { font-size: .9rem; }
}

/* --- Escritorio amplio: 1200px --- */
@media screen and (min-width: 1200px) {
  .hero h1 { font-size: 3.6rem; }
  .section { padding: 96px 0; }
}

/* ---------- 12. Accesibilidad y preferencias ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .card:hover { transform: none; }
}

/* Aparición suave al hacer scroll (se activa por JS) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
/* Si no hay JS, todo se muestra normalmente */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 13. Impresión ---------- */
@media print {
  .site-header, .nav, .hero-actions, .nav-toggle { display: none !important; }
  body { color: #000; background: #fff; }
  .section-dark, .section-cta, .hero { background: #fff !important; color: #000 !important; }
  .section-dark h2, .section-cta h2, .hero h1 { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
