/* ═══════════════════════════════════════════════════════════
   Dilo — landing. Dirección: "la página es un dictado".
   Tinta + mango, terminal-editorial, dark-first.
   ═══════════════════════════════════════════════════════════ */

@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/SpaceGrotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/SpaceGrotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/JetBrainsMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/JetBrainsMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #0d1117;
  --ink-2: #131a23;
  --ink-3: #1b2430;
  --papel: #f7f2ea;
  --papel-dim: rgba(247, 242, 234, 0.68);
  --papel-faint: rgba(247, 242, 234, 0.42);
  --mango: #ff9e1b;
  --mango-soft: rgba(255, 158, 27, 0.14);
  --menta: #2ee6a8;
  --rojo: #ff5c5c;
  --line: rgba(247, 242, 234, 0.1);
  --display: "Space Grotesk", "Inter", sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 158, 27, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(46, 230, 168, 0.05), transparent 55%),
    var(--ink);
  color: var(--papel);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grano sutil encima de todo */
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

::selection { background: var(--mango); color: var(--ink); }

a { color: var(--menta); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

kbd {
  font-family: var(--mono); font-size: 0.78em; color: var(--papel);
  background: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 3px;
  border-radius: 7px; padding: 0.18em 0.55em; white-space: nowrap;
}
code { font-family: var(--mono); font-size: 0.88em; color: var(--mango); background: var(--mango-soft); padding: 0.12em 0.4em; border-radius: 6px; }

/* ── caret de marca ── */
.caret { color: var(--mango); animation: blink 1.15s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .wave i { animation: none !important; height: 30% !important; }
}

/* ── topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 24px;
  background: rgba(13, 17, 23, 0.94);
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.03em;
  color: var(--papel);
}
.wordmark:hover { text-decoration: none; }
.topnav { display: flex; gap: 22px; font-family: var(--mono); font-size: 0.82rem; }
.topnav a { color: var(--papel-dim); }
.topnav a:hover { color: var(--mango); text-decoration: none; }
.topnav .gh { color: var(--papel); }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0 0; }

/* ── hero ── */
.hero { padding-top: 72px; }
.kicker {
  font-family: var(--mono); font-size: 0.85rem; color: var(--papel-faint);
  margin-bottom: 26px;
}
.kicker::before { content: ""; }
.k-flag { color: var(--menta); }
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 7.2vw, 5.2rem);
  line-height: 1.02; letter-spacing: -0.035em;
}
.h1-line { display: block; animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.h1-line:nth-child(2) { animation-delay: 0.08s; }
.h1-say {
  display: block; color: var(--mango); animation: rise 0.7s 0.16s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.caret-big { font-size: 0.86em; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.sub {
  max-width: 620px; margin-top: 28px; color: var(--papel-dim); font-size: 1.08rem;
  animation: rise 0.7s 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sub strong { color: var(--papel); font-weight: 500; }
.sub em { color: var(--menta); font-style: normal; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; animation: rise 0.7s 0.34s both; }
.btn {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em;
  padding: 15px 28px; border-radius: 12px; display: inline-block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--mango); color: var(--ink);
  box-shadow: 0 8px 30px rgba(255, 158, 27, 0.25);
}
.btn-primary:hover { box-shadow: 0 12px 38px rgba(255, 158, 27, 0.4); }
.btn-ghost { color: var(--papel); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--papel-dim); }
.cta-note { font-family: var(--mono); font-size: 0.78rem; color: var(--papel-faint); margin-top: 16px; animation: rise 0.7s 0.4s both; }

/* ── demo ── */
.demo {
  margin-top: 58px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--ink-2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  animation: rise 0.8s 0.5s both;
}
.demo-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--ink-3);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.demo-title { font-family: var(--mono); font-size: 0.75rem; color: var(--papel-faint); margin-left: 10px; }
.demo-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--papel-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  transition: border-color 0.25s, color 0.25s;
}
.demo-pill.rec { border-color: var(--rojo); color: var(--papel); }
.pill-mic { width: 8px; height: 8px; border-radius: 50%; background: var(--papel-faint); transition: background 0.25s; }
.demo-pill.rec .pill-mic { background: var(--rojo); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.demo-body { padding: 30px 26px 34px; min-height: 150px; }
.wave { display: flex; align-items: center; gap: 4px; height: 44px; margin-bottom: 22px; opacity: 0.25; transition: opacity 0.3s; }
.wave.on { opacity: 1; }
.wave i {
  flex: 1; max-width: 14px; height: 20%; border-radius: 3px; background: var(--menta);
}
.wave.on i { animation: wavebar 0.9s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: 0.12s; background: var(--mango); }
.wave i:nth-child(4n) { animation-delay: 0.24s; }
.wave i:nth-child(5n) { animation-delay: 0.31s; }
.wave i:nth-child(7n) { animation-delay: 0.45s; background: var(--mango); }
@keyframes wavebar { 0%, 100% { height: 14%; } 50% { height: 92%; } }

.demo-line { font-family: var(--mono); font-size: clamp(0.85rem, 2vw, 1.02rem); color: var(--papel); min-height: 3.2em; }
.demo-prompt { color: var(--mango); font-weight: 500; }
.caret-demo { font-size: 1em; }

/* ── títulos de sección ── */
h2 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.025em;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: 38px;
}
.h2-hash { color: var(--mango); margin-right: 10px; font-family: var(--mono); font-weight: 400; font-size: 0.85em; }

