/* ============================================================
   ClickOH — sistema de diseño compartido
   Dirección: Modern minimal (Linear / Vercel)
   ============================================================ */

:root {
  /* Neutrales */
  --bg:      oklch(99% 0.002 240);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(97.5% 0.003 250);
  --fg:      oklch(18% 0.012 250);
  --muted:   oklch(54% 0.012 250);
  --faint:   oklch(66% 0.01 250);
  --border:  oklch(92% 0.005 250);
  --border-strong: oklch(86% 0.008 250);

  /* Acento primario + secundario de dominio */
  --accent:      oklch(58% 0.18 255);
  --accent-ink:  oklch(46% 0.17 255);
  --accent-soft: oklch(96% 0.03 255);
  --accent-2:    oklch(72% 0.13 215);

  /* Estado */
  --success: oklch(63% 0.15 150);
  --warn:    oklch(75% 0.14 75);
  --danger:  oklch(60% 0.19 25);

  /* Tipografía */
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'SF Mono', 'JetBrains Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;

  /* Espaciado / radios / sombras */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 16px -4px rgba(16, 24, 40, 0.10), 0 2px 6px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 60px -18px rgba(16, 24, 40, 0.22), 0 8px 24px -12px rgba(16, 24, 40, 0.14);
  --shadow-window: 0 40px 90px -30px rgba(21, 34, 66, 0.42), 0 12px 40px -18px rgba(21, 34, 66, 0.24);

  --maxw: 1140px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.022em; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.1rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); letter-spacing: -0.015em; }
p  { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--muted); max-width: 56ch; line-height: 1.55; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 9vw, 118px); }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 14px; }

.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; }
.section-head .eyebrow { display: block; margin-bottom: 16px; }
.section-head p { margin-top: 16px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding-inline: 22px;
  border-radius: 11px; border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 550; letter-spacing: -0.01em;
  transition: transform .14s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.14); }
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--faint); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-quiet { background: transparent; color: var(--fg); padding-inline: 6px; height: auto; }
.btn-quiet:hover { color: var(--accent-ink); }
.btn-lg { height: 52px; padding-inline: 28px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.arrow-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; color: var(--accent-ink); }
.arrow-link svg { width: 16px; height: 16px; transition: transform .18s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: border-color .2s ease, background .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 12px; border-radius: 8px; font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color .15s ease, background .15s ease; }
.nav-link:hover { color: var(--fg); background: var(--surface-2); }
.nav-link.active { color: var(--fg); }
.nav-cta { display: flex; align-items: center; gap: 10px; margin-left: 8px; }

/* Logo — el artwork original (con la mascota) va encima; el contorno de
   contraste (drop-shadow) hace de "borde" medianamente grueso para que el
   wordmark blanco se lea sobre cualquier fondo. */
