/* Página de enlaces de la bio (/links/) y sus formularios.
 * Hoja propia, sin matcha ni styles.css: la página se abre sobre todo en el
 * navegador interno de TikTok, y cada KB y cada hoja extra se notan ahí.
 * El ámbar es el sol del logo: marca lo que más importa, nada más. */

:root {
  --bg: #f6f1e7;
  --card: #fffdf8;
  --ink: #1d1a14;
  --muted: #6b6356;
  --line: #e2d9c6;
  --amber: #f0a52b;
  --amber-ink: #8a5000;
  --amber-soft: #fbecd0;
  --ola: #2aa9b8;
  --ghost: color-mix(in srgb, var(--ink) 20%, var(--bg));
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --on-amber: #1d1405;
  --danger: #b42318;
  --focus: #1f6feb;
  --radius: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141b;
    --card: #151d27;
    --ink: #eef2f6;
    --muted: #9aa7b4;
    --line: #253244;
    --amber-ink: #ffc766;
    --amber-soft: #2b2313;
    --ola: #3cc3d2;
    --danger: #ff7b72;
    --focus: #58a6ff;
  }
}

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

body.lh {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.lh a { color: var(--amber-ink); }
.lh :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.lh-wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 22px 16px 24px;
}

/* ── Cabecera: el sol del logo sobre la ola ── */
.lh-head { position: relative; text-align: center; margin-bottom: 4px; padding-top: 6px; }
.lh-logo { position: relative; width: 72px; height: 72px; border-radius: 50%; display: block; margin: 0 auto 10px; }
.lh-name { position: relative; font-size: .95rem; font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: .01em; }
.lh-tag {
  position: relative;
  font-family: var(--serif);
  font-size: 1.85rem; line-height: 1.08; letter-spacing: -.005em;
  margin: 6px auto 0; max-width: 15em;
  text-wrap: balance;
}
.lh-sun {
  position: absolute; left: 50%; top: -34px; width: 260px; height: 260px; margin-left: -130px;
  pointer-events: none;
}
.lh-sun::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--amber) 42%, transparent) 0%, transparent 66%);
  animation: lh-breathe 6s ease-in-out infinite;
}
.lh-wave {
  height: 14px; margin: 14px 0 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 14'%3E%3Cpath d='M0 7Q14-1 28 7T56 7' fill='none' stroke='%232aa9b8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 0 / 56px 14px;
  opacity: .6;
  animation: lh-drift 7s linear infinite;
}

/* ── Botones ── */
.lh-list { display: flex; flex-direction: column; gap: 12px; }
.lh-list > .lh-feature { margin-bottom: 6px; }

.lh-btn {
  display: grid;
  grid-template-columns: 44px 1fr 14px;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s, transform .12s, background-color .2s;
}
.lh .lh-btn { color: var(--ink); }
.lh-btn:hover { border-color: var(--amber); }
.lh-btn:active { transform: scale(.985); }

.lh-ico {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--amber-soft); color: var(--amber-ink);
}
.lh-emoji { font-size: 1.7rem; line-height: 1; }
.lh-svg { width: 26px; height: 26px; display: block; flex: none; }
.lh-btn.is-hl .lh-ico { background: color-mix(in srgb, var(--on-amber) 14%, transparent); color: var(--on-amber); }
.lh-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lh-t { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.lh-s { color: var(--muted); font-size: .92rem; line-height: 1.35; }
.lh-arrow { font-size: 1.5rem; color: var(--muted); line-height: 1; }

.lh .lh-btn.is-hl { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }
.lh-btn.is-hl .lh-s, .lh-btn.is-hl .lh-arrow { color: var(--on-amber); opacity: .85; }

.lh-badge {
  display: inline-block;
  align-self: flex-start;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber-ink);
  font-size: .85rem;
  font-weight: 700;
}
.lh-btn.is-hl .lh-badge { background: var(--on-amber); color: var(--amber); }

.lh-btn-center { display: flex; justify-content: center; min-height: 52px; margin-top: 24px; font-weight: 700; }

