/* mejores-moviles.com — "Fold" (DESIGN.md).
   Bauhaus poster on fog: Fog White #f0f1f5 canvas, Midnight Navy poster
   type at weight 700 with tight tracking, white 12px cards lifted by
   NAVY-TINTED shadows (the shadows are on-brand), pill nav flotante,
   navy filled pill CTAs, Electric Blue #459af8 for links only, one
   Voltage Yellow callout per page maximum. Radii: 12px cards / 9999px
   pills / 24px panels — nothing else. */

/* ── Fonts (substitute per DESIGN.md family: Figtree ≈ GT Walsheim Pro) ── */
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ── Tokens ── */
:root {
    --navy: #20294c;
    --steel: #375390;
    --blue: #459af8;
    --fog: #f0f1f5;
    --white: #ffffff;
    --silver: #c7cbdb;
    --mistg: #dddfe9;
    --smoke: #979db5;
    --dusk: #676b89;
    --abyss: #042939;
    --volt: #ffff00;

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

    --r-card: 12px;
    --r-panel: 24px;
    --r-pill: 9999px;

    --sh-card: rgba(32, 41, 76, 0.12) 0px 9px 25px 0px;
    --sh-nav: rgba(32, 41, 76, 0.12) 0px 6px 16px 0px, rgba(32, 41, 76, 0.09) 0px 1px 5px 0px;
    --sh-nested: rgba(32, 41, 76, 0.07) 0px 4px 11px 0px, rgba(32, 41, 76, 0.12) 0px 1px 3px 0px;
    --sh-btn: rgba(32, 41, 76, 0.1) 0px 1px 4px 0px;

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

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

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--navy); color: var(--white); padding: 10px 20px; border-radius: var(--r-pill); font-weight: 600; }
.skip-link:focus { left: 16px; top: 90px; }
.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 ── */
.display {
    font-size: clamp(40px, 7vw, 84px);
    line-height: 0.95; letter-spacing: -0.06em;
    margin: 0 0 24px;
}
.heading-lg { font-size: clamp(34px, 5vw, 56px); line-height: 0.95; letter-spacing: -0.04em; margin: 0 0 18px; }
.heading { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; }
.hero-sub { font-size: 18px; line-height: 1.5; color: var(--dusk); max-width: 620px; margin: 0 0 28px; }
.body-dusk { font-size: 18px; line-height: 1.55; color: var(--dusk); max-width: 62ch; margin: 0 0 18px; }
.bluelink { color: var(--blue); font-weight: 600; font-size: 16px; }
.tagpill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--fog); color: var(--smoke);
    font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    border-radius: var(--r-pill); padding: 6px 12px; margin: 0 0 16px;
}

