/* Larmind, sitio de presentación. Identidad "Lavanda" (tokens del sistema de diseño). */
@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --ground: #F3F1FA; --surface: #FFFFFF; --surface-2: #F2F0FA; --line: #E4E0F2;
  --ink: #1F1C33; --ink-muted: #67637E; --brand: #5B4FD9; --on-brand: #FFFFFF;
  --brand-soft: #ECE9FB; --today: #FFB84D; --success: #2E8B57;
  --bezel: #1F1C33; --sun: #E2DDFA;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #15131F; --surface: #201D30; --surface-2: #2A2640; --line: #312C48;
    --ink: #F2F0FA; --ink-muted: #ABA6C6; --brand: #8B7FF0; --on-brand: #15131F;
    --brand-soft: #2A2640; --success: #6CCB8E; --bezel: #0B0A12; --sun: #241F3D;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.55; overflow-x: hidden;
}
a { color: var(--brand); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.top, main, footer { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Cabecera */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 46px; height: 46px; overflow: visible; }
.m-body { fill: var(--brand); stroke: var(--brand); stroke-width: 5; stroke-linejoin: round; }
.m-line { fill: none; stroke: var(--ground); stroke-width: 5; stroke-linecap: round; }
.m-dot { fill: var(--ground); }
.word { height: 31px; width: auto; display: block; }
.word-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .word-light { display: none; }
  .word-dark { display: block; }
}
.lang { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.lang button {
  font-size: 14px; font-weight: 700; color: var(--ink-muted);
  background: none; border: 0; border-radius: 999px; padding: 9px 16px; min-height: 44px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--brand-soft); color: var(--ink); }

/* Portada */
.hero { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 40px; align-items: center; padding: 40px 0 96px; }
h1 { font-size: clamp(34px, 4.7vw, 56px); line-height: 1.07; font-weight: 800; letter-spacing: -0.022em; }
.lead { font-size: clamp(18px, 1.9vw, 20px); color: var(--ink-muted); margin-top: 22px; max-width: 30em; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 30px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 30px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-weight: 800; text-decoration: none;
}
.soon { font-weight: 700; color: var(--ink-muted); }
.soon::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--today); margin-right: 9px; }

