/* televisores-baratos.com — "Sonos" (DESIGN.md).
   Gallery wall of warm light: achromatic system — Concrete #f5f5f5 canvas,
   white cards at 20px with 48px padding, black full-bleed sections, 80px
   pill buttons, weight-400 poster type at massive scale with line-height
   1.0, announcement bar, non-sticky white nav, section rhythm by
   background alternation (concrete → white → black). Zero chromatic
   accents — the only warmth is the screen glow illustration. */

/* ── Fonts (substitute per DESIGN.md: Inter ≈ aktiv-grotesk) ── */
@font-face { font-family: 'Inter'; src: url('/fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ── Tokens ── */
:root {
    --obsidian: #000000;
    --paper: #ffffff;
    --concrete: #f5f5f5;
    --graphite: #2e2e2e;
    --mist: #e0e0e0;
    --ash: #cdcdcd;
    --smoke: #bfbfbf;
    --slate: #737373;
    --charcoal: #5f5f5f;

    --font-ui: 'Inter', ui-sans-serif, system-ui, sans-serif;

    --r-card: 20px;
    --r-small: 10px;
    --r-btn: 80px;
    --r-pill: 9999px;

    --page-max: 1280px;
    --narrow-max: 760px;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
    margin: 0;
    background: var(--concrete);
    color: var(--obsidian);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--obsidian); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-weight: 400; margin: 0 0 0.5em; }
:focus-visible { outline: 2px solid var(--obsidian); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--obsidian); color: var(--paper); padding: 12px 24px; border-radius: var(--r-btn); font-weight: 500; }
.skip-link:focus { left: 16px; top: 100px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Type roles (weight 400 at scale) ── */
.poster { font-size: clamp(38px, 6vw, 84px); line-height: 1.02; font-weight: 400; color: var(--paper); margin: 0 0 26px; }
.poster-dark { font-size: clamp(34px, 5vw, 64px); line-height: 1.02; font-weight: 400; color: var(--obsidian); margin: 0 0 18px; }
.display-sm { font-size: clamp(28px, 3.8vw, 44px); line-height: 1.1; font-weight: 400; margin: 0 0 20px; }
.display-sm.inv { color: var(--paper); }
.overline { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--smoke); margin: 0 0 20px; }
.overline-dark { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin: 0 0 16px; }
.dark-sub { font-size: 17px; line-height: 1.55; color: var(--smoke); max-width: 640px; margin: 0 0 28px; }
.body-mid { font-size: 17px; line-height: 1.55; color: var(--charcoal); max-width: 640px; margin: 0 0 20px; }
.slatelink { font-size: 15px; font-weight: 500; color: var(--obsidian); }
.whitelink { color: var(--paper); }
.pillghost { display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--obsidian); border: 1px solid var(--obsidian); border-radius: var(--r-pill); padding: 7px 18px; }
.pillghost-light { display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--paper); border: 1px solid var(--paper); border-radius: var(--r-pill); padding: 7px 18px; }

/* ── Buttons (80px pills) ── */
.btn-obsidian {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--obsidian); color: var(--paper);
    font-family: var(--font-ui); font-weight: 500; font-size: 16px;
    border: 0; border-radius: var(--r-btn);
    padding: 14px 30px; cursor: pointer; text-decoration: none;
}
.btn-obsidian:hover { background: var(--graphite); text-decoration: none; }
.btn-paper {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--paper); color: var(--obsidian);
    font-family: var(--font-ui); font-weight: 500; font-size: 16px;
    border: 0; border-radius: var(--r-btn);
    padding: 14px 30px; cursor: pointer; text-decoration: none;
}
.btn-paper:hover { background: var(--mist); text-decoration: none; }
.btn-ghost-light {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: transparent; color: var(--paper);
    font-family: var(--font-ui); font-weight: 500; font-size: 16px;
    border: 1px solid var(--paper); border-radius: var(--r-pill);
    padding: 13px 29px; cursor: pointer; text-decoration: none;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }
.btn-ghost-dark {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: transparent; color: var(--obsidian);
    font-family: var(--font-ui); font-weight: 500; font-size: 16px;
    border: 1px solid var(--obsidian); border-radius: var(--r-pill);
    padding: 13px 29px; cursor: pointer; text-decoration: none;
}
.btn-ghost-dark:hover { background: var(--concrete); text-decoration: none; }
.btn-lg { font-size: 16px; padding: 16px 32px; }
.btn-sm { font-size: 14px; padding: 9px 20px; }

/* ── Announcement bar ── */
.announce {
    background: var(--obsidian); color: var(--paper);
    font-size: 14px; text-align: center;
    padding: 12px 20px; margin: 0;
}