/* ── Buscador de guías ── */
.lh-guides {
  margin: -4px 0 4px;
  padding: 14px 16px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.lh-search-label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.lh-search {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}
.lh-empty { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.lh-all { margin-top: 10px; }
.lh-all summary { cursor: pointer; color: var(--amber-ink); font-weight: 600; padding: 6px 0; }
.lh-group h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 4px; }
.lh-group ul { list-style: none; margin: 0; padding: 0; }
.lh-group li a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lh-group li:last-child a { border-bottom: 0; }

/* ── Redes ── */
.lh-social .lh-svg { width: 22px; height: 22px; }
.lh-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.lh-social a {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
}

/* ── Pie ── */
.lh-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 8px 16px 32px; }
.lh-foot p { margin: 4px 0; }
.lh-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.lh-foot a { color: var(--muted); }

/* ── Formularios ── */
.lh-back { display: inline-block; margin-bottom: 16px; text-decoration: none; font-weight: 600; }
.lh-h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.lh-lead { color: var(--muted); margin: 0 0 16px; }
.lh-small { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

.lh-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 16px 0;
}
.lh-card h2 { font-size: 1rem; margin: 14px 0 6px; }
.lh-card h2:first-child { margin-top: 0; }
.lh-card h3 { font-size: .95rem; margin: 16px 0 6px; }
.lh-card ul { margin: 0; padding-left: 0; list-style: none; }
.lh-card li { position: relative; padding-left: 26px; margin: 6px 0; }
.lh-yes li::before { content: "✓"; position: absolute; left: 4px; color: var(--amber-ink); font-weight: 700; }
.lh-no li::before { content: "–"; position: absolute; left: 6px; color: var(--muted); font-weight: 700; }
.lh-dots li::before { content: "•"; position: absolute; left: 7px; color: var(--muted); }

.lh-form { margin-top: 8px; }
.lh-field { margin: 0 0 16px; border: 0; padding: 0; }
.lh-field > label, .lh-multi legend { display: block; font-weight: 600; margin-bottom: 6px; }
.lh-opt { font-weight: 400; color: var(--muted); }
.lh-field input[type=text], .lh-field input[type=email], .lh-field textarea, .lh-field select {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}
.lh-field textarea { resize: vertical; }
.has-error input, .has-error textarea { border-color: var(--danger); }
.lh-help { margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.lh-err { margin: 6px 0 0; font-size: .9rem; color: var(--danger); font-weight: 600; }
.lh-multi label, .lh-check label {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-weight: 400; cursor: pointer;
}
.lh-multi input, .lh-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--amber); }

.lh-alert {
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-weight: 600;
}
.lh-alert p { margin: 0; }

.lh-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  border: 0;
  border-radius: var(--radius);
  background: var(--amber);
  color: var(--on-amber);
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}
.lh-submit:active { transform: translateY(1px); }

/* Campo trampa: fuera de la vista sin `display:none`, que algunos bots saltan. */
.lh-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.cf-turnstile { margin: 8px 0; }

.lh-done { text-align: center; padding-top: 24px; }
.lh-done-mark {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; font-weight: 700;
  background: var(--amber); color: var(--on-amber);
}

/* ── Panel del dueño ── */
.lh-stats { max-width: 540px; }
.lh-range { display: flex; gap: 8px; margin: 8px 0 4px; }
.lh-range a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.lh-range a[aria-current] { background: var(--amber); border-color: var(--amber); color: var(--on-amber); font-weight: 700; }

.lh-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.lh-kpi {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: .85rem; color: var(--muted);
}
.lh-kpi-n { font-size: 1.5rem; font-weight: 700; color: var(--ink); }

.lh-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lh-table th, .lh-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.lh-table th { color: var(--muted); font-weight: 600; font-size: .8rem; }

/* Bajo 640px la tabla se vuelve tarjetas: nunca scroll horizontal. */
@media (max-width: 640px) {
  .lh-table thead { display: none; }
  .lh-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .lh-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; }
  .lh-table td::before { content: attr(data-label); color: var(--muted); }
}

.lh-bar-row { margin: 12px 0; }
.lh-bar-label { display: flex; justify-content: space-between; gap: 12px; }
.lh-bar { height: 8px; border-radius: 99px; background: var(--amber-soft); overflow: hidden; margin: 4px 0; }
.lh-bar span { display: block; height: 100%; background: var(--amber); }
.lh-flag { color: var(--danger); font-weight: 600; }

