/* ============================================================
   GRUPO SUMMUM — summum-system.css
   Estilos compartidos por todas las webs del grupo.

   - Importa `colors_and_type.css` PRIMERO en el HTML.
   - Esta hoja sólo define componentes (nav, hero, cards,
     footer, etc) usando los tokens.
   ============================================================ */

/* ============ NAV / HEADER ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
          backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}
.nav-links a {
  padding: 9px 15px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.008em;
  border-radius: var(--radius-pill);
  color: var(--fg);
  transition: background 160ms ease, color 160ms ease;
}
.nav-links a:hover  { background: var(--paper-soft); color: var(--accent-deep, var(--accent)); }
.nav-links a.active { background: var(--fg); color: var(--inv); }
.has-megamenu .megamenu-trigger { font-size: 14.5px; font-weight: 500; letter-spacing: -0.008em; }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---- Mobile hamburger (hidden on desktop; shown < 900px) ---- */
.mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  cursor: pointer; background: none; border: 0; padding: 0;
  position: relative; z-index: 110;
}
.mobile-toggle span {
  width: 21px; height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: transform 250ms ease, opacity 250ms ease;
}
.nav.mobile-open .mobile-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.mobile-open .mobile-toggle span:nth-child(2) { opacity: 0; }
.nav.mobile-open .mobile-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ BRAND WORDMARK (la firma del grupo) ============ */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  text-decoration: none;
  color: inherit;
  line-height: 1;
  width: fit-content;
}
.brand .wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.005em;
  line-height: 1;
  color: var(--fg);
  display: inline-flex;
  align-items: baseline;
}
.brand .wordmark .u { font-style: italic; display: inline-block; will-change: color; }
.brand .wordmark .u-a { animation: brand-u-a 5.2s infinite ease-in-out; }
.brand .wordmark .u-b { animation: brand-u-b 5.2s infinite ease-in-out; }
@keyframes brand-u-a {
  0%, 45%   { color: var(--accent);  }
  50%, 95%  { color: var(--fg);      }
  100%      { color: var(--accent);  }
}
@keyframes brand-u-b {
  0%, 45%   { color: var(--fg);      }
  50%, 95%  { color: var(--accent);  }
  100%      { color: var(--fg);      }
}
.brand .divider {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--accent);
  margin: 4px 0 3px;
  border: 0;
  border-radius: 1px;
  transform-origin: center;
  animation: brand-bar 5.2s infinite ease-in-out;
}
.brand-summum .brand .divider { background: var(--accent-grad); }
@keyframes brand-bar {
  0%, 45%   { transform: scaleX(1);    }
  50%, 95%  { transform: scaleX(0.55); }
  100%      { transform: scaleX(1);    }
}
.brand .tag-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.brand .tagline {
  font-family: var(--display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--accent);
  text-transform: lowercase;
  white-space: nowrap;
}

/* Dark variant (footer) */
.on-dark .brand .wordmark,
.footer .brand .wordmark { color: var(--inv); }
.on-dark .brand .tagline,
.footer .brand .tagline { color: var(--accent-on-dark, var(--accent)); }
.on-dark .brand .divider,
.footer .brand .divider { background: var(--accent-on-dark, var(--accent)); }
.on-dark .brand .wordmark .u-a,
.footer .brand .wordmark .u-a { animation-name: brand-u-a-dark; }
.on-dark .brand .wordmark .u-b,
.footer .brand .wordmark .u-b { animation-name: brand-u-b-dark; }
@keyframes brand-u-a-dark {
  0%, 45% { color: var(--accent-on-dark, var(--accent)); }
  50%, 95% { color: var(--inv); }
  100% { color: var(--accent-on-dark, var(--accent)); }
}
@keyframes brand-u-b-dark {
  0%, 45% { color: var(--inv); }
  50%, 95% { color: var(--accent-on-dark, var(--accent)); }
  100% { color: var(--inv); }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--fg);
  color: var(--inv);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.brand-summum .btn-accent { background: var(--accent-grad); color: #16140F; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--fg); }
.btn-ghost:hover { background: var(--paper-soft); }
.btn-large { padding: 18px 30px; font-size: 14px; }
.btn .arr { display: inline-block; transition: transform 220ms ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ============ LANG TOGGLE (segmented control) ============ */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 1px;
}
.lang-toggle button {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1;
  color: var(--fg-mute);
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.lang-toggle button:hover { color: var(--fg); }
.lang-toggle button.on {
  background: var(--paper);
  color: var(--accent-deep, var(--accent));
  box-shadow: 0 1px 2px rgba(10,10,10,0.10), 0 0 0 1px var(--line);
}
.brand-consultoria .lang-toggle button.on { color: var(--fg); }

/* ============ SECTIONS ============ */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-dark {
  background: var(--ink);
  color: var(--inv);
}
.section-dark .body { color: var(--inv-dim); }
.section-dark .eyebrow { color: var(--inv-mute); }

.section-head {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}

/* ============ HERO ============ */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero h1 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.92;
  font-size: clamp(64px, 9.5vw, 168px);
  margin: 0;
  max-width: 18ch;
}
.hero h1 .it {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--paper-soft);
  margin-bottom: 36px;
}
.hero-blob {
  display: inline-block;
  width: clamp(60px, 8vw, 132px);
  height: clamp(60px, 8vw, 132px);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, var(--paper-warm), var(--accent));
  vertical-align: middle;
  margin: 0 12px;
  transform: translateY(-8px);
  animation: float 6s ease-in-out infinite;
}
.brand-summum .hero-blob { background: var(--accent-grad); }
.hero-meta {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 60px;
  align-items: end;
}
.hero-body { font-size: 19px; line-height: 1.5; max-width: 50ch; }
.hero-values { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-values .v {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}
.hero-cta { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.hero-phone { font-family: var(--mono); font-size: 12px; color: var(--fg-mute); letter-spacing: 0.06em; }

/* Decorative circles (heritage from Marketing site — used sparingly elsewhere) */
.circle { position: absolute; border-radius: 50%; pointer-events: none; }
.circle.orange { background: var(--accent); }
.circle.yellow { background: var(--yellow); }
.circle.ring   { background: transparent; border: 1px solid var(--line-strong); }
.circle.ring-accent { background: transparent; border: 1px solid var(--accent); }

/* ============ METRICS BAND (sobre tinta) ============ */
.metrics { background: var(--ink); color: var(--inv); padding: 80px 0; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 64px; }
.metric { text-align: center; padding: 0 16px; }
.metric .v {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(56px, 7vw, 104px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.metric .v .u { color: var(--accent); font-weight: 500; font-size: 0.5em; margin-left: 0.06em; letter-spacing: 0; }
.metric .l {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--inv-mute); text-transform: uppercase;
  margin: 18px auto 0; max-width: 22ch;
}

/* ============ CARDS ============ */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 220ms ease, border-color 220ms ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card .num   { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--fg-mute); }
.card .title { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.card .desc  { font-size: 14px; line-height: 1.55; color: var(--fg-dim); margin: 0; }
.card .more  { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; margin-top: auto; }
.card.dark   { background: var(--ink); color: var(--inv); border-color: transparent; }
.card.dark .desc { color: var(--inv-dim); }
.card.dark .num  { color: var(--inv-mute); }
.card.warm   { background: var(--paper-warm); border-color: transparent; }
.card.accent { background: var(--accent); color: #fff; border-color: transparent; }
.card.accent .desc, .card.accent .num { color: rgba(255,255,255,0.9); }
.card.accent .more { color: #fff; }

/* ============ TAG / CHIP ============ */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--paper-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tag.dark { background: var(--inv-line); color: var(--inv-dim); }

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
}
.marquee-track {
  display: flex; gap: 64px; white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fg-dim);
  align-items: center;
}
.marquee-track .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-33.33%); } }