/* ── Nav (white, non-sticky) ── */
.nav { background: var(--paper); }
.nav-in {
    max-width: var(--page-max); margin: 0 auto;
    height: 64px; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-word { font-weight: 700; font-size: 15px; letter-spacing: 0.14em; color: var(--obsidian); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-a { font-size: 14px; font-weight: 400; color: var(--obsidian); text-decoration: none; }
.nav-a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-a.is-here { font-weight: 700; }
.nav-burger { display: none; font-family: var(--font-ui); font-weight: 500; font-size: 14px; background: transparent; border: 1px solid var(--obsidian); border-radius: var(--r-pill); padding: 8px 18px; cursor: pointer; color: var(--obsidian); }
.nav-sheet { display: none; background: var(--paper); border-top: 1px solid var(--mist); padding: 14px 24px 24px; }
.nav-sheet.is-open { display: flex; flex-direction: column; gap: 2px; }
.nav-sheet-a { font-weight: 400; font-size: 28px; line-height: 1.15; color: var(--obsidian); text-decoration: none; padding: 9px 0; }
.nav-sheet-a:hover { text-decoration: underline; }
.nav-sheet-cta { margin-top: 14px; align-self: flex-start; }
@media (max-width: 820px) {
    .nav-links { display: none; }
    .nav-burger { display: inline-flex; }
}

/* ── Dark full-bleed hero ── */
.dark-hero { background: var(--obsidian); padding: 96px 24px 0; text-align: center; overflow: hidden; }
.dark-hero.err { padding-bottom: 96px; }
.dark-hero-in { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.dark-hero .dark-sub { margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.tvglow { margin-top: 56px; width: min(100%, 560px); }
.tvglow svg { width: 100%; height: auto; display: block; }
@media (max-width: 820px) { .dark-hero { padding: 56px 20px 0; } .tvglow { margin-top: 36px; } }

/* ── Bands (background alternation) ── */
.band { padding: 80px 24px; }
.band-white { background: var(--paper); }
.band-dark { background: var(--obsidian); color: var(--paper); }
.band-in { max-width: var(--page-max); margin: 0 auto; }
.band-in.narrow, .narrow { max-width: var(--narrow-max); }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.page-head { margin-bottom: 44px; }
@media (max-width: 820px) { .band { padding: 52px 20px; } }

/* ── Pillar card ── */
.pillarcard { background: var(--concrete); border-radius: var(--r-card); padding: 48px; display: flex; flex-direction: column; align-items: flex-start; }
@media (max-width: 820px) { .pillarcard { padding: 28px 24px; } }

/* ── Size grid (dark discovery band) ── */
.sizegrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 36px; }
.sizetile {
    background: var(--graphite); border-radius: var(--r-small);
    padding: 26px 22px; text-decoration: none; color: var(--paper);
    display: flex; flex-direction: column; gap: 6px;
}
.sizetile:hover { background: #3a3a3a; text-decoration: none; }
.sizetile-n { font-size: 30px; font-weight: 400; line-height: 1; }
.sizetile-d { font-size: 13px; color: var(--smoke); }

/* ── Cards (white 20px on concrete) ── */
.cardgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.scard { background: var(--paper); border-radius: var(--r-card); }
.band-white .scard { background: var(--concrete); }
.scard > a { display: flex; flex-direction: column; height: 100%; padding: 34px 32px; color: var(--obsidian); text-decoration: none; }
.scard-static { padding: 34px 32px; }
.scard-meta { font-size: 13px; color: var(--slate); margin: 0 0 12px; }
.scard-title { font-size: 22px; font-weight: 400; line-height: 1.25; margin: 0 0 10px; }
.scard-desc { font-size: 15px; line-height: 1.55; color: var(--charcoal); margin: 0 0 22px; }
.scard .pillghost { margin-top: auto; align-self: flex-start; }
.scard > a:hover .pillghost { background: var(--obsidian); color: var(--paper); }

/* dark cards */
.dcard { background: var(--graphite); border-radius: var(--r-card); }
.dcard > a { display: flex; flex-direction: column; height: 100%; padding: 34px 32px; color: var(--paper); text-decoration: none; }
.dcard-meta { font-size: 13px; color: var(--smoke); margin: 0 0 12px; }
.dcard-title { font-size: 22px; font-weight: 400; line-height: 1.25; color: var(--paper); margin: 0 0 10px; }
.dcard-desc { font-size: 15px; line-height: 1.55; color: var(--smoke); margin: 0 0 22px; }
.dcard .pillghost-light { margin-top: auto; align-self: flex-start; }
.dcard > a:hover .pillghost-light { background: var(--paper); color: var(--obsidian); }

/* ── Breadcrumb ── */
.breadcrumb { margin-bottom: 30px; }
.breadcrumb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--slate); }
.breadcrumb-list li + li::before { content: '·'; margin-right: 6px; }
.breadcrumb-list a { color: var(--charcoal); text-decoration: none; }
.breadcrumb-list a:hover { text-decoration: underline; }
.breadcrumb-list span[aria-current] { display: inline-block; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ── Article ── */
.article-head { margin-bottom: 36px; }
.article-title { margin-bottom: 16px; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.byline-img { border-radius: 50%; background: var(--paper); flex: none; }
.byline-txt { margin: 0; font-size: 15px; }
.byline-txt a { font-weight: 500; text-decoration: none; }
.byline-txt a:hover { text-decoration: underline; }
.byline-meta { display: block; font-size: 13px; color: var(--slate); margin-top: 3px; }
.article-cover { margin: 0 0 36px; }
.article-cover img { border-radius: var(--r-card); width: 100%; }
.article-sheet { background: var(--paper); border-radius: var(--r-card); padding: clamp(24px, 5vw, 48px); }

.toc { background: var(--concrete); border-radius: var(--r-small); padding: 24px 28px; margin-bottom: 40px; }
.toc-title { font-weight: 500; font-size: 16px; margin: 0 0 12px; }
.toc-list { margin: 0; padding: 0 0 0 22px; font-size: 14px; line-height: 1.5; }
.toc-list li { margin-bottom: 7px; }
.toc-list li::marker { color: var(--slate); }
.toc-list a { color: var(--charcoal); text-decoration: none; }
.toc-list a:hover, .toc-list a.is-current { color: var(--obsidian); text-decoration: underline; text-underline-offset: 3px; }

/* ── Prose ── */
.prose { font-size: 16.5px; line-height: 1.65; color: #1c1c1c; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.15; font-weight: 400; margin: 1.9em 0 0.6em; }
.prose h3 { font-size: 21px; font-weight: 500; line-height: 1.3; margin: 1.6em 0 0.5em; }
.prose h4 { font-size: 17px; font-weight: 500; margin: 1.4em 0 0.5em; }
.prose ul, .prose ol { margin: 0 0 1.25em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--slate); }
.prose img { border-radius: var(--r-small); display: block; margin: 2em auto; }
.prose figure { margin: 2em 0; }
.prose strong { font-weight: 700; }
.prose blockquote {
    margin: 2em 0; padding: 20px 26px;
    background: var(--concrete); border-radius: var(--r-small);
    color: var(--charcoal); font-size: 15px;
}
.prose blockquote p { margin: 0 0 0.8em; }
.prose blockquote p:last-child { margin: 0; }
.prose table {
    display: block; overflow-x: auto;
    width: fit-content; max-width: 100%;
    border-collapse: collapse; margin: 2em 0;
    background: var(--concrete); border-radius: var(--r-small);
    font-size: 14px;
}
.prose th, .prose td { padding: 11px 16px; text-align: left; vertical-align: top; }
.prose thead th { font-weight: 700; border-bottom: 1px solid var(--ash); }
.prose tbody tr + tr td { border-top: 1px solid var(--mist); }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--mist); padding: 2px 6px; border-radius: 4px; }
.prose .legal-updated, .legal-updated { font-size: 13px; color: var(--slate); }

/* ── Author page (shared src/views/autor.php) ── */
.author-head { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; background: var(--paper); border-radius: var(--r-card); padding: 40px; }
.author-head__avatar img { border-radius: 50%; width: 104px; height: 104px; background: var(--concrete); }
.author-head__eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); margin: 0 0 8px; }
.author-head__name { font-size: clamp(30px, 4.5vw, 52px); font-weight: 400; line-height: 1.02; margin: 0 0 6px; }
.author-head__role { font-size: 15px; color: var(--charcoal); margin: 0; }
.author-approach { list-style: none; margin: 0 0 1.5em; padding: 0; display: grid; gap: 14px; }
.author-approach li { background: var(--concrete); border-radius: var(--r-small); padding: 20px 24px; }
.author-approach strong { display: block; font-weight: 500; margin-bottom: 4px; }
.author-posts { list-style: none; margin: 0; padding: 0; }
.author-posts li { margin-bottom: 12px; }
.author-posts .meta { display: block; font-size: 13px; color: var(--slate); }
@media (max-width: 820px) { .author-head { padding: 24px; } }