/* ── Buttons ── */
.btn-navy {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--navy); color: var(--white);
    font-family: var(--font-ui); font-weight: 600; font-size: 16px;
    border: 0; border-radius: var(--r-pill);
    padding: 12px 22px; cursor: pointer; text-decoration: none;
    box-shadow: var(--sh-btn);
}
.btn-navy:hover { background: #2b3763; text-decoration: none; }
.btn-steel {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: transparent; color: var(--steel);
    font-family: var(--font-ui); font-weight: 600; font-size: 16px;
    border: 1.5px solid var(--steel); border-radius: var(--r-pill);
    padding: 10.5px 20.5px; cursor: pointer; text-decoration: none;
}
.btn-steel:hover { background: var(--white); text-decoration: none; }
.btn-lg { font-size: 17px; padding: 14px 26px; }
.btn-sm { font-size: 14px; padding: 8px 16px; }

/* ── Floating pill nav ── */
.navwrap { position: sticky; top: 12px; z-index: 100; padding: 0 16px; }
.navpill {
    max-width: 860px; margin: 12px auto 0;
    background: var(--fog);
    border-radius: var(--r-panel);
    box-shadow: var(--sh-nav);
    padding: 10px 12px 10px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand { display: inline-flex; align-items: center; gap: 9px; }
.nav-word { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--navy); }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-a { font-weight: 600; font-size: 16px; color: var(--navy); }
.nav-a:hover { color: var(--blue); text-decoration: none; }
.nav-a.is-here { color: var(--blue); }
.nav-burger {
    display: none; background: var(--white); border: 0; border-radius: var(--r-pill);
    box-shadow: var(--sh-btn); width: 44px; height: 40px; padding: 13px 12px;
    cursor: pointer; flex-direction: column; justify-content: space-between;
}
.nav-burger span { display: block; height: 2px; border-radius: 1px; background: var(--navy); }
.navsheet {
    display: none; max-width: 860px; margin: 8px auto 0;
    background: var(--white); border-radius: var(--r-panel);
    box-shadow: var(--sh-nav); padding: 18px 24px 24px;
}
.navsheet.is-open { display: flex; flex-direction: column; gap: 2px; }
.navsheet-a { font-weight: 700; font-size: 24px; letter-spacing: -0.02em; color: var(--navy); padding: 9px 0; }
.navsheet-a:hover { color: var(--blue); text-decoration: none; }
.navsheet-cta { margin-top: 14px; align-self: flex-start; }
@media (max-width: 820px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
}

/* ── Hero (poster) ── */
.hero { padding: 64px 20px 48px; text-align: center; }
.hero-in { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero-cluster svg { width: min(100%, 520px); height: auto; margin-bottom: 8px; }
.hero .hero-sub { margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.tagrow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.tagrow .tagpill { margin: 0; background: var(--white); box-shadow: var(--sh-btn); }

/* ── Bands ── */
.band { padding: 48px 20px 0; }
.band:last-of-type { padding-bottom: 48px; }
.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: 28px; }
.page-head { margin-bottom: 36px; }

/* ── Voltage callout (once per page) ── */
.voltage {
    background: var(--volt); color: var(--abyss);
    border-radius: var(--r-card);
    box-shadow: rgba(255, 255, 255, 0.53) 0px 1px 0px 0px inset;
    padding: 36px 40px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.voltage-t { font-weight: 700; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.voltage-d { font-size: 17px; line-height: 1.5; color: #123; max-width: 60ch; margin: 0 0 10px; }
@media (max-width: 820px) { .voltage { padding: 26px 24px; } }

/* ── Cards ── */
.cardgrid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.fcard { background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-card); }
.fcard > a { display: flex; flex-direction: column; height: 100%; padding: 24px; color: var(--navy); }
.fcard > a:hover { text-decoration: none; }
.fcard-static { padding: 24px; }
.fcard-title { font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 10px; }
.fcard-desc { font-size: 16px; line-height: 1.5; color: var(--dusk); margin: 0 0 16px; }
.fcard .bluelink { margin-top: auto; }
.fcard > a:hover .bluelink { text-decoration: underline; }

/* ── Breadcrumb ── */
.breadcrumb { margin-bottom: 28px; }
.breadcrumb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; letter-spacing: 0.02em; color: var(--smoke); }
.breadcrumb-list li + li::before { content: '·'; margin-right: 6px; }
.breadcrumb-list a { color: var(--dusk); }
.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: 32px; }
.article-title { margin-bottom: 16px; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.byline-img { border-radius: 50%; background: var(--white); box-shadow: var(--sh-btn); flex: none; }
.byline-txt { margin: 0; font-size: 15px; color: var(--navy); }
.byline-txt a { color: var(--navy); font-weight: 600; }
.byline-meta { display: block; font-size: 13px; color: var(--smoke); margin-top: 2px; }
.article-cover { margin: 0 0 32px; }
.article-cover img { border-radius: 16px; box-shadow: var(--sh-nav); width: 100%; }
.article-sheet { background: var(--white); border-radius: var(--r-panel); box-shadow: var(--sh-card); padding: clamp(24px, 5vw, 48px); }

.toc { background: var(--fog); border-radius: var(--r-card); padding: 22px 26px; margin-bottom: 36px; }
.toc-title { font-weight: 600; font-size: 17px; margin: 0 0 12px; }
.toc-list { margin: 0; padding: 0 0 0 22px; font-size: 15px; line-height: 1.5; }
.toc-list li { margin-bottom: 7px; }
.toc-list li::marker { color: var(--smoke); font-weight: 600; }
.toc-list a { color: var(--dusk); }
.toc-list a:hover, .toc-list a.is-current { color: var(--blue); }

/* ── Prose ── */
.prose { font-size: 17px; line-height: 1.65; color: #333a58; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { font-weight: 700; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -0.025em; margin: 1.9em 0 0.6em; }
.prose h3 { font-weight: 600; font-size: 23px; line-height: 1.2; letter-spacing: -0.02em; margin: 1.6em 0 0.5em; }
.prose h4 { font-weight: 600; font-size: 19px; 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(--smoke); }
.prose img { border-radius: 16px; box-shadow: var(--sh-nested); display: block; margin: 2em auto; }
.prose figure { margin: 2em 0; }
.prose strong { color: var(--navy); font-weight: 700; }
.prose a { color: var(--blue); }
.prose blockquote {
    margin: 2em 0; padding: 20px 24px;
    background: var(--fog); border-radius: var(--r-card);
    color: var(--dusk); font-size: 16px;
}
.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(--white); border-radius: var(--r-card);
    box-shadow: var(--sh-nested);
    font-size: 15px;
}
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; }
.prose thead th { font-weight: 600; color: var(--navy); border-bottom: 2px solid var(--fog); font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
.prose tbody tr + tr td { border-top: 1px solid var(--fog); }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--fog); padding: 2px 6px; border-radius: 6px; }
.prose .legal-updated, .legal-updated { font-size: 13px; color: var(--smoke); }

/* ── Author page (shared src/views/autor.php) ── */
.author-profile .prose, .author-profile .author-head { background: transparent; }
.author-head { display: flex; align-items: center; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; background: var(--white); border-radius: var(--r-panel); box-shadow: var(--sh-card); padding: 32px; }
.author-head__avatar img { border-radius: 50%; width: 104px; height: 104px; background: var(--fog); }
.author-head__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--smoke); margin: 0 0 8px; }
.author-head__name { font-size: clamp(30px, 4.5vw, 48px); line-height: 1; letter-spacing: -0.035em; margin: 0 0 6px; }
.author-head__role { font-size: 16px; color: var(--dusk); margin: 0; }
.author-approach { list-style: none; margin: 0 0 1.5em; padding: 0; display: grid; gap: 16px; }
.author-approach li { background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-nested); padding: 20px 24px; }
.author-approach strong { display: block; color: var(--navy); 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(--smoke); }