.logo { display: inline-flex; align-items: center; }
.logo-lockup { display: block; width: auto; height: 28px; }
.footer .logo-lockup { height: 30px; }
.logo-lockup.on-light {
  filter:
    drop-shadow(1px 0 0 #c4c9d2) drop-shadow(-1px 0 0 #c4c9d2)
    drop-shadow(0 1px 0 #c4c9d2) drop-shadow(0 -1px 0 #c4c9d2)
    drop-shadow(1px 1px 0 #c4c9d2) drop-shadow(-1px 1px 0 #c4c9d2)
    drop-shadow(1px -1px 0 #c4c9d2) drop-shadow(-1px -1px 0 #c4c9d2);
}
.logo-lockup.on-dark {
  filter:
    drop-shadow(1px 0 0 rgba(255,255,255,.95)) drop-shadow(-1px 0 0 rgba(255,255,255,.95))
    drop-shadow(0 1px 0 rgba(255,255,255,.95)) drop-shadow(0 -1px 0 rgba(255,255,255,.95))
    drop-shadow(1px 1px 0 rgba(255,255,255,.95)) drop-shadow(-1px 1px 0 rgba(255,255,255,.95))
    drop-shadow(1px -1px 0 rgba(255,255,255,.95)) drop-shadow(-1px -1px 0 rgba(255,255,255,.95));
}

.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding-inline: 12px 14px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 22%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; font-weight: 500; }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-success { background: color-mix(in oklab, var(--success) 14%, white); color: color-mix(in oklab, var(--success) 72%, black); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 18px; }
.card .ic svg { width: 21px; height: 21px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface-2); padding-block: 60px 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h4 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer-col a { display: block; padding: 5px 0; font-size: 0.92rem; color: var(--muted); transition: color .15s ease; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--faint); }
.footer-bottom .socials { display: flex; gap: 8px; }
.footer-bottom .socials a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.footer-bottom .socials a:hover { border-color: var(--faint); color: var(--fg); }
.footer-bottom .socials svg { width: 16px; height: 16px; }

/* ============================================================
   App window mockup (hero flourish)
   ============================================================ */
.window {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-window);
}
.window-bar { display: flex; align-items: center; gap: 14px; height: 42px; padding-inline: 15px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.window-bar .lights { display: flex; gap: 7px; }
.window-bar .lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.window-bar .addr { flex: 1; height: 24px; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; gap: 7px; padding-inline: 10px; font-size: 0.72rem; color: var(--faint); font-family: var(--font-mono); }
.window-body { display: grid; grid-template-columns: 232px 1fr; min-height: 380px; }

.app-side { background: var(--surface-2); border-right: 1px solid var(--border); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.app-side .side-title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 4px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.86rem; color: var(--muted); }
.side-item svg { width: 16px; height: 16px; }
.side-item.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); font-weight: 550; }
.side-item .kbd { margin-left: auto; font-family: var(--font-mono); font-size: 0.66rem; color: var(--faint); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

.app-main { display: flex; flex-direction: column; }
.chat-log { flex: 1; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 82%; padding: 11px 14px; border-radius: 13px; font-size: 0.88rem; line-height: 1.5; }
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--fg); }
.bubble.ai .who { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 600; color: var(--accent-ink); margin-bottom: 5px; }
.bubble.ai .who span { width: 15px; height: 15px; border-radius: 5px; background: var(--accent); display: inline-block; }
.type-caret::after { content: '▍'; color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.chat-input { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.chat-input .field { flex: 1; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; padding-inline: 12px; font-size: 0.82rem; color: var(--faint); }
.chat-input .send { width: 38px; height: 38px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.chat-input .send svg { width: 17px; height: 17px; }

/* Glow detrás de la ventana — único flourish de color */
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -8% 4% 12% 4%;
  background: radial-gradient(60% 60% at 30% 20%, color-mix(in oklab, var(--accent) 32%, transparent), transparent 70%),
              radial-gradient(50% 60% at 85% 90%, color-mix(in oklab, var(--accent-2) 30%, transparent), transparent 72%);
  filter: blur(46px); opacity: .55; z-index: -1;
}

/* ---------- Utilidades ---------- */
.divider { height: 1px; background: var(--border); border: 0; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px 16px 18px; box-shadow: var(--shadow-md);
  }
  .nav-links.open .nav-cta { flex-direction: column; align-items: stretch; margin: 8px 0 0; }
  .nav-links.open .nav-cta .btn { width: 100%; justify-content: center; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .window-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  h1 { font-size: clamp(2.2rem, 9vw, 2.9rem); }
  .hero-visual::before { filter: blur(34px); }
}

/* ---------- Precios ---------- */
.pricing-head { text-align: center; max-width: 660px; margin-inline: auto; }
.pricing-head .lead { margin-inline: auto; }

.billing-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 28px auto 0; padding: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px;
}
.billing-toggle button {
  border: 0; background: transparent; color: var(--muted);
  height: 40px; padding-inline: 22px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 550; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 9px;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.billing-toggle button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.billing-toggle .save {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.03em;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 999px;
}

.price-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 50px; align-items: start;
}
.price-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px 26px;
  display: flex; flex-direction: column; gap: 18px; height: 100%;
  box-shadow: var(--shadow-sm);
}
.price-card.featured {
  position: relative;
  border-color: color-mix(in oklab, var(--accent) 42%, var(--border));
  box-shadow: var(--shadow-lg);
}
.price-card.featured::before {
  content: "Más elegido";
  position: absolute; top: -12px; left: 26px;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 4px 12px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.pc-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; }
.pc-desc { color: var(--muted); font-size: 0.92rem; margin-top: 5px; }
.pc-price { display: flex; align-items: baseline; gap: 4px; }
.pc-cur { font-size: 1.35rem; font-weight: 600; color: var(--fg); }
.pc-amount { font-size: 3rem; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.pc-per { color: var(--muted); font-size: 0.98rem; font-weight: 500; }
.pc-billing { color: var(--faint); font-size: 0.82rem; margin-top: -10px; }
.pc-credits {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent-ink); font-size: 0.9rem; font-weight: 500;
}
.pc-credits svg { width: 20px; height: 20px; flex: none; }
.pc-credits b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pc-features { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.pc-features li { display: flex; gap: 10px; font-size: 0.91rem; color: var(--fg); line-height: 1.4; }
.pc-features li svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 2px; }
.pc-features li.disc svg { color: var(--success); }
.price-card .btn { margin-top: auto; }

/* Pago por uso */
.payg {
  margin-top: 22px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; align-items: center;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 32px 34px; box-shadow: var(--shadow-sm);
}
.payg h3 { margin-top: 12px; }
.payg-info p { margin-top: 10px; max-width: 44ch; }
.payg-label { display: block; font-size: 0.8rem; font-weight: 550; color: var(--muted); margin-bottom: 8px; }
.payg-row { display: flex; gap: 12px; align-items: stretch; }
.payg-select {
  flex: 1; height: 54px; padding: 0 42px 0 16px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
  font-family: inherit; font-size: 0.95rem; font-weight: 500; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7488' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.payg-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.payg-price {
  display: inline-flex; align-items: baseline; gap: 2px; padding: 0 20px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 650; font-variant-numeric: tabular-nums;
}
.payg-price .pc-cur { font-size: 1.05rem; }
.payg-price span:last-child { font-size: 1.55rem; letter-spacing: -0.02em; }
.payg .btn { margin-top: 16px; }

@media (max-width: 900px) {
  .price-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .price-card.featured { order: -1; }
  .payg { grid-template-columns: 1fr; gap: 22px; padding: 28px 24px; }
}