/* ── Author callout (shared partial) ── */
.about-author {
    display: flex; align-items: center; gap: 20px;
    background: var(--obsidian); border-radius: var(--r-card);
    padding: 32px 36px; color: var(--paper); text-decoration: none;
}
.about-author:hover { background: var(--graphite); text-decoration: none; }
.about-author__img { border-radius: 50%; background: var(--concrete); flex: none; }
.about-author__txt { display: flex; flex-direction: column; gap: 2px; }
.about-author__k { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--smoke); }
.about-author__n { font-weight: 400; font-size: 24px; color: var(--paper); }
.about-author__r { font-size: 14px; color: var(--smoke); }
.about-author__cta { font-size: 14px; font-weight: 500; color: var(--paper); border: 1px solid var(--paper); border-radius: var(--r-pill); padding: 6px 16px; margin-top: 10px; align-self: flex-start; }

/* ── Shared fallback scaffolding ── */
.section { padding: 80px 24px; }
.container { max-width: var(--page-max); margin: 0 auto; }
.container-narrow { max-width: var(--narrow-max); }
@media (max-width: 820px) { .section { padding: 52px 20px; } }

/* ── Productos (shared src/views/productos.php) ── */
.prod-disclosure { background: var(--paper); border-radius: var(--r-small); padding: 18px 24px; margin: 24px 0 32px; font-size: 14px; color: var(--charcoal); }
.prod-disclosure p { margin: 0; }
.prod-jumpnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.prod-jumpnav a {
    font-size: 14px; font-weight: 500;
    color: var(--obsidian); text-decoration: none;
    border: 1px solid var(--obsidian); border-radius: var(--r-pill); padding: 8px 20px;
}
.prod-jumpnav a:hover { background: var(--obsidian); color: var(--paper); }
.prod-cat { margin-bottom: 64px; }
.prod-cat h2 { font-size: clamp(26px, 3.2vw, 40px); font-weight: 400; margin-bottom: 26px; }
.prod-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.prod-card { background: var(--paper); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.prod-card-media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--graphite); }
.prod-card-badge {
    position: absolute; top: 14px; left: 14px;
    font-size: 12px; font-weight: 500;
    background: var(--paper); color: var(--obsidian);
    border-radius: var(--r-pill); padding: 5px 13px;
}
.prod-card-img { width: 100%; height: 100%; object-fit: cover; }
.prod-card-illus svg { width: 64px; height: 64px; }
.prod-card-body { padding: 26px 30px 30px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.prod-card-title { font-size: 20px; font-weight: 400; margin: 0; }
.prod-card-blurb { font-size: 14px; line-height: 1.55; color: var(--charcoal); margin: 0; }
.prod-card-seen { font-size: 13px; color: var(--slate); margin: 0; }
.prod-card-cta {
    margin-top: auto; align-self: flex-start;
    background: var(--obsidian); color: var(--paper);
    font-weight: 500; font-size: 15px;
    border-radius: var(--r-btn); padding: 11px 24px; text-decoration: none;
}
.prod-card-cta:hover { background: var(--graphite); text-decoration: none; }

/* ── Newsletter (white band) ── */
.nl { background: var(--paper); padding: 80px 24px; text-align: center; }
.nl-in { max-width: 680px; margin: 0 auto; }
.nl-in h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 400; line-height: 1.08; margin: 0 0 14px; }
.nl-sub { font-size: 16px; color: var(--charcoal); max-width: 52ch; margin: 0 auto 30px; }
.nl-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.nl-form input[type="email"] {
    font-family: var(--font-ui); font-size: 16px;
    background: var(--concrete); color: var(--obsidian);
    border: 1px solid transparent; border-radius: var(--r-btn);
    padding: 14px 24px; flex: 1 1 260px; min-width: 0; max-width: 340px;
}
.nl-form input[type="email"]:focus { outline: none; border-color: var(--obsidian); background: var(--paper); }
.nl-form input[aria-invalid="true"] { border-color: #b00020; }
.nl-form .btn-paper { background: var(--obsidian); color: var(--paper); }
.nl-form .btn-paper:hover { background: var(--graphite); }
.newsletter-ok { font-weight: 500; font-size: 19px; margin: 0; }
.nl-micro { font-size: 13px; color: var(--slate); margin: 16px 0 0; }

/* ── Footer (concrete) ── */
.foot { background: var(--concrete); border-top: 1px solid var(--mist); padding: 64px 24px 28px; }
.foot-in { max-width: var(--page-max); margin: 0 auto; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.foot-tag { font-size: 14px; line-height: 1.6; color: var(--charcoal); max-width: 46ch; margin: 14px 0 0; }
.foot-col h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }
.foot-col a { display: block; font-size: 14px; color: var(--obsidian); text-decoration: none; padding: 4px 0; }
.foot-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-base { font-size: 13px; color: var(--slate); border-top: 1px solid var(--mist); padding-top: 20px; margin: 0; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ── Cookie banner (AEPD) ── */
.cookiebox { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; display: none; }
.cookiebox.is-visible { display: block; }
.cookiebox-in {
    max-width: 680px; margin: 0 auto;
    background: var(--paper); border: 1px solid var(--mist); border-radius: var(--r-card);
    padding: 20px 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cookiebox-in p { margin: 0; font-size: 14px; color: var(--charcoal); flex: 1 1 300px; }
.cookiebox-actions { display: flex; gap: 10px; }
