/* TidyTime: paleta de marca «Sky & Cobalt» y Manrope. Blanco frío, tinta marina y el visor de Tidy como única banda oscura. */
:root {
  --paper: #F2FAFF;
  --surface: #FFFFFF;
  --ink: #10294F;
  --muted: #4F6584;
  --line: #D6E6F5;
  --blue: #155EEF;
  --blue-ink: #FFFFFF;
  --sky: #39BDF8;
  --warn: #C2560B;
  --warn-bg: #FFF1E4;
  --chip: #E3F3FE;
  /* El visor de Tidy es oscuro en ambos temas */
  --visor: #0B1730;
  --visor-2: #123B80;
  --visor-ink: #F2FAFF;
  --visor-muted: #B8E7FF;
  --glow: #39BDF8;
  --deep: #123B80;
  --time: #58718F;
  --shadow: 0 1px 2px rgba(16, 41, 79, .06), 0 18px 48px -18px rgba(16, 41, 79, .28);

  --f-display: "Manrope", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --f-body: "Manrope", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.75rem);
  --step-4: clamp(2.5rem, 6.2vw, 4.5rem);
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --visor: #071023;
    --paper: #0B1730; --surface: #10294F; --ink: #F2FAFF; --muted: #9DB8D8; --line: #1F3E6E;
    --blue: #4D8DFF; --blue-ink: #FFFFFF; --sky: #39BDF8; --time: #B8E7FF; --warn: #FF9D57; --warn-bg: #2E1C0E; --chip: #173867;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --visor: #071023;
  --paper: #0B1730; --surface: #10294F; --ink: #F2FAFF; --muted: #9DB8D8; --line: #1F3E6E;
  --blue: #4D8DFF; --blue-ink: #FFFFFF; --sky: #39BDF8; --time: #B8E7FF; --warn: #FF9D57; --warn-bg: #2E1C0E; --chip: #173867;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 60px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
kbd {
  font: 500 .82em/1 var(--f-mono);
  padding: .28em .5em; border-radius: 6px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  background: var(--surface); color: var(--ink); white-space: nowrap;
}

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font: 700 .78rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--blue);
}
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font: 600 1rem/1 var(--f-body); text-decoration: none;
  padding: .95em 1.4em; border-radius: 999px;
  background: var(--blue); color: var(--blue-ink);
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 24px -10px var(--blue);
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.1em; height: 1.1em; }
.link-quiet { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--line); padding-bottom: 2px; }
.link-quiet:hover { border-color: var(--blue); }

/* Cabecera */
.site-head { padding-block: 22px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 1.25rem/1 var(--f-display); letter-spacing: -.02em; }
.brand { font-family: var(--f-display); font-size: 1.45rem; letter-spacing: -.04em; gap: 9px; }
.brand img { width: 36px; height: 36px; flex: none; }
.brand b { font-weight: 800; }
.brand .wordmark span { font-weight: 400; color: var(--time); }
.brand .wordmark b { font-weight: 800; }
.site-nav { display: flex; gap: 22px; align-items: center; font-weight: 500; font-size: .95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .site-nav a:not(.nav-cta):not(.lang) { display: none; } }
.nav-cta { color: var(--ink) !important; border: 1.5px solid var(--line); padding: .5em 1em; border-radius: 999px; }

/* Hero */
.hero { padding-block: 40px 72px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero h1 { font-size: var(--step-4); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero-lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 32ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: center; }
.hero-meta { font: 500 .88rem/1.5 var(--f-body); letter-spacing: .01em; color: var(--muted); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } .hero-lede { max-width: 40ch; } }

/* Ventana simulada */
.mock { position: relative; min-width: 0; padding-bottom: 56px; }
.win {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); font-size: 13px; line-height: 1.35;
}
.win-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.win-bar span { margin-left: auto; margin-right: auto; font-weight: 600; color: var(--muted); font-size: 12px; transform: translateX(-20px); }
.win-body { display: grid; grid-template-columns: 158px minmax(0, 1fr); min-height: 330px; }
.side { border-right: 1px solid var(--line); padding: 12px 8px; display: grid; align-content: start; gap: 2px; }
.side b { font: 700 10.5px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 6px; }
.side b:first-child { padding-top: 2px; }
.side span { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 6px; color: var(--ink); }
.side span.on { background: var(--chip); font-weight: 600; }
.side span small { color: var(--muted); font-variant-numeric: tabular-nums; }
.list { display: grid; align-content: start; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 10px; }
.list-head strong { font: 700 17px/1 var(--f-display); }
.list-head small { color: var(--muted); }
.mail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.mail .from { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .subj { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; grid-column: 1; }
.mail .tag { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--blue); }
.mail .tag.warn { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 560px) { .win-body { grid-template-columns: minmax(0, 1fr); } .side { display: none; } }