.lh-copy li { padding-left: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; margin: 10px 0; }
.lh-copy-name { grid-column: 1 / -1; font-weight: 700; text-transform: capitalize; }
.lh-copy code { font-size: .85rem; overflow-wrap: anywhere; }
.lh-copy-btn {
  font: inherit; font-size: .85rem; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--amber); background: transparent; color: var(--amber-ink); cursor: pointer;
}
.lh code { font-size: .85em; overflow-wrap: anywhere; }


/* ═══════════ Vitrina: EasyDoc ═══════════
   Lo que más orgullo nos da. El estado base ES la composición final (papel escrito,
   sello puesto): con movimiento reducido o sin soporte, se ve completo y quieto. */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.lh .lh-feature {
  display: block;
  position: relative;
  border: 2px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    conic-gradient(from var(--ang), var(--amber), var(--ola), var(--amber-ink), var(--amber)) border-box;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--amber) 70%, transparent);
  animation: lh-spin 7s linear infinite;
  transition: transform .15s;
}
.lh-feature:active { transform: scale(.987); }

.lh-stage {
  display: block; position: relative; height: 192px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--amber) 38%, transparent), transparent 62%),
    linear-gradient(180deg, #0b0f14, #131a22);
}
.lh-chip {
  position: absolute; z-index: 3; top: 12px; left: 12px;
  padding: 3px 11px; border-radius: 999px;
  background: var(--amber); color: var(--on-amber);
  font-size: .78rem; font-weight: 700;
}
.lh-prompt {
  position: absolute; z-index: 2; top: 46px; left: 12px; right: 12px;
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16);
  color: #f3efe6; font: 500 .8rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.lh-prompt svg { width: 15px; height: 15px; flex: none; color: var(--amber); }
.lh-type {
  display: inline-block; overflow: hidden; white-space: nowrap; max-width: 100%;
  width: calc(var(--n) * 1ch);
  border-right: 2px solid var(--amber);
  animation: lh-typing 10s infinite both, lh-caret .9s step-end infinite;
}
.lh-paper {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; z-index: 1;
  width: 62%; max-width: 230px; height: 100px;
  padding: 14px 16px 0;
  border-radius: 8px 8px 0 0;
  background: #fffdf8;
  box-shadow: 0 -10px 30px rgba(0,0,0,.35);
  animation: lh-paper 10s infinite both;
}
.lh-ln {
  display: block; height: 6px; margin: 0 0 8px; border-radius: 3px;
  background: #d9d2c2; transform-origin: left center;
  animation: lh-line 10s infinite both; animation-delay: calc(var(--i) * .28s);
}
.lh-ln-h { width: 55%; height: 10px; margin-bottom: 12px; background: var(--amber); }
.lh-ln-s { width: 70%; }
.lh-stamp {
  position: absolute; right: -10px; bottom: 12px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ola); color: #04262b;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transform: rotate(-6deg);
  animation: lh-stamp 10s infinite both;
}
.lh-stamp svg { width: 26px; height: 26px; }

