/* Kime AI — landing
   Paleta tomada del logo (Logo Kime AI.pdf). */
:root {
  --bg: #08090b;
  --surface: #0e1211;
  --surface-2: #131918;
  --border: #1d2625;
  --text: #eef2f1;
  --text-muted: #9aa5a2;
  --mint: #2dd4a0;
  --mint-ink: #08090b;
  --mint-soft: rgba(45, 212, 160, 0.12);
  --bubble-in: #1a2220;
  --bubble-out: #12372c;

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --font-jp: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;

  /* Bermellón del sello (hanko): acento japonés, usar con moderación. */
  --shu: #e0503a;

  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 1160px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 780px; }
.accent { color: var(--mint); }
.muted { color: var(--text-muted); }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.04em; }
.brand-sm .wordmark { font-size: 1.2rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--mint); color: var(--mint-ink); box-shadow: 0 8px 30px -8px rgba(45, 212, 160, .55); }
.btn-primary:hover { box-shadow: 0 10px 38px -6px rgba(45, 212, 160, .7); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--mint); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1.08rem; }
.wa-icon { width: 20px; height: 20px; flex: none; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8, 9, 11, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: .95rem; color: var(--text-muted); }
.nav a:hover { color: var(--text); }

/* ---------- Etiquetas mono ---------- */
.eyebrow, .kicker {
  font-family: var(--font-mono);
  font-size: .85rem;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.kicker { color: var(--mint); margin-bottom: 14px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 0 rgba(45, 212, 160, .6);
  animation: pulse 2.2s infinite;
}
.cursor { margin-left: -6px; color: var(--mint); animation: blink 1.1s steps(1) infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(45, 212, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(45, 212, 160, 0); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 380px at 78% 30%, rgba(45, 212, 160, .13), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; }
.lead { margin-top: 22px; font-size: 1.15rem; color: var(--text-muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: .92rem; color: var(--text-muted); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: ""; width: 16px; height: 16px; flex: none;
  background: var(--mint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Teléfono / chat ---------- */
.phone-wrap { position: relative; justify-self: center; width: 100%; max-width: 400px; }
/* Ensō: círculo de pincel zen, trazado incompleto */
.enso {
  position: absolute; z-index: 0; pointer-events: none;
  width: 135%; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-62deg);
  overflow: visible;
}
.enso circle {
  fill: none; stroke: var(--mint); stroke-opacity: .22; stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 86 14;
  animation: enso-draw 2.4s cubic-bezier(.6, 0, .2, 1) both;
}
@keyframes enso-draw { from { stroke-dasharray: 0 100; } }
.kanji-mark {
  position: absolute; z-index: 0; right: -78px; top: -10px;
  writing-mode: vertical-rl;
  font-family: var(--font-jp); font-weight: 700; font-size: 7rem; line-height: 1;
  color: rgba(238, 242, 241, .05);
  pointer-events: none; user-select: none;
}
.phone {
  position: relative; z-index: 1;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 8px rgba(255, 255, 255, .02);
}
.phone-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--mint); }
.phone-name { font-weight: 700; font-size: .98rem; line-height: 1.2; }
.phone-status { font-family: var(--font-mono); font-size: .75rem; color: var(--mint); }

.chat { display: flex; flex-direction: column; gap: 10px; padding: 20px 16px 22px; min-height: 470px; }
.msg {
  max-width: 85%; padding: 10px 13px;
  border-radius: 14px;
  font-size: .9rem; line-height: 1.45;
}
.msg.in { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--bubble-out); border-top-right-radius: 4px; }
.msg b { color: var(--mint); font-weight: 700; }
.msg.system {
  align-self: center; max-width: none;
  padding: 6px 12px; border-radius: 999px;
  background: var(--mint-soft); color: var(--mint);
  font-family: var(--font-mono); font-size: .75rem;
}
.quote { display: flex; flex-direction: column; gap: 4px; min-width: 240px; font-size: .84rem; }
.quote-title { font-family: var(--font-mono); font-size: .72rem; color: var(--mint); margin-bottom: 4px; }
.quote .row { display: flex; justify-content: space-between; gap: 16px; color: #c9d3d0; }
.quote .row span:last-child { font-variant-numeric: tabular-nums; }
.quote .total { margin-top: 4px; padding-top: 6px; border-top: 1px dashed rgba(238, 242, 241, .2); color: var(--text); font-weight: 700; }

.typing { align-self: flex-end; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--bubble-out); border-radius: 14px; border-top-right-radius: 4px; }
.typing.in { align-self: flex-start; background: var(--bubble-in); border-top-right-radius: 14px; border-top-left-radius: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* La animación solo se activa con JS; sin JS se ve la conversación completa. */
.chat.is-animated .msg:not(.is-visible) { display: none; }
.chat.is-animated .msg.is-visible,
.typing { animation: msg-in .35s ease both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 800; max-width: 22em; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; counter-reset: step; }
.step { position: relative; overflow: hidden; padding: 26px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step-kanji {
  position: absolute; top: 10px; right: 18px;
  font-family: var(--font-jp); font-weight: 500; font-size: 4rem; line-height: 1;
  color: rgba(45, 212, 160, .16);
  transition: color .3s ease;
}
.step:hover .step-kanji { color: rgba(45, 212, 160, .4); }
.step-num { display: inline-block; font-family: var(--font-mono); font-size: .8rem; color: var(--mint); padding: 4px 10px; border-radius: 999px; background: var(--mint-soft); margin-bottom: 18px; }
.step h3 { font-size: 1.15rem; margin-bottom: 10px; }
.step p { color: var(--text-muted); font-size: .95rem; }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.card { padding: 28px 26px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: .97rem; }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.case { padding: 28px 26px; background: var(--bg); transition: background .2s ease; }
.case:hover { background: var(--surface); }
.case h3 { font-size: 1.1rem; margin-bottom: 8px; }
.case h3::before { content: "› "; color: var(--mint); font-family: var(--font-mono); }
.case p { color: var(--text-muted); font-size: .95rem; }

/* ---------- El nombre ---------- */
.meaning { position: relative; padding: 0; }
.meaning-grid {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center;
  padding: 56px 48px;
  border-block: 1px solid var(--border);
}
.meaning-glyph { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.meaning-kanji {
  writing-mode: vertical-rl;
  font-family: var(--font-jp); font-weight: 700; font-size: 6.5rem; line-height: 1;
  color: var(--text);
}
.meaning-romaji { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .3em; color: var(--mint); }
.meaning h2 em, .meaning .lead em { font-style: normal; color: var(--mint); }
.meaning .hanko { position: absolute; right: 32px; bottom: 28px; }

/* Hanko: sello bermellón */
.hanko {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 2px solid var(--shu); border-radius: 6px;
  color: var(--shu);
  font-family: var(--font-jp); font-weight: 700; font-size: 1.6rem; line-height: 1;
  transform: rotate(-6deg);
  opacity: .9;
  box-shadow: inset 0 0 0 2px rgba(224, 80, 58, .15);
}
.hanko-corner { position: absolute; top: 24px; right: 24px; }

/* ---------- FAQ ---------- */
.faq { margin-top: 40px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border);
  font-family: var(--font-mono); color: var(--mint); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 46px 24px 0; color: var(--text-muted); }

/* ---------- CTA final ---------- */
.cta-band {
  position: relative; overflow: hidden;
  padding: 72px 32px; text-align: center;
  border: 1px solid var(--border); border-radius: 32px;
  background: radial-gradient(520px 260px at 50% 0%, rgba(45, 212, 160, .16), transparent 70%), var(--surface);
}
/* Seigaiha (olas del mar azul) en la parte baja, desvanecido hacia arriba */
.cta-band::before {
  content: ""; position: absolute; inset: 40% 0 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 40 20'%3E%3Cdefs%3E%3Cg id='w'%3E%3Ccircle r='19'/%3E%3Ccircle r='13.5'/%3E%3Ccircle r='8'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='%230e1211' stroke='%232dd4a0' stroke-opacity='.35' stroke-width='1'%3E%3Cuse href='%23w' x='20' y='-10'/%3E%3Cuse href='%23w' x='-20' y='-10'/%3E%3Cuse href='%23w' x='60' y='-10'/%3E%3Cuse href='%23w' x='0' y='0'/%3E%3Cuse href='%23w' x='40' y='0'/%3E%3Cuse href='%23w' x='-20' y='10'/%3E%3Cuse href='%23w' x='20' y='10'/%3E%3Cuse href='%23w' x='60' y='10'/%3E%3Cuse href='%23w' x='0' y='20'/%3E%3Cuse href='%23w' x='40' y='20'/%3E%3Cuse href='%23w' x='20' y='30'/%3E%3C/g%3E%3C/svg%3E") repeat;
  -webkit-mask: linear-gradient(to top, rgba(0,0,0,.55), transparent);
          mask: linear-gradient(to top, rgba(0,0,0,.55), transparent);
}
.cta-band > * { position: relative; }
.cta-band > .hanko-corner { position: absolute; }
.cta-band h2 { margin: 0 auto; }
.cta-band .lead { margin: 18px auto 34px; }

/* ---------- Pie ---------- */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; flex-wrap: wrap; font-size: .9rem; }
.footer-brand { display: grid; gap: 10px; }
.footer-contact { display: grid; gap: 4px; font-style: normal; }
.footer-label, .footer-meta { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; }
.footer-label { color: var(--mint); margin-bottom: 4px; }
.footer-meta { display: grid; gap: 6px; text-align: right; }
.site-footer a:not(.brand), .cta-alt a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.site-footer a:not(.brand):hover, .cta-alt a:hover { color: var(--mint); text-decoration-color: var(--mint); }
.cta-alt { margin-top: 18px; font-size: .95rem; }

/* ---------- Páginas legales ---------- */
.legal { padding: 64px 0 96px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; margin-bottom: 8px; }
.legal h2 { font-size: 1.25rem; font-weight: 700; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--text-muted); line-height: 1.7; }
.legal p + p { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 1.4em; display: grid; gap: 6px; margin-top: 8px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--mint); }

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: 1fr; }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .kanji-mark { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-meta { text-align: left; }
  .legal { padding: 40px 0 64px; }
  .nav { display: none; }
  .header-inner { justify-content: space-between; height: 60px; }
  .wordmark { font-size: 1.3rem; }
  .hero { padding: 44px 0 64px; }
  .lead { font-size: 1.05rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .section { padding: 64px 0; }
  .steps, .cases { grid-template-columns: 1fr; }
  .chat { min-height: 440px; }
  .cta-band { padding: 52px 20px; border-radius: 24px; }
  .faq details p { padding-right: 0; }
  .enso { width: 118%; }
  .meaning-grid { grid-template-columns: 1fr; gap: 28px; padding: 44px 4px; }
  .meaning-kanji { writing-mode: horizontal-tb; font-size: 4.5rem; }
  .meaning-glyph { align-items: flex-start; }
  .meaning .hanko { top: 44px; bottom: auto; right: 4px; }
  .hanko-corner { top: 16px; right: 16px; width: 38px; height: 38px; font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
