/* PyME OS · main.css · v7 brandkit AAA · 2026-05-05
 * Single source of truth para tokens · sin estilos inline en HTML.
 */

/* ── Tokens light (default) ── */
:root {
  --color-primary: #1d1d1f;
  --color-blue: #0066cc;
  --color-green: #00a550;
  --color-red: #d93025;
  --color-bg: #f5f5f7;
  --color-surface: #ffffff;
  --color-muted: #86868b;
  --color-border: #e5e5e7;
  --color-text-secondary: #424245;
  --color-on-blue: #ffffff;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Monaco, Consolas, monospace;

  --radius-card: 20px;
  --radius-card-lg: 24px;
  --radius-pill: 980px;

  --shadow-soft: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);

  --max-content: 1100px;
  --pad-section: clamp(64px, 8vw, 120px);
}

[data-theme="dark"] {
  --color-primary: #f5f5f7;
  --color-bg: #0a0a0f;
  --color-surface: #111118;
  --color-muted: #86868b;
  --color-border: #1a1a24;
  --color-text-secondary: #a1a1a6;
  --shadow-soft: 0 1px 3px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.35);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.45);
}

/* ── Reset + base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ── Containers ── */
.container { width: 100%; max-width: var(--max-content); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--pad-section) 0; }

/* ── Typography ── */
.h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.lead {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}
.metric {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.01em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-blue); color: var(--color-on-blue); }
.btn-primary:hover { background: #0052a3; }
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-bg); }

/* ── Hero ── */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: var(--color-surface);
  padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
}
.hero-bg-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, var(--color-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.hero h1 { margin-bottom: 24px; }
.hero .lead { max-width: 720px; margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Section 2 · Pilares ── */
.pilares { background: var(--color-bg); }
.pilares-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.pilares-head h2 { margin-bottom: 16px; }
.pilares-head .lead { font-size: clamp(15px, 1.3vw, 18px); }
.pilares-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.pilar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pilar:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.pilar-icon {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue);
}
.pilar-icon svg { width: 24px; height: 24px; stroke-width: 1.5; }
.pilar h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
}
.pilar p { font-size: 15px; line-height: 1.55; color: var(--color-text-secondary); }

/* ── Section 3 · Cómo funciona ── */
.como-funciona { background: var(--color-surface); }
.como-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.como-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.paso { display: flex; flex-direction: column; gap: 14px; }
.paso-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-blue);
}
.paso h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
}
.paso p { font-size: 15px; line-height: 1.55; color: var(--color-text-secondary); }

/* ── Section 4 · Caso de uso ── */
.caso-uso {
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.caso-card {
  background: var(--color-surface);
  border-radius: var(--radius-card-lg);
  padding: 56px 48px;
  max-width: 880px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
}
.caso-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 24px;
}
.caso-quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  margin-bottom: 28px;
}
.caso-attribution {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}
.caso-metricas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--color-border);
  padding-top: 32px;
}
.caso-metricas .metric { color: var(--color-blue); margin-bottom: 8px; }
.caso-metricas .metric-label { font-size: 13px; color: var(--color-text-secondary); line-height: 1.4; }

/* ── Section 5 · Diagnóstico ── */
.diagnostico {
  background: var(--color-blue);
  color: #ffffff;
  text-align: center;
}
.diagnostico h2 {
  color: #ffffff;
  margin-bottom: 20px;
}
.diagnostico .lead { color: rgba(255,255,255,0.9); margin: 0 auto 36px; max-width: 640px; }
.diagnostico .btn-on-blue {
  background: #ffffff;
  color: var(--color-blue);
}
.diagnostico .btn-on-blue:hover { background: #f5f5f7; }

/* ── Section 6 · North teaser ── */
.north {
  background: var(--color-bg);
  text-align: center;
}
.north-block {
  max-width: 720px;
  margin: 0 auto;
}
.north-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 14px;
}
.north h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.north p { font-size: 16px; line-height: 1.6; color: var(--color-text-secondary); margin-bottom: 24px; }
.north-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-blue);
  border-bottom: 1px solid var(--color-blue);
  padding-bottom: 2px;
  transition: opacity 0.15s ease;
}
.north-cta:hover { opacity: 0.7; }

/* ── Section 7 · FAQ ── */
.faq { background: var(--color-surface); }
.faq-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  color: var(--color-primary);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.faq-q:hover { color: var(--color-blue); }
.faq-q .faq-chevron {
  width: 20px; height: 20px; flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[data-open="true"] .faq-q .faq-chevron { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s ease;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}
.faq-item[data-open="true"] .faq-a {
  max-height: 600px;
  padding: 0 0 22px;
}

/* ── Section 8 · CTA final + footer ── */
.cta-final {
  background: #1d1d1f;
  color: #f5f5f7;
  text-align: center;
}
.cta-final h2 {
  color: #ffffff;
  margin-bottom: 16px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.cta-final .lead { color: rgba(245,245,247,0.7); max-width: 640px; margin: 0 auto 40px; }
.cta-final-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-final .btn-on-dark { background: #ffffff; color: #1d1d1f; }
.cta-final .btn-on-dark:hover { background: #f5f5f7; }
.cta-final .btn-on-dark-ghost {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.2);
}
.cta-final .btn-on-dark-ghost:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.4); }

.footer {
  background: #1d1d1f;
  color: rgba(245,245,247,0.6);
  padding: 64px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(245,245,247,0.5);
  margin-bottom: 14px;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 8px;
}
.footer-brand-desc { font-size: 14px; line-height: 1.5; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(245,245,247,0.7); transition: color 0.15s; }
.footer-links a:hover { color: #ffffff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  font-size: 13px;
  color: rgba(245,245,247,0.4);
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pilares-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .como-grid { grid-template-columns: 1fr; gap: 40px; }
  .caso-card { padding: 36px 28px; }
  .caso-metricas { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .pilares-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .paso-num { font-size: 60px; }
  .cta-final-actions { flex-direction: column; }
  .cta-final-actions .btn { justify-content: center; }
}

/* ── Theme toggle button ── */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease;
}
.theme-toggle:hover { transform: scale(1.05); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── Skip-link a11y ── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--color-blue);
  color: var(--color-on-blue);
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 200;
}
.skip-link:focus { top: 8px; }

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { min-height: 85vh; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
  .theme-toggle { top: 16px; right: 16px; width: 40px; height: 40px; }
}