/* ── pasos ── */
.steps-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps-grid li {
  border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px 28px;
  background: linear-gradient(180deg, rgba(247, 242, 234, 0.025), transparent);
  position: relative; overflow: hidden;
}
.steps-grid li:nth-child(2) { transform: translateY(18px); }
.step-n {
  font-family: var(--mono); color: var(--mango); font-size: 0.8rem;
  display: block; margin-bottom: 14px;
}
.steps-grid h3 { font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.steps-grid p { color: var(--papel-dim); font-size: 0.95rem; }

/* ── flow ── */
.flow-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(255, 158, 27, 0.45); transform: translateY(-3px); }
.card h3 { font-family: var(--display); font-size: 1.25rem; letter-spacing: -0.015em; margin-bottom: 8px; }
.card p { color: var(--papel-dim); font-size: 0.95rem; }

/* ── privacidad ── */
.privacy { text-align: left; }
.privacy-big {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 5vw, 3.3rem); line-height: 1.12;
}
.hl { color: var(--menta); }
.privacy-list { list-style: none; margin-top: 34px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 40px; max-width: 860px; }
.privacy-list li { color: var(--papel-dim); font-size: 1rem; }
.tick { color: var(--menta); font-family: var(--mono); margin-right: 10px; }

/* ── modelos ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 720px; }
th, td { text-align: left; padding: 14px 18px; }
thead th {
  font-family: var(--mono); font-weight: 500; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--papel-faint); border-bottom: 1px solid var(--line);
}
tbody tr { border-bottom: 1px solid rgba(247, 242, 234, 0.05); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(247, 242, 234, 0.03); }
tbody td:first-child { font-family: var(--display); font-weight: 500; }
tr.rec td { background: var(--mango-soft); }
.badge {
  font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink); background: var(--mango); border-radius: 999px; padding: 3px 9px; margin-left: 8px;
  vertical-align: 2px;
}
.models-note { font-family: var(--mono); font-size: 0.8rem; color: var(--papel-faint); margin-top: 14px; }

/* ── faq ── */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 0;
  font-family: var(--display); font-weight: 500; font-size: 1.12rem; letter-spacing: -0.01em;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--mango); font-size: 1.3rem; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--papel-dim); padding: 0 0 22px; max-width: 760px; }

/* ── cta final ── */
.cta-final { text-align: center; padding-bottom: 20px; }
.cta-big {
  font-size: clamp(2rem, 5.5vw, 3.6rem); margin-bottom: 8px;
}
.cta-final .kicker { margin-bottom: 18px; }
.cta-final .cta-row { justify-content: center; margin-top: 26px; }

/* ── footer ── */
footer {
  max-width: var(--maxw); margin: 90px auto 0; padding: 40px 24px 56px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem; color: var(--papel-dim);
  display: grid; gap: 10px;
}
.wordmark-sm { font-size: 1.15rem; }
.foot-links { font-family: var(--mono); font-size: 0.8rem; }
.foot-made { color: var(--papel-faint); font-size: 0.82rem; }

/* ── responsive ── */
@media (max-width: 820px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid li:nth-child(2) { transform: none; }
  .flow-grid { grid-template-columns: 1fr; }
  .privacy-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topnav a:not(.gh) { display: none; }
  section { padding-top: 64px; }
  .hero { padding-top: 40px; }
  .demo-title { display: none; }
}
