:root {
  --bg: #100a1c;
  --bg-gradient:
    radial-gradient(50% 30% ellipse at center top, #201e40 0%, rgba(0,0,0,0) 100%),
    radial-gradient(60% 50% ellipse at center bottom, #261226 0%, #100a1c 100%);
  --surface: rgba(32, 30, 64, 0.6);
  --surface-hover: rgba(45, 212, 191, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(45, 212, 191, 0.3);
  --text: #fff;
  --text-muted: rgba(255, 255, 255, 0.55);
  --accent: #2dd4bf;
  --accent-hover: #5ee8d4;
  --positive: #4ade80;
  --positive-bg: rgba(34, 197, 94, 0.18);
  --radius: 6px;
  --font-body: 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --font-heading: 'Inconsolata', monospace;
  --maxw: 68rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body), sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; color: var(--text-muted); }
a { color: var(--accent); }
code { font-family: var(--font-heading); background: rgba(255,255,255,0.06); padding: 0.1em 0.4em; border-radius: 4px; color: var(--accent); font-size: 0.9em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

header.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
header.hero img { width: 96px; height: auto; margin-bottom: 1.25rem; }
header.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.5rem; }
header.hero h1 span { color: var(--accent); }
header.hero p { max-width: 34rem; margin: 0 auto; }
.audio-btn {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 10;
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--accent); cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  transition: border-color .2s, background-color .2s, color .2s, transform .15s;
}
.audio-btn:hover { border-color: var(--border-hover); background: var(--surface-hover); transform: translateY(-1px); }
.audio-btn .icon-pause { display: none; }
.audio-btn.playing .icon-play { display: none; }
.audio-btn.playing .icon-pause { display: block; }
#yt-audio { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; opacity: 0; pointer-events: none; }
.top-nav { display: flex; gap: 1.5rem; justify-content: center; margin-top: 1.5rem; font-size: 0.9rem; }
.top-nav a { color: var(--text-muted); text-decoration: none; }
.top-nav a:hover { color: var(--accent); }

section { padding: 3.5rem 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
section > h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }
section > p.lead { max-width: 40rem; margin-bottom: 2rem; }

/* ── Colores ─────────────────────────────────────────────────── */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.swatch {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.swatch-color { height: 5.5rem; }
.swatch-meta { padding: 0.75rem 1rem; }
.swatch-name { font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.15rem; }
.swatch-value { font-family: var(--font-heading); font-size: 0.78rem; color: var(--text-muted); word-break: break-all; }
.swatch-usage { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.checker {
  background-image: linear-gradient(45deg, #2a2a2a 25%, transparent 25%), linear-gradient(-45deg, #2a2a2a 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #2a2a2a 75%), linear-gradient(-45deg, transparent 75%, #2a2a2a 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: #1a1a1a;
}

h3.subhead { font-family: var(--font-heading); font-size: 1rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin: 2.5rem 0 1rem; }
h3.subhead:first-of-type { margin-top: 0; }

/* ── Tipografía ──────────────────────────────────────────────── */
.type-sample { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(10px); padding: 1.5rem 1.75rem; margin-bottom: 1rem; }
.type-sample .label { font-family: var(--font-heading); font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem; }
.type-sample .heading-demo { font-family: var(--font-heading); font-weight: 700; }
.type-sample .body-demo { font-family: var(--font-body); color: var(--text); max-width: 42rem; }
.weights { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 0.75rem; }
.weights span { font-size: 1.1rem; }

/* ── Marca ───────────────────────────────────────────────────── */
.mark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.25rem; }
.mark-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); backdrop-filter: blur(10px); }
.mark-preview { height: 11rem; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.mark-preview.on-light { background: #f4f3f7; }
.mark-preview.on-dark { background: #0b0713; }
.mark-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }
.mark-meta { padding: 0.9rem 1.1rem; border-top: 1px solid var(--border); }
.mark-name { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.2rem; }
.mark-file { font-family: var(--font-heading); font-size: 0.72rem; color: var(--text-muted); }
.mark-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; background: rgba(45,212,191,0.15); color: var(--accent); margin-left: 0.4rem; }
.badge.warn { background: rgba(248, 113, 113, 0.15); color: #f87171; }

/* ── Favicon ─────────────────────────────────────────────────── */
.favicon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem; }
.favicon-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(10px); padding: 1rem; text-align: center; }
.favicon-card .frame { height: 70px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.6rem; }
.favicon-card .frame img { image-rendering: -webkit-optimize-contrast; }
.favicon-card .name { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 700; }
.favicon-card .dim { font-size: 0.72rem; color: var(--text-muted); }

/* ── Componentes ─────────────────────────────────────────────── */
.component-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.btn-primary { display: inline-flex; align-items: center; gap: 0.35rem; background-color: var(--accent); color: #06210f; font-weight: 700; padding: 0.6rem 1.2rem; border-radius: 999px; border: none; font-family: var(--font-body); font-size: 0.95rem; cursor: pointer; transition: background-color .2s, transform .15s; }
.btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-1px); }
.demo-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; backdrop-filter: blur(10px); transition: border-color .2s, transform .15s, box-shadow .2s; max-width: 22rem; }
.demo-card::before { content: ''; position: absolute; left:0; top:0; bottom:0; width:3px; background: var(--accent); opacity: 0; transition: opacity .2s; }
.demo-card:hover { border-color: var(--border-hover); transform: translateX(2px); box-shadow: 0 4px 20px rgba(45,212,191,0.06); }
.demo-card:hover::before { opacity: 1; }
.demo-card h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.demo-card p { font-size: 0.85rem; margin: 0; }
.demo-input { padding: 0.65rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); backdrop-filter: blur(10px); font-family: var(--font-body); font-size: 0.9rem; }
.demo-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,212,191,0.12); outline: none; }
.badge-positive { display: inline-block; padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--positive-bg); color: var(--positive); font-weight: 600; font-size: 0.85rem; }

footer { padding: 2.5rem 0 3.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
footer a { color: var(--accent); }
