/* Herramienta /bio: identidad de andresrangelv.com (negro, naranja, Inter, vidrio). */
:root {
  --bg: #0a0a0b;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.11);
  --ink: #f4f1ec;
  --ink-soft: rgba(244, 241, 236, 0.66);
  --ink-faint: rgba(244, 241, 236, 0.42);
  --orange: #f5821f;
  --orange-soft: rgba(245, 130, 31, 0.14);
  --ok: #5fd08a;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }

.glow {
  position: fixed; inset: -20vh -20vw auto; height: 70vh; pointer-events: none; z-index: 0;
  background:
    radial-gradient(40% 50% at 25% 30%, rgba(245, 130, 31, 0.22), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, rgba(140, 30, 60, 0.28), transparent 70%);
  filter: blur(20px);
}

.wrap {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
  padding-block: max(20px, env(safe-area-inset-top, 0px)) max(40px, env(safe-area-inset-bottom, 0px));
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  display: grid; gap: 18px;
}

.top { display: flex; justify-content: space-between; align-items: center; }
.brand { text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.brand span { color: var(--orange); }

.hero { display: grid; gap: 12px; padding-block: 18px 6px; }
.eyebrow { margin: 0; color: var(--orange); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(32px, 8.5vw, 46px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; }
h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.lead { margin: 0; color: var(--ink-soft); font-size: 17px; max-width: 58ch; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: grid; gap: 14px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}

.step { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.step + .step { border-top: 1px solid var(--line); padding-top: 18px; }
legend { padding: 0; font-weight: 800; font-size: 19px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #111; font-size: 13px; font-weight: 800; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--panel-strong); border-radius: 999px;
  padding: 7px 12px; font-size: 13.5px; cursor: pointer; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: rgba(255, 255, 255, 0.3); }
.chip[aria-checked="true"] { background: var(--orange-soft); border-color: var(--orange); color: #ffd2ad; }
.chip:focus-visible, .btn:focus-visible, .copy:focus-visible, input:focus-visible, .again:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.field { display: grid; gap: 6px; }
.field span { font-size: 13px; color: var(--ink-faint); }
.field input {
  width: 100%; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; font-size: 16px; outline: none;
}
.field input:focus { border-color: var(--orange); }
.field input::placeholder { color: rgba(244, 241, 236, 0.3); }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none; cursor: pointer;
  border: 0; border-radius: 999px; padding: 15px 20px; font-weight: 600; font-size: 16px;
  background: var(--orange); color: #140a02;
  box-shadow: 0 10px 30px rgba(245, 130, 31, 0.25);
}
.btn:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.err { margin: 0; color: #ff9c8a; font-size: 14px; text-align: center; }

.result { display: grid; gap: 18px; }
.note { margin: 0; color: var(--ink-soft); font-size: 15px; }
.out { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; }
.out-text { margin: 0; font-size: 17px; font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.out-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.count { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.count.is-over { color: #ff9c8a; }
.copy { border: 1px solid var(--line); background: var(--panel-strong); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.copy.is-done { border-color: var(--ok); color: var(--ok); }

.bios { display: grid; gap: 12px; }
.bio-tag { font-size: 12px; color: var(--orange); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.bios .out-text { font-weight: 500; font-size: 16px; line-height: 1.5; }

.examples { display: grid; gap: 10px; }
.ex { border-left: 2px solid var(--orange); padding: 2px 0 2px 14px; display: grid; gap: 2px; }
.ex b { font-size: 15px; }
.ex p { margin: 0; color: var(--ink-soft); font-size: 14px; white-space: pre-wrap; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 15px; }
.checks li::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--orange); align-self: center; flex: none; }
.checks span { color: var(--ink-soft); }

.cta { background: linear-gradient(160deg, rgba(245, 130, 31, 0.16), rgba(255, 255, 255, 0.04) 60%); border-color: rgba(245, 130, 31, 0.35); }
.cta p { margin: 0; color: var(--ink-soft); }

.again { justify-self: center; background: none; border: 0; color: var(--ink-faint); text-decoration: underline; cursor: pointer; font-size: 14px; }

.foot { display: flex; align-items: center; gap: 12px; padding-top: 10px; color: var(--ink-faint); font-size: 13px; }
.foot img { border-radius: 50%; object-fit: cover; flex: none; }
.foot p { margin: 0; }

.sec-head { display: grid; gap: 8px; padding-top: 8px; }
.swipe { color: var(--orange); white-space: nowrap; }

/* Estructuras */
.structs { display: grid; gap: 14px; }
.struct { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; }
.struct-top { display: flex; gap: 12px; align-items: center; }
.struct-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #140a02; font-weight: 800; flex: none; }
.struct h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.015em; }
.struct-when { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }
.struct-rows { display: grid; gap: 8px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.struct-row { display: grid; gap: 3px; }
.struct-row + .struct-row { border-top: 1px dashed var(--line); padding-top: 8px; }
.struct-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); }
.struct-line { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }

/* Perfiles de Instagram de ejemplo */
.phones { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.phone { flex: 0 0 min(300px, 84%); scroll-snap-align: start; margin: 0; display: grid; gap: 8px; }
.phone figcaption { text-align: center; color: var(--ink-faint); font-size: 12px; }
.ig { background: #000; border: 6px solid #1c1c1f; border-radius: 26px; overflow: hidden; color: #f5f5f5; font-size: 12px; line-height: 1.35; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.ig-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 6px; font-size: 14px; }
.ig-dots { color: #aaa; letter-spacing: 1px; }
.ig-head { display: flex; align-items: center; gap: 14px; padding: 6px 14px; }
.ig-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--a); }
.ig-stats { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 4px; text-align: center; }
.ig-stats b { display: block; font-size: 13px; white-space: nowrap; }
.ig-stats span { color: #bbb; font-size: 8.5px; letter-spacing: -0.02em; display: block; white-space: nowrap; }
.ig-bio { padding: 4px 14px 16px; display: grid; gap: 3px; }
.ig-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ig-bio p { margin: 0; }
.ig-name { font-size: 12.5px; }
.ig-key { background: rgba(245, 130, 31, 0.28); color: #ffd2ad; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.ig-text { white-space: pre-line; }
.ig-link { color: #9cc4ff; font-weight: 600; }
.ig-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 2px 14px 10px; }
.ig-btns span { background: #262629; border-radius: 8px; text-align: center; padding: 6px 0; font-weight: 600; font-size: 11.5px; }
.ig-btns .is-main { background: #0095f6; }
.ig-hl { display: flex; gap: 10px; padding: 0 14px 12px; overflow: hidden; }
.ig-hl div { display: grid; justify-items: center; gap: 4px; width: 52px; flex: none; }
.ig-hl i { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid #3a3a3d; background: radial-gradient(circle at 50% 40%, var(--a), var(--b)); opacity: .85; }
.ig-hl span { font-size: 9.5px; color: #ddd; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-tile { position: relative; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; padding: 6px; font-size: 9.5px; font-weight: 800; line-height: 1.15; text-transform: uppercase; letter-spacing: -0.01em; overflow: hidden; }
.ig-tile.t0 { background: linear-gradient(160deg, var(--a), #111 85%); }
.ig-tile.t1 { background: linear-gradient(200deg, #2a2a2e, #0d0d0f); }
.ig-tile.t2 { background: linear-gradient(160deg, var(--b), #111 85%); }
.ig-pin { position: absolute; top: 4px; right: 4px; font-size: 9px; }

@media (prefers-reduced-motion: no-preference) {
  .result:not([hidden]) > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
  .result > *:nth-child(2) { animation-delay: .06s; }
  .result > *:nth-child(3) { animation-delay: .12s; }
  .result > *:nth-child(4) { animation-delay: .18s; }
  .result > *:nth-child(5) { animation-delay: .24s; }
  @keyframes rise { from { opacity: .2; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