/* Ventana flotante de Tidy */
.tidy-float {
  position: absolute; right: -8px; bottom: 0; width: min(300px, 78%);
  background: var(--visor); color: var(--visor-ink);
  border-radius: 16px; border: 1px solid #1F3E6E;
  box-shadow: 0 30px 60px -20px rgba(4, 12, 30, .55), 0 0 0 6px rgba(57, 189, 248, .07);
  font-size: 13px; line-height: 1.45; overflow: hidden;
  animation: float-in .7s cubic-bezier(.2, .8, .2, 1) both .25s;
}
.tf-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #1A2E57; }
.tf-head img { width: 26px; height: 26px; }
.tf-head strong { font: 700 14px/1 var(--f-display); }
.tf-head kbd { margin-left: auto; background: transparent; color: var(--visor-muted); border-color: #27406F; font-size: 10.5px; }
.tf-body { padding: 12px; display: grid; gap: 10px; }
.bubble { padding: 8px 11px; border-radius: 12px; max-width: 92%; }
.bubble.me { justify-self: end; background: #155EEF; color: #fff; border-bottom-right-radius: 4px; }
.bubble.tidy { background: var(--visor-2); border-bottom-left-radius: 4px; }
.confirm { display: flex; gap: 8px; margin-top: 8px; }
.confirm span { font-weight: 600; font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid #2B4A82; color: var(--visor-ink); }
.confirm span.yes { background: var(--glow); color: #0B1730; border-color: var(--glow); }
@keyframes float-in { from { transform: translateY(18px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .tidy-float, .visor-eyes { animation: none !important; } .btn { transition: none; } }

/* Secciones */
section { padding-block: 88px; }
.sec-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: 48px; }
.sec-head h2 { font-size: var(--step-3); font-weight: 700; }
.sec-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

/* Fortalezas */
.strengths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.strength { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; min-width: 0; }
.strength + .strength { }
.strength:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.strength svg { width: 28px; height: 28px; color: var(--blue); }
.strength h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.01em; }
.strength p { color: var(--muted); }
@media (max-width: 860px) {
  .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strength:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .strength:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .strengths { grid-template-columns: minmax(0, 1fr); }
  .strength:nth-child(even) { padding-left: 0; border-left: 0; }
  .strength { padding-right: 0; }
}

/* Suscripciones */
.subs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.subs-copy { display: grid; gap: 18px; min-width: 0; }
.subs-copy h2 { font-size: var(--step-3); font-weight: 700; }
.subs-copy p { color: var(--muted); }
.subs-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; font-size: 14px; }
.sub { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.sub:first-child { border-top: 0; }
.sub strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub small { color: var(--muted); grid-column: 1; }
.sub button { grid-row: 1 / span 2; grid-column: 2; font: 600 12.5px/1 var(--f-body); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: default; }
.sub.retry { background: var(--warn-bg); }
.sub.retry small { color: var(--warn); }
.sub.retry button { border-color: var(--warn); color: var(--warn); }
@media (max-width: 860px) { .subs { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* Tidy: la banda del visor */
.visor-band { background: var(--visor); color: var(--visor-ink); position: relative; overflow: hidden; }
.visor-band::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; max-width: 900px;
  background: radial-gradient(closest-side, rgba(57, 189, 248, .16), transparent 70%); pointer-events: none;
}
.visor-band .eyebrow { color: var(--glow); }
.tidy-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: center; position: relative; }
.tidy-portrait { display: grid; gap: 22px; justify-items: center; text-align: center; }
.tidy-portrait img { width: min(280px, 64vw); border-radius: 50%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.tidy-portrait p { color: var(--visor-muted); font-size: var(--step--1); }
.tidy-portrait kbd { background: var(--visor-2); color: var(--visor-ink); border-color: #27406F; }
.tidy-copy { display: grid; gap: 22px; min-width: 0; }
.tidy-copy h2 { font-size: var(--step-3); font-weight: 700; }
.tidy-copy h2 span { color: var(--glow); text-shadow: 0 0 22px rgba(57, 189, 248, .45); }
.tidy-copy > p { color: var(--visor-muted); font-size: var(--step-1); line-height: 1.5; max-width: 40ch; }
.asks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asks li { background: var(--visor-2); border: 1px solid #1B3263; border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; min-width: 0; }
.asks li b { font: 700 .74rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--glow); }
.asks li q { quotes: "«" "»"; color: var(--visor-ink); }
.promise { display: flex; gap: 14px; align-items: flex-start; border-top: 1px solid #1B3263; padding-top: 22px; color: var(--visor-ink); }
.promise svg { flex: none; width: 26px; height: 26px; color: var(--glow); margin-top: 2px; }
.promise p { color: var(--visor-muted); }
.promise strong { color: var(--visor-ink); }
@media (max-width: 900px) { .tidy-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .asks { grid-template-columns: minmax(0, 1fr); } }

/* Privacidad */
.privacy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.priv { display: grid; gap: 10px; align-content: start; min-width: 0; }
.priv dt { font: 700 .78rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.priv dd { margin: 0; font: 700 var(--step-2)/1.15 var(--f-display); letter-spacing: -.02em; }
.priv p { color: var(--muted); }
@media (max-width: 760px) { .privacy { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* Descarga */
.download { padding-block: 0 96px; }
.dl-card {
  border-radius: 24px; padding: clamp(28px, 5vw, 56px);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center;
}
.dl-card > img { width: clamp(96px, 14vw, 150px); }
.dl-copy { display: grid; gap: 16px; min-width: 0; }
.dl-copy h2 { font-size: var(--step-3); font-weight: 800; }
.dl-copy .hero-meta { margin-top: -4px; }
.dl-note { font-size: var(--step--1); color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; max-width: 60ch; }
@media (max-width: 640px) { .dl-card { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* Preguntas */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.faq div { display: grid; gap: 8px; min-width: 0; }
.faq h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.01em; }
.faq p { color: var(--muted); }
@media (max-width: 760px) { .faq { grid-template-columns: minmax(0, 1fr); } }

/* Pie */
.site-foot { border-top: 1px solid var(--line); padding-block: 32px 40px; font-size: var(--step--1); color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; gap: 22px; }
.site-foot a { color: var(--muted); }

/* Páginas legales */
.legal { padding-block: 48px 96px; }
.legal .wrap { max-width: 760px; }
.legal article { display: grid; gap: 18px; }
.legal h1 { font-size: var(--step-3); font-weight: 800; }
.legal h2 { font-size: var(--step-1); font-weight: 700; margin-top: 18px; letter-spacing: -.01em; }
.legal p, .legal li { color: var(--ink); }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.legal .updated { font: 500 .85rem/1.4 var(--f-mono); color: var(--muted); }
.draft-note { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 12px 16px; font-size: var(--step--1); font-weight: 500; }
.ph { background: var(--warn-bg); color: var(--warn); padding: 0 .3em; border-radius: 4px; font-weight: 600; }
@media (max-width: 560px) { .tidy-float { right: 0; width: 86%; } }
html, body { overflow-x: clip; }

/* Por qué TidyTime */
.why { padding-bottom: 24px; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: why; }
.why-list li { counter-increment: why; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 24px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.why-list li::before { content: counter(why); font: 800 .9rem/1 var(--f-display); color: var(--blue-ink); background: var(--blue); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; }
.why-list b { font: 700 var(--step-1)/1.2 var(--f-display); letter-spacing: -.01em; }
.why-list p { color: var(--muted); }
.soon { margin-top: 28px; border: 1.5px dashed var(--line); border-radius: 16px; padding: 22px 24px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 28px; align-items: start; }
.soon-label { font: 700 .78rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); background: var(--chip); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.soon ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.soon li { color: var(--muted); }
.soon li b { color: var(--ink); }
@media (max-width: 960px) { .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .why-list { grid-template-columns: minmax(0, 1fr); } .soon { grid-template-columns: minmax(0, 1fr); } .soon-label { justify-self: start; } }

/* Selector de idioma */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1.5px solid var(--line); border-radius: 999px; }
.site-nav .lang-switch a.lang { font: 700 .74rem/1 var(--f-body); letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-radius: 999px; text-decoration: none; }
.site-nav .lang-switch a.lang:hover { color: var(--ink); }
.site-nav .lang-switch a.lang.on { background: var(--chip); color: var(--blue); }
@media (max-width: 640px) { .site-nav { gap: 10px; } }