/* ============ FORMS ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-mute);
}
.field input, .field textarea, .field select {
  font: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 0;
  color: var(--fg);
  outline: none;
  transition: border-color 160ms ease;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
}
.field textarea { min-height: 100px; resize: vertical; }

/* ============ FOOTER ============ */
.footer { background: var(--ink); color: var(--inv); padding: 96px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 80px;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--inv-mute);
  margin: 0 0 20px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer ul a { color: var(--inv-dim); transition: color 160ms ease; }
.footer ul a:hover { color: var(--inv); }
.footer-tag { color: var(--inv-dim); font-size: 14px; line-height: 1.55; max-width: 320px; margin: 16px 0 0; }
.footer-bottom {
  border-top: 1px solid var(--inv-line);
  padding-top: 24px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 24px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--inv-mute);
}
.footer-bottom .legal-links { justify-self: end; display: inline-flex; gap: 10px; align-items: center; }
.footer-bottom .legal-links a { color: var(--inv-mute); }
.footer-bottom .legal-links a:hover { color: var(--accent-on-dark, var(--accent)); }
.footer-bottom .legal-links .sep { color: var(--inv-line); }
.footer-mark {
  font-family: var(--display);
  font-weight: 100;
  font-size: clamp(120px, 18vw, 280px);
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--inv);
  margin: 80px 0 60px;
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.footer-mark .it { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent-on-dark, var(--accent)); }

/* ============ MOTION ============ */
.float       { animation: float 7s  ease-in-out infinite; }
.float-slow  { animation: float 11s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-14px);} }
.pulse-dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity:1;} 50% { transform: scale(1.4); opacity:.5;} }
.reveal { opacity: 1; transform: none; transition: opacity 700ms ease, transform 700ms ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-inner { grid-template-columns: 1fr auto; gap: 16px; }
  .mobile-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h, 64px) 0 0 0;
    background: var(--paper);
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 28px var(--pad-x);
    gap: 2px;
    z-index: 95;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    overflow-y: auto;
  }
  .nav.mobile-open .nav-links { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a {
    font-family: var(--display);
    font-weight: 500;
    font-size: 26px;
    letter-spacing: -0.025em;
    padding: 16px 0;
    min-height: 44px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a.active { background: none; color: var(--accent-deep, var(--accent)); }
  .has-megamenu { width: 100%; }
  .has-megamenu .mm-caret { display: none; }
  .megamenu { display: none; }
  .nav-right { display: none; }
  .nav.mobile-open .nav-right {
    display: flex !important;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 96;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 20px var(--pad-x) 28px;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .nav.mobile-open .nav-right .lang-toggle { justify-content: center; }
  .nav.mobile-open .nav-right .lang-toggle button { min-width: 44px; min-height: 40px; }
  .nav.mobile-open .nav-right .btn { justify-content: center; padding: 16px 28px; min-height: 48px; }
  .section-head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-meta   { grid-template-columns: 1fr; gap: 24px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
