/* Pálpito brand layer for the Digest base — loaded after built/screen.css
/* Manual de Marca v1.0 · dark/light follow the reader's system preference
/* ------------------------------------------------------------------- */

/* Fonts: Inter everywhere (headings/display + body/UI). Inter is a single
   variable-weight file (100-900), so no extra weight files are needed for
   headings that previously used Groteska Bold/Heavy. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url("../fonts/inter-roman.woff2") format("woff2");
}

:root {
    /* Brand palette */
    --palpito-magenta: #FF0083;
    --palpito-negro: #09030A;
    --palpito-gris-oscuro: #272432;
    --palpito-gris-medio: #9CA3AF;
    --palpito-rosa-claro: #FFE0EA;
    --palpito-blanco: #F9FAFB;
    --palpito-purpura: #4F46E5;
    --palpito-gradient: linear-gradient(135deg, #FF0083 0%, #4F46E5 100%);

    /* Typography hooks (Digest wraps its font rules in these) */
    --gh-font-heading: "Inter";
    --gh-font-body: "Inter";
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    /* Light mode (default): Blanco Roto base, Negro text */
    --color-white: var(--palpito-blanco);
    --color-primary-text: var(--palpito-negro);
    --color-secondary-text: rgb(9 3 10 / 0.56);
    --color-darker-gray: var(--palpito-negro);
    --color-dark-gray: var(--palpito-gris-oscuro);
}

/* Dark mode: Negro base, Blanco Roto text (pure CSS, no JS hook needed) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-white: var(--palpito-negro);
        --color-lighter-gray: #1C1823;
        --color-light-gray: #3A3547;
        --color-mid-gray: #55506B;
        --color-dark-gray: #C9CCD3;
        --color-darker-gray: var(--palpito-blanco);
        --color-primary-text: var(--palpito-blanco);
        --color-secondary-text: var(--palpito-gris-medio);
    }

    /* Elements that must keep true white regardless of the surface remap */
    .gh-btn,
    .gh-subscribe-input-btn,
    .pswp__counter,
    .pswp__caption__center {
        color: #fff;
    }

    /* Digest hardcodes a light gradient on the subscribe card */
    .gh-subscribe {
        background: linear-gradient(315deg, #1C1823, #272432);
    }
}

::selection {
    background: var(--palpito-rosa-claro);
    color: var(--palpito-negro);
}

/* Type scale: article titles Heavy 900, nav/buttons Inter */
.gh-article-title,
.gh-header-title {
    font-weight: 900;
    letter-spacing: -0.02em;
}

.gh-head-menu,
.gh-head-actions,
.gh-btn,
.gh-subscribe-input-btn {
    font-family: var(--gh-font-heading, var(--font-sans));
}

/* Subscribe moments get the brand gradient */
.gh-subscribe-input-btn,
.gh-head-btn.gh-btn,
.gh-content .kg-signup-card .kg-btn {
    background: var(--palpito-gradient);
    color: #fff;
}

/* Content links: magenta underline accent */
.gh-content a:not(.gh-btn):not(.kg-bookmark-container):not(.kg-btn) {
    text-decoration-color: var(--palpito-magenta);
    text-underline-offset: 2px;
}

/* Logo sizing: the brand SVGs are viewBox-only (1366x500), so set explicit
   height + aspect-ratio or they collapse to 0x0 */
.gh-head-logo img {
    height: 40px;
    width: auto;
    aspect-ratio: 1366 / 500;
    max-height: none;
    max-width: none;
}

/* Digest hides .gh-head-logo img:nth-child(2) for its dual-logo pattern;
   inside our <picture> the img follows the <source> and matches it — undo */
.gh-head-logo picture img:nth-child(2) {
    position: static;
    opacity: 1;
}

/* ------------------------------------------------------------------
   Header: Kalshi News format (masthead + category nav bar) dressed in
   the palpito.com design tokens. Same palette variables as the footer.
------------------------------------------------------------------- */
.pf-header {
    --pf-background: #f9fafb;
    --pf-surface: #fff;
    --pf-border: #e5e7eb;
    --pf-foreground: #09030a;
    --pf-muted: #6b7280;
    --pf-secondary: #4b5563;
    --pf-primary: #ff0083;

    background-color: var(--pf-background);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    .pf-header {
        --pf-background: #0d0a12;
        --pf-surface: #1a1726;
        --pf-border: #2a2735;
        --pf-foreground: #f0edf5;
        --pf-muted: #8b8d98;
        --pf-secondary: #b0adb8;
        --pf-primary: #ff3da0;
    }
}