/* ── Author callout (shared partial) ── */
.about-author {
    display: flex; align-items: center; gap: 20px;
    background: var(--white); border-radius: var(--r-panel); box-shadow: var(--sh-card);
    padding: 26px 30px; color: var(--navy);
}
.about-author:hover { text-decoration: none; }
.about-author__img { border-radius: 50%; background: var(--fog); flex: none; }
.about-author__txt { display: flex; flex-direction: column; gap: 2px; }
.about-author__k { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--smoke); }
.about-author__n { font-weight: 700; font-size: 23px; letter-spacing: -0.02em; }
.about-author__r { font-size: 15px; color: var(--dusk); }
.about-author__cta { font-size: 15px; font-weight: 600; color: var(--blue); margin-top: 6px; }
.about-author:hover .about-author__cta { text-decoration: underline; }

/* ── Shared fallback scaffolding ── */
.section { padding: 48px 20px 0; }
.section:last-of-type { padding-bottom: 48px; }
.container { max-width: var(--page-max); margin: 0 auto; }
.container-narrow { max-width: var(--narrow-max); }

/* ── Productos (shared src/views/productos.php) ── */
.prod-disclosure { background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-nested); padding: 18px 24px; margin: 24px 0 32px; font-size: 15px; color: var(--dusk); }
.prod-disclosure p { margin: 0; }
.prod-jumpnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.prod-jumpnav a {
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--steel); background: var(--white);
    border-radius: var(--r-pill); box-shadow: var(--sh-btn); padding: 8px 16px;
}
.prod-jumpnav a:hover { color: var(--navy); text-decoration: none; }
.prod-cat { margin-bottom: 56px; }
.prod-cat h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.03em; margin-bottom: 24px; }
.prod-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.prod-card { background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-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(--fog); margin: 10px; border-radius: 8px; overflow: hidden; }
.prod-card-badge {
    position: absolute; top: 10px; left: 10px;
    font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    background: var(--white); color: var(--smoke); box-shadow: var(--sh-btn);
    border-radius: var(--r-pill); padding: 5px 11px;
}
.prod-card-img { width: 100%; height: 100%; object-fit: cover; }
.prod-card-illus svg { width: 64px; height: 64px; }
.prod-card-body { padding: 16px 24px 24px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.prod-card-title { font-weight: 600; font-size: 20px; letter-spacing: -0.02em; margin: 0; }
.prod-card-blurb { font-size: 15px; line-height: 1.5; color: var(--dusk); margin: 0; }
.prod-card-seen { font-size: 13px; color: var(--smoke); margin: 0; }
.prod-card-cta {
    margin-top: auto; align-self: flex-start;
    background: var(--navy); color: var(--white);
    font-weight: 600; font-size: 15px;
    border-radius: var(--r-pill); padding: 10px 20px;
    box-shadow: var(--sh-btn);
}
.prod-card-cta:hover { background: #2b3763; text-decoration: none; }

/* ── Newsletter ── */
.nl { padding: 48px 20px; }
.nl-card {
    max-width: 640px; margin: 0 auto; text-align: center;
    background: var(--white); border-radius: var(--r-panel); box-shadow: var(--sh-card);
    padding: 44px 36px;
}
.nl-card h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.035em; line-height: 1; margin: 0 0 12px; }
.nl-sub { font-size: 16px; color: var(--dusk); max-width: 46ch; margin: 0 auto 26px; }
.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(--fog); color: var(--navy);
    border: 1.5px solid transparent; border-radius: var(--r-pill);
    padding: 12px 20px; flex: 1 1 220px; min-width: 0;
}
.nl-form input[type="email"]:focus { outline: none; border-color: var(--steel); background: var(--white); }
.nl-form input[aria-invalid="true"] { border-color: #e5484d; }
.newsletter-ok { font-weight: 700; font-size: 19px; color: var(--navy); margin: 0; }
.nl-micro { font-size: 13px; color: var(--smoke); margin: 14px 0 0; }

/* ── 404 ── */
.err { text-align: center; padding: 40px 0 64px; }
.err .hero-sub { margin-left: auto; margin-right: auto; }
.err .hero-actions { justify-content: center; }

/* ── Footer (fog canvas, white panel) ── */
.foot { padding: 0 20px 32px; }
.foot-card {
    max-width: var(--page-max); margin: 0 auto;
    background: var(--white); border-radius: var(--r-panel); box-shadow: var(--sh-card);
    padding: 40px 44px 24px;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.foot-tag { font-size: 14px; line-height: 1.6; color: var(--dusk); max-width: 46ch; margin: 12px 0 0; }
.foot-col h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--smoke); margin: 0 0 12px; }
.foot-col a { display: block; font-size: 15px; color: var(--navy); padding: 4px 0; }
.foot-col a:hover { color: var(--blue); text-decoration: none; }
.foot-base { font-size: 13px; color: var(--smoke); border-top: 1px solid var(--fog); padding-top: 20px; margin: 0; }
@media (max-width: 820px) { .foot-card { padding: 28px 24px 20px; } .foot-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ── 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: 640px; margin: 0 auto;
    background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-nav);
    padding: 18px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cookiebox-in p { margin: 0; font-size: 14px; color: var(--dusk); flex: 1 1 300px; }
.cookiebox-actions { display: flex; gap: 10px; }
