/* Klip — la web. Fondo blanco, el color de Klip solo en los detalles.
   Los colores salen de lib/core/klip_colors.dart: si cambian alli,
   cambian aqui. */

@font-face { font-family: Inter; src: url(fonts/Inter-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --purple: #6050FE;
  --purple-tint: #EEEDFE;
  --lime: #C3FF00;
  --text: #1A1A1A;
  --text-2: #5C5C5C;
  --text-3: #999999;
  --border: #E2E2E2;
  --soft: #F7F7F8;
  --red: #EB4D4D;
  --max: 1120px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Cabecera ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .btn { color: #fff; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px; border-radius: 24px;
  font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: #4F3FF0; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }

/* ---------- Portada ---------- */
.hero { padding: 88px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--purple); margin-bottom: 16px;
}
h1 { font-size: 56px; line-height: 1.08; letter-spacing: -.035em; margin: 0 0 20px; font-weight: 700; }
h1 .mark { position: relative; white-space: nowrap; }
/* El lima es ilegible sobre blanco: aqui va DEBAJO del texto, como subrayado. */
h1 .mark::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 4px; height: 12px;
  background: var(--lime); z-index: -1; border-radius: 2px;
}
.lead { font-size: 20px; color: var(--text-2); margin: 0 0 32px; max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 14px; color: var(--text-3); }

/* El movil: marco fino y sombra en dos capas (contacto + ambiente). */
.phone {
  width: 100%; max-width: 300px; margin: 0 auto;
  border-radius: 36px; padding: 10px; background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(20,20,40,.06), 0 30px 60px -20px rgba(20,20,40,.18);
}
.phone img { border-radius: 27px; width: 100%; aspect-ratio: 1280 / 2772; object-fit: cover; object-position: top; background: var(--soft); }

/* ---------- Secciones ---------- */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2 { font-size: 38px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 700; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 8px; font-weight: 600; }
.muted { color: var(--text-2); }
.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* Bloque de funcion: texto a un lado, movil al otro, alternando. */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.feature + .feature { margin-top: 112px; }
.feature.flip .feature-text { order: 2; }
.feature-text p { color: var(--text-2); margin: 0 0 20px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 32px; margin-bottom: 12px; color: var(--text); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--purple-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.5' fill='none' stroke='%236050FE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}

/* Rejilla de tarjetas pequenas */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border: 1px solid var(--border); border-radius: 16px; padding: 28px; background: #fff; }
.card p { margin: 0; color: var(--text-2); font-size: 16px; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--purple-tint);
  display: grid; place-items: center; margin-bottom: 20px;
}
.icon svg { width: 22px; height: 22px; stroke: var(--purple); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Planes ---------- */
.billing-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 24px; padding: 4px; margin-top: 8px; }
.billing-toggle button {
  border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: var(--text-2);
  height: 38px; padding: 0 18px; border-radius: 20px; cursor: pointer;
}
.billing-toggle button[aria-pressed="true"] { background: var(--purple); color: #fff; }
.billing-toggle .save { font-size: 12px; opacity: .85; margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.plan .tag { font-size: 12px; font-weight: 600; color: var(--purple); background: var(--purple-tint); border-radius: 12px; padding: 3px 10px; align-self: flex-start; margin-bottom: 12px; }
.plan h3 { margin-bottom: 4px; }
.price { font-size: 36px; font-weight: 700; letter-spacing: -.03em; margin: 12px 0 0; }
.price small { font-size: 15px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.price-note { font-size: 14px; color: var(--text-3); min-height: 22px; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; font-size: 15px; }
.plan li { padding: 8px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; }
.plan li span:last-child { font-weight: 600; text-align: right; }
.plan .btn { margin-top: auto; }

/* ---------- Cierre ---------- */
.closing { text-align: center; }
.closing .box { border: 1px solid var(--border); border-radius: 24px; padding: 64px 32px; }

/* ---------- Pie ---------- */
footer { border-top: 1px solid var(--border); padding: 48px 0 40px; font-size: 15px; }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 0 0 12px; font-weight: 600; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; }
footer a { color: var(--text-2); }
footer .fine { grid-column: 1 / -1; color: var(--text-3); font-size: 14px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ---------- Paginas de texto (privacidad, terminos...) ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 64px var(--gutter) 96px; }
.doc h1 { font-size: 42px; }
.doc .updated { color: var(--text-3); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 24px; margin: 48px 0 12px; letter-spacing: -.02em; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { color: #333; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-weight: 600; color: var(--text-2); }
.callout { border-left: 3px solid var(--purple); background: var(--soft); padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 24px 0; }
.callout p { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 18px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--purple-tint); color: var(--purple); font-weight: 700; font-size: 14px; display: grid; place-items: center;
}

/* ---------- Movil ---------- */
@media (max-width: 960px) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .hero { padding: 48px 0 24px; }
  .hero .wrap, .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .feature-text { order: 0; }
  .feature + .feature { margin-top: 80px; }
  h1 { font-size: 40px; }
  .doc h1 { font-size: 34px; }
  h2 { font-size: 30px; }
  .lead { font-size: 18px; }
  section { padding: 64px 0; }
  .phone { max-width: 260px; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  footer .wrap > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .plans, .grid { grid-template-columns: 1fr; }
  .closing .box { padding: 48px 20px; }
  .doc table { font-size: 14px; }
}