.pf-header-masthead-inner,
.pf-header-nav-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .pf-header-masthead-inner,
    .pf-header-nav-inner {
        padding: 0 64px;
    }
}

.pf-header-masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.pf-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--pf-foreground);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: clamp(2.6rem, 1.9rem + 2vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.pf-header-brand:hover {
    opacity: 0.8;
}

.pf-header-brand img {
    width: clamp(32px, 28px + 1vw, 40px);
    height: auto;
    aspect-ratio: 1;
    max-width: none;
    flex-shrink: 0;
}

.pf-header-brand-suffix {
    color: var(--pf-muted);
    font-weight: 300;
}

.pf-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Registrarse: palpito.com primary button (h36, radius 12) */
.pf-header-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    background-color: var(--pf-primary);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: opacity 0.2s;
}

.pf-header-signup:hover {
    opacity: 0.9;
}

.pf-header-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--pf-foreground);
    cursor: pointer;
    transition: background-color 0.2s;
}

.pf-header-search:hover {
    background-color: var(--pf-surface);
}

.pf-header-search svg {
    width: 20px;
    height: 20px;
}

/* Category nav bar: bordered row, horizontal, scrollable on mobile */
.pf-header-nav {
    border-top: 1px solid var(--pf-border);
    border-bottom: 1px solid var(--pf-border);
}

.pf-header-nav .nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pf-header-nav .nav::-webkit-scrollbar {
    display: none;
}

.pf-header-nav .nav li {
    margin: 0;
    flex-shrink: 0;
}

.pf-header-nav .nav a {
    display: inline-flex;
    align-items: center;
    padding: 14px 0;
    color: var(--pf-foreground);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s;
}

.pf-header-nav .nav a:hover {
    color: var(--pf-primary);
    opacity: 1;
}

.pf-header-nav .nav .nav-current a {
    color: var(--pf-primary);
    border-bottom-color: var(--pf-primary);
}

/* ------------------------------------------------------------------
   Footer: exact replica of www.palpito.com (tokens captured 2026-07-27)
   Light: surface #fff · border #e5e7eb · fg #09030a · muted #6b7280 · secondary #4b5563
   Dark:  surface #1a1726 · border #2a2735 · fg #f0edf5 · muted #8b8d98 · secondary #b0adb8
------------------------------------------------------------------- */
.pf-footer {
    --pf-surface: #fff;
    --pf-border: #e5e7eb;
    --pf-foreground: #09030a;
    --pf-muted: #6b7280;
    --pf-secondary: #4b5563;
    --pf-primary: #ff0083;

    margin-top: 40px;
    background-color: var(--pf-surface);
    border-top: 1px solid var(--pf-border);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    .pf-footer {
        --pf-surface: #1a1726;
        --pf-border: #2a2735;
        --pf-foreground: #f0edf5;
        --pf-muted: #8b8d98;
        --pf-secondary: #b0adb8;
        --pf-primary: #ff3da0;
    }
}

.pf-footer-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

.pf-footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 0 24px;
}

@media (min-width: 768px) {
    .pf-footer-container {
        padding: 0 64px;
    }

    .pf-footer-columns {
        grid-template-columns: 1.4fr 1fr 1fr 1fr;
        gap: 48px;
    }
}

.pf-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pf-foreground);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.2s;
}

.pf-footer-brand:hover {
    color: var(--pf-primary);
    opacity: 1;
}

.pf-footer-brand img {
    width: 36px;
    height: 36px;
    aspect-ratio: 1;
    max-width: none;
}

.pf-footer-tagline {
    margin-top: 12px;
    max-width: 32ch;
    color: var(--pf-muted);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.pf-footer-heading {
    margin-bottom: 16px;
    color: var(--pf-secondary);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.33;
    text-transform: uppercase;
}

.pf-footer-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pf-muted);
    font-size: 14px;
    line-height: 1.43;
    text-decoration: none;
    transition: color 0.2s;
}

.pf-footer-link:hover {
    color: var(--pf-foreground);
    opacity: 1;
}

.pf-footer-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.pf-footer-bottom {
    padding: 16px 0;
    border-top: 1px solid var(--pf-border);
}

.pf-footer-bottom p {
    margin: 0;
    color: var(--pf-muted);
    font-size: 12px;
    line-height: 1.625;
}

.pf-footer-bottom p + p {
    margin-top: 12px;
}

.pf-footer-bottom a {
    color: var(--pf-muted);
    text-decoration: underline;
    transition: color 0.2s;
}

.pf-footer-bottom a:hover {
    color: var(--pf-foreground);
    opacity: 1;
}