.lh-feat-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.lh-feat-t { font-size: 1.3rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.lh-cta {
  position: relative; align-self: flex-start; margin-top: 12px;
  display: inline-flex; align-items: center; gap: 2px;
  padding: 11px 14px 11px 20px; border-radius: 999px;
  background: var(--amber); color: var(--on-amber);
  font-weight: 700; font-size: 1rem;
  animation: lh-ping 2.8s ease-out infinite;
}
.lh-cta svg { width: 22px; height: 22px; animation: lh-nudge 2.8s ease-in-out infinite; }

/* ═══════════ Cierre ═══════════ */
.lh-pride {
  margin: 30px 8px 6px; text-align: center;
  font-family: var(--serif); font-size: 2.3rem; line-height: 1.06; letter-spacing: -.01em;
  text-wrap: balance;
}

/* ═══════════ Movimiento persistente ═══════════ */
@keyframes lh-breathe { 0%, 100% { transform: scale(.9); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes lh-drift { to { background-position-x: 56px; } }
@keyframes lh-spin { to { --ang: 360deg; } }
@keyframes lh-caret { 50% { border-right-color: transparent; } }
@keyframes lh-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 14px transparent; }
}
@keyframes lh-nudge { 0%, 60%, 100% { transform: translateX(0); } 30% { transform: translateX(4px); } }
@keyframes lh-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* La demo: escribe lo que quiere → el documento se arma → sello de listo. 10 s en bucle. */
@keyframes lh-typing {
  0%, 4% { width: 0; animation-timing-function: steps(var(--n), end); }
  30%, 92% { width: calc(var(--n) * 1ch); }
  97%, 100% { width: 0; }
}
@keyframes lh-paper {
  0%, 30% { transform: translateY(106%); }
  42%, 92% { transform: translateY(0); }
  99%, 100% { transform: translateY(106%); }
}
@keyframes lh-line {
  0%, 40% { transform: scaleX(0); }
  50%, 92% { transform: scaleX(1); }
  97%, 100% { transform: scaleX(0); }
}
@keyframes lh-stamp {
  0%, 70% { opacity: 0; transform: rotate(-14deg) scale(1.9); }
  76% { opacity: 1; transform: rotate(-6deg) scale(.92); }
  80%, 92% { opacity: 1; transform: rotate(-6deg) scale(1); }
  97%, 100% { opacity: 0; transform: rotate(-6deg) scale(1); }
}

.lh-badge::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px;
  border-radius: 50%; background: currentColor; vertical-align: 1px;
  animation: lh-dot 2s ease-in-out infinite;
}

/* Una sola secuencia de entrada: el sol sale, el texto sube, la vitrina llega. */
@keyframes lh-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes lh-sunrise { from { opacity: 0; transform: translateY(26px) scale(.8); } }
.lh-sun { animation: lh-sunrise 1.1s cubic-bezier(.2,.7,.2,1) both; }
.lh-logo { animation: lh-rise .8s cubic-bezier(.2,.7,.2,1) .05s both; }
.lh-name { animation: lh-rise .8s cubic-bezier(.2,.7,.2,1) .15s both; }
.lh-tag  { animation: lh-rise .8s cubic-bezier(.2,.7,.2,1) .25s both; }
.lh-list > .lh-feature { animation: lh-spin 7s linear infinite, lh-rise .9s cubic-bezier(.2,.7,.2,1) .4s backwards; }

/* ═══════════ Movimiento atado al scroll ═══════════
   Solo donde el navegador lo soporta; sin soporte, todo se queda en su estado final. */
.lh-progress { display: none; }
@supports (animation-timeline: view()) {
  .lh-progress {
    display: block; position: fixed; z-index: 10; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--amber), var(--ola));
    transform-origin: left center; transform: scaleX(0);
    animation: lh-progress linear both; animation-timeline: scroll(root);
  }
  @keyframes lh-progress { to { transform: scaleX(1); } }

  /* El sol se queda atrás y se apaga al bajar. */
  .lh-sun { animation: lh-sunrise 1.1s cubic-bezier(.2,.7,.2,1) both, lh-sun-away linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 420px; }
  @keyframes lh-sun-away { to { transform: translateY(90px) scale(1.25); opacity: 0; } }

  /* Cada enlace "se enciende" al llegar a la pantalla: tu vida digital, activándose. */
  .lh-btn .lh-ico {
    animation: lh-light linear both; animation-timeline: view(); animation-range: entry 15% entry 100%;
  }
  @keyframes lh-light {
    from { background: var(--line); color: var(--muted); transform: scale(.82) rotate(-8deg); }
  }

  /* La frase final se llena de tinta con el scroll. */
  .lh-pride span {
    color: transparent;
    background: linear-gradient(90deg, var(--ink) 50%, var(--ghost) 50%) 100% 0 / 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    animation: lh-ink linear both; animation-timeline: view(); animation-range: entry 30% entry 100%;
  }
  @keyframes lh-ink { to { background-position: 0 0; } }
}

@media (prefers-reduced-motion: reduce) {
  .lh *, .lh *::before, .lh *::after { animation: none !important; transition: none !important; }
  .lh-type { border-right-color: transparent; }
}

@media (min-width: 420px) {
  .lh-tag { font-size: 2.1rem; }
  .lh-pride { font-size: 2.6rem; }
}
