/* Ruidario · "noche de cristal" */
:root {
  color-scheme: dark;
  --bg: #070B14;
  --bg-2: #0B1120;
  --text: #F4F6FB;
  --muted: #B9C1D6;
  --soft: #8E98B3;
  --accent: #F5C46B;
  --accent-ink: #1A1206;
  --blue: #3D5BD9;
  --amber: #E89B3C;
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .11);
  --warn-bg: rgba(232, 155, 60, .12);
  --warn-line: rgba(232, 155, 60, .45);
  --radius: 18px;
  --maxw: 760px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 85% -120px, rgba(61, 91, 217, .30), transparent 70%),
    radial-gradient(700px 480px at -10% 30%, rgba(232, 155, 60, .10), transparent 70%),
    radial-gradient(800px 600px at 110% 90%, rgba(61, 91, 217, .14), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font: 17px/1.65 var(--font);
  overflow-x: hidden;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1040px; }

/* Header */
.site-header { padding: 14px 0; border-bottom: 1px solid var(--line); background: rgba(7, 11, 20, .6); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; letter-spacing: .14em; font-size: 14px; }
.logo svg { flex: none; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 10px; }
.site-nav a:hover { color: var(--text); background: var(--glass); }
.site-nav .nav-cta { color: var(--accent-ink); background: var(--accent); font-weight: 650; }
.site-nav .nav-cta:hover { color: var(--accent-ink); background: #F8D28D; }
@media (max-width: 520px) { .site-nav .hide-sm { display: none; } }

/* Typography */
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(30px, 7vw, 46px); margin: 8px 0 14px; font-weight: 780; }
h2 { font-size: clamp(23px, 4.6vw, 29px); margin: 46px 0 12px; font-weight: 720; }
h3 { font-size: 19px; margin: 28px 0 8px; font-weight: 680; }
p { margin: 0 0 16px; }
p, li, dd { color: var(--muted); }
strong { color: var(--text); font-weight: 650; }
ul, ol { padding-left: 22px; margin: 0 0 18px; }
li { margin: 6px 0; }
.lede { font-size: 19px; color: var(--text); opacity: .92; }
.eyebrow { color: var(--accent); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; margin: 0; }
.meta { color: var(--soft); font-size: 14px; }
.small { font-size: 14px; color: var(--soft); }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* Breadcrumb */
.crumbs { margin: 22px 0 0; font-size: 14px; color: var(--soft); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { margin: 0; color: var(--soft); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--soft); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* Cards */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 22px 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 50px -30px rgba(0, 0, 0, .8); }
@supports (backdrop-filter: blur(8px)) { .card { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); } }
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid .card { margin: 0; }
.link-card { display: block; text-decoration: none; color: var(--text); transition: border-color .15s, background .15s; }
.link-card:hover { border-color: rgba(245, 196, 107, .5); background: var(--glass-strong); }
.link-card strong { display: block; margin-bottom: 4px; }
.link-card span { color: var(--muted); font-size: 15px; }

/* Hero */
.hero { padding: 44px 0 10px; }
.hero h1 { font-size: clamp(34px, 8.5vw, 56px); }
.hero .lede { max-width: 640px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px; border-radius: 14px; font-weight: 680; text-decoration: none; font-size: 16px; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px rgba(245, 196, 107, .6); }
.btn-primary:hover { background: #F8D28D; }
.btn-ghost { color: var(--text); background: var(--glass); border-color: var(--line); }
.btn-ghost:hover { background: var(--glass-strong); }

/* Steps */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.steps li { counter-increment: s; margin: 0; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(245, 196, 107, .14); color: var(--accent); font-weight: 750; margin-bottom: 10px; border: 1px solid rgba(245, 196, 107, .35); }
.steps strong { display: block; margin-bottom: 4px; }

/* Facts (city data) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 22px 0; }
.fact { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.fact dt { font-size: 13px; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; font-weight: 650; }
.fact dd { margin: 4px 0 0; color: var(--text); font-size: 20px; font-weight: 700; line-height: 1.3; }
.fact dd small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }

/* Callouts */
.note { border-left: 3px solid var(--blue); background: rgba(61, 91, 217, .10); border-radius: 0 14px 14px 0; padding: 14px 16px; margin: 22px 0; }
.note p:last-child { margin: 0; }
.warn { border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: 14px; padding: 14px 16px; margin: 22px 0; }
.warn p:last-child { margin: 0; }
.disclaimer { font-size: 14px; color: var(--soft); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; margin: 18px 0; }

/* CTA box */
.cta-box { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px; margin: 34px 0;
  background: linear-gradient(135deg, rgba(61, 91, 217, .22), rgba(232, 155, 60, .12)); border: 1px solid rgba(245, 196, 107, .28); }
.cta-box h2, .cta-box h3 { margin: 0 0 8px; font-size: 21px; }
.cta-box p { color: var(--text); opacity: .88; }
.cta-box .btn { margin-top: 4px; }
.cta-box .small { margin: 10px 0 0; opacity: 1; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 480px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text); background: var(--glass-strong); font-weight: 650; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }

/* TOC */
.toc { font-size: 15px; }
.toc ol { margin: 6px 0 0; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* Letter */
.letter { position: relative; background: #0E1526; border: 1px solid var(--line); border-radius: 14px; margin: 18px 0 26px; }
.letter pre { margin: 0; padding: 18px; white-space: pre-wrap; word-wrap: break-word; font: 15px/1.6 var(--font); color: var(--text); }
.letter-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--soft); }
.copy-btn { display: none; font: 600 14px var(--font); background: var(--glass-strong); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-height: 38px; }
.js .copy-btn { display: inline-block; }
.copy-btn:hover { border-color: var(--accent); }

/* FAQ */
.faq details { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; }
.faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 650; color: var(--text); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 11px; font-size: 22px; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 16px 14px; }
.faq details > div p:last-child { margin: 0; }

/* Sources */
.sources { font-size: 15px; }
.sources li { color: var(--soft); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chips a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 15px; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }

/* Footer */
.site-footer { margin-top: 70px; padding: 34px 0 44px; border-top: 1px solid var(--line); background: rgba(7, 11, 20, .55); font-size: 15px; }
.foot-cols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .small { margin-top: 26px; }

main { padding-bottom: 10px; }
.page-head { padding: 6px 0 4px; }
.legal h2 { font-size: 21px; margin-top: 34px; }
.placeholder { background: rgba(245, 196, 107, .16); color: var(--accent); padding: 0 4px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { body { background: #fff; color: #000; } .site-header, .site-footer, .cta-box, .copy-btn { display: none; } p, li, td { color: #000; } }