.stage { position: relative; padding: 26px 0 96px 24px; }
.sun { position: absolute; width: 78%; aspect-ratio: 1; right: -14%; top: -8%; border-radius: 50%; background: var(--sun); }
.tablet { position: relative; background: var(--bezel); border-radius: 26px; padding: 12px; box-shadow: 0 30px 60px -28px rgba(31, 28, 51, 0.55); }
.screen { background: var(--ground); border-radius: 16px; padding: 16px; }
.t-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.family { display: flex; gap: 8px; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #1F1C33; }
.av.a { background: #CFC9F7; } .av.b { background: #BFE3CD; } .av.c { background: #FFD9A0; } .av.d { background: #F6C6C1; }
.av.on { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--brand); }
.clock { text-align: right; line-height: 1.1; }
.clock b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.clock span { font-size: 11px; color: var(--ink-muted); font-weight: 600; }
.t-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.month, .agenda { background: var(--surface); border-radius: 14px; padding: 12px; }
.dow, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dow span { text-align: center; font-size: 10px; font-weight: 700; color: var(--ink-muted); padding-bottom: 5px; }
.day { aspect-ratio: 1; border-radius: 8px; background: var(--surface-2); position: relative; display: grid; place-items: center; }
.day i { position: absolute; top: 2px; left: 4px; font-style: normal; font-size: 8px; font-weight: 700; color: var(--ink-muted); }
.day em { font-style: normal; font-size: 13px; line-height: 1; margin-top: 4px; }
.day.past em { filter: grayscale(1); opacity: 0.45; }
.day.today { background: var(--today); }
.day.today i { color: #1F1C33; }
.agenda { position: relative; display: flex; flex-direction: column; gap: 7px; padding-bottom: 54px; }
.agenda-title { font-size: 15px; font-weight: 800; }
.row { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 7px; background: var(--surface-2); border-radius: 10px; padding: 8px 9px; font-size: 12px; }
.row .e { font-size: 15px; line-height: 1; }
.row .w { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .t { color: var(--ink-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.mic { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; box-shadow: 0 8px 16px -8px var(--brand); }
.mic svg { width: 18px; height: 18px; }

.phone { position: absolute; left: 0; bottom: 0; width: 32%; min-width: 150px; background: var(--bezel); border-radius: 22px; padding: 8px; box-shadow: 0 24px 44px -22px rgba(31, 28, 51, 0.6); }
.phone::before { content: ""; display: block; background: var(--ground); border-radius: 15px; position: absolute; inset: 8px; }
.notif, .p-line { position: relative; }
.notif { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; background: var(--surface); border-radius: 12px; margin: 22px 8px 10px; padding: 9px 10px; font-size: 11px; line-height: 1.3; }
.notif .e { font-size: 18px; }
.notif b { display: block; font-weight: 800; }
.notif span { color: var(--ink-muted); }
.p-line { height: 8px; border-radius: 4px; background: var(--line); margin: 0 12px 8px; }
.p-line.short { width: 46%; margin-bottom: 22px; }

/* El único momento animado: al cargar, el logo suena y la primera
   actividad late una vez. */
.mark-house { transform-box: view-box; transform-origin: 50px 88px; animation: swing 1.6s ease-in-out 0.5s 1; }
.mark-waves { animation: waves 1.6s ease-in-out 0.5s 1 both; }
.row.ring { animation: ring 1.6s ease-in-out 0.5s 1; }
@keyframes swing { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(-7deg); } 20% { transform: rotate(6deg); } 30% { transform: rotate(-5deg); } 40% { transform: rotate(4deg); } 50% { transform: rotate(-2deg); } }
@keyframes waves { 0%, 100% { opacity: 1; } 12%, 36% { opacity: 0.25; } 24%, 48% { opacity: 1; } }
@keyframes ring { 0%, 60%, 100% { box-shadow: 0 0 0 0 transparent; } 20% { box-shadow: 0 0 0 3px var(--today); } 40% { box-shadow: 0 0 0 6px transparent; } }

/* Voz */
.voice { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 48px; }
h2 { font-size: clamp(26px, 3.3vw, 38px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.14; }
.voice-text p { color: var(--ink-muted); font-size: 18px; margin-top: 14px; max-width: 30em; }
.demo { display: grid; gap: 14px; justify-items: start; min-height: 232px; align-content: start; }
.bubble { background: var(--brand-soft); border-radius: 20px 20px 20px 6px; padding: 14px 18px; font-size: 19px; font-weight: 700; min-height: 58px; min-width: 60%; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--brand); vertical-align: -0.18em; margin-left: 2px; opacity: 0; }
.demo[data-state="listening"] .caret { opacity: 1; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo[data-state="idle"] .bubble { color: var(--ink-muted); }
.demo[data-state="idle"] .bubble::before { content: "…"; }
.result { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; width: 100%; background: var(--surface-2); border-radius: 16px; padding: 14px 16px; opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease; }
.demo[data-state="done"] .result { opacity: 1; transform: none; }
.result .e { font-size: 26px; line-height: 1; }
.result b { display: block; font-weight: 800; }
.result div span { color: var(--ink-muted); font-size: 15px; }
.ok { color: var(--success); font-weight: 800; font-size: 14px; }
.demo-mic { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px 0 16px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 800; cursor: pointer; }
.demo-mic svg { width: 22px; height: 22px; }
.demo[data-state="listening"] .demo-mic { box-shadow: 0 0 0 6px var(--brand-soft); }

/* Funciones */
.features { padding: 96px 0 40px; }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.bento article { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 232px; }
.bento .wide { grid-column: span 2; }
.bento .soft { background: var(--brand-soft); border-color: transparent; grid-column: 2 / span 2; }
.bento article:nth-child(3) { grid-column: 1; grid-row: 2; }
h3 { font-size: 21px; font-weight: 800; margin-bottom: 8px; line-height: 1.25; }
.bento p { color: var(--ink-muted); max-width: 36em; }
.family.big { gap: 0; margin-bottom: auto; padding-bottom: 28px; }
.family.big .av { width: 60px; height: 60px; font-size: 22px; margin-right: -12px; box-shadow: 0 0 0 4px var(--surface); }
.bento .figure { color: var(--ink); font-size: 64px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: auto; padding-bottom: 28px; font-variant-numeric: tabular-nums; max-width: none; }
.figure.bell svg { width: 68px; height: 68px; display: block; }
.devices { display: flex; align-items: flex-end; gap: 14px; margin-bottom: auto; padding-bottom: 28px; color: var(--brand); }
.devices svg { display: block; height: 70px; width: auto; }
.devices svg.ph { height: 46px; }

/* Pie */
footer { text-align: center; padding-top: 72px; padding-bottom: 56px; display: grid; gap: 22px; justify-items: center; }
.closing { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; text-wrap: balance; }
.small { font-size: 14px; color: var(--ink-muted); margin-top: 18px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 20px 0 72px; }
  .stage { padding-left: 16px; }
  .voice { grid-template-columns: 1fr; gap: 28px; padding: 28px; }
  .features { padding-top: 72px; }
  .bento { grid-template-columns: 1fr; }
  .bento .wide, .bento .soft, .bento article:nth-child(3) { grid-column: auto; grid-row: auto; }
  .bento article { min-height: 0; }
}
@media (max-width: 480px) {
  .t-body { grid-template-columns: 1fr; }
  .agenda { padding-bottom: 12px; }
  .mic { display: none; }
  .phone { width: 52%; }
  .stage { padding-bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .mark-house, .mark-waves, .row.ring, .caret { animation: none !important; }
  .result { transition: none; }
}
