/* EE Holdings brand system: logo red / yellow / blue on white, Rubik + IBM Plex Mono.
 * Loaded on every page through the_header_head(). Rules: app/eeholdings/design.md
 * Page skin is opt-in: add class="eh-skin" to <body>. Components (eh-*) work anywhere.
 */
:root {
    --ee-red: #E21F26;
    --ee-red-deep: #B8141A;
    --ee-yellow: #FFE51F;
    --ee-blue: #2B3A8F;
    --ee-navy: #141B4D;
    --paper: #FFFFFF;
    --paper-2: #F3F4FA;
    --rule: #DADDEB;
    --ink: var(--ee-navy);
    --ink-2: #4A5180;
    --ink-3: #6B7199;
    --on-blue: #FFFFFF;
    --on-blue-2: #C9CEF0;
    --ok-bg: #E6F4EA;
    --ok-ink: #14532D;
    --bad-bg: #FDE8E8;

    --font-display: 'Rubik', 'Arial Rounded MT Bold', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Rubik', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

    --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 20px;
    --space-lg: 32px; --space-xl: 56px; --space-2xl: 96px; --space-3xl: 140px;
    --gutter: clamp(16px, 4vw, 56px);
    --stroke: 3px;
    --radius-sm: 12px;
    --radius-md: 18px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms; --dur-hero: 900ms;
}

/* ── page skin (opt-in) ── */
body.eh-skin, body.eh-skin *, body.eh-skin *::before, body.eh-skin *::after { box-sizing: border-box; }
body.eh-skin {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
html:has(body.eh-skin) { overflow-x: clip; }
body.eh-skin main h1, body.eh-skin main h2, body.eh-skin main h3, body.eh-skin main h4 {
    font-family: var(--font-display);
    font-style: normal;
    color: var(--ink);
    letter-spacing: -.02em;
    text-wrap: balance;
}
body.eh-skin main h1 { font-weight: 900; letter-spacing: -.035em; }
body.eh-skin main h2 { font-weight: 800; }
body.eh-skin main h3, body.eh-skin main h4 { font-weight: 700; }
body.eh-skin main a:not([class]) { color: var(--ee-blue); text-decoration-color: var(--ee-red); text-underline-offset: 3px; }
body.eh-skin main a:not([class]):hover { color: var(--ee-navy); }
body.eh-skin ::selection { background: var(--ee-yellow); color: var(--ee-navy); }
body.eh-skin main :focus-visible { outline: var(--stroke) solid var(--ee-red); outline-offset: 3px; }

/* ── layout ── */
.eh-wrap {
    max-width: 1280px; margin-inline: auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.eh-wrap--narrow { max-width: 860px; }
.eh-block { padding-block: var(--space-2xl); }
.eh-block--tint { background: var(--paper-2); }
.eh-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* ── page hero for subpages ── */
.eh-page-hero { padding-block: var(--space-2xl) var(--space-xl); border-bottom: var(--stroke) solid var(--ink); }
.eh-page-hero .eh-mono { color: var(--ee-red); display: block; margin-bottom: var(--space-sm); }
.eh-page-hero h1 {
    margin: 0; font: 900 clamp(44px, 7vw, 104px)/.92 var(--font-display); letter-spacing: -.045em;
    color: var(--ink); max-width: 16ch; min-width: 0; overflow-wrap: anywhere; text-wrap: balance;
    animation: eh-lift var(--dur-hero) var(--ease-out) both;
}
.eh-page-hero h1 .u, .eh-head h2 .u { background: linear-gradient(var(--ee-yellow), var(--ee-yellow)) 0 88% / 100% .28em no-repeat; }
.eh-page-hero p { margin: var(--space-md) 0 0; max-width: 56ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); animation: eh-lift var(--dur-hero) var(--ease-out) 120ms both; }
.eh-page-hero .eh-ctas { margin-top: var(--space-lg); display: flex; flex-wrap: wrap; gap: var(--space-sm); }
@keyframes eh-lift { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* section heads */
.eh-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--space-md) var(--space-xl); align-items: end; margin-bottom: var(--space-xl); }
.eh-head .eh-mono { grid-column: 1 / -1; color: var(--ee-red); }
.eh-head h2 { margin: 0; font: 800 clamp(34px, 5vw, 72px)/.98 var(--font-display); letter-spacing: -.035em; text-wrap: balance; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.eh-head p { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) { .eh-head { grid-template-columns: minmax(0, 1fr); } }

/* ── buttons: yellow fill + red stroke, like the logo badge ── */
.eh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
    padding: 14px 24px; min-height: 48px;
    font: 700 16px/1 var(--font-display); text-decoration: none; white-space: nowrap; cursor: pointer;
    background: var(--ee-yellow); color: var(--ee-navy);
    border: var(--stroke) solid var(--ee-red); border-radius: 999px;
    transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.eh-btn:hover { transform: translateY(-2px); }
.eh-btn:active { transform: translateY(0); }
.eh-btn:focus-visible { outline: var(--stroke) solid var(--ee-blue); outline-offset: 3px; }
.eh-btn:disabled, .eh-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.eh-btn--ghost { background: transparent; color: var(--ee-blue); border-color: var(--ee-blue); }
.eh-btn--ghost:hover { background: var(--paper-2); }
.eh-btn--blue { background: var(--ee-blue); color: var(--paper); border-color: var(--ee-blue); }
.eh-btn--sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.eh-btn--block { width: 100%; }
.eh-btn .arr { display: inline-block; transition: transform var(--dur-short) var(--ease-out); }
.eh-btn:hover .arr { transform: translateX(4px); }

/* ── forms ── */
.eh-input, .eh-skin main .eh-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]), .eh-skin main .eh-form select, .eh-skin main .eh-form textarea {
    width: 100%; min-height: 48px; padding: 12px 16px; font: 400 16px/1.3 var(--font-body); color: var(--ink);
    background: var(--paper); border: 2px solid var(--rule); border-radius: var(--radius-sm);
    transition: border-color var(--dur-short) var(--ease-out);
}
.eh-input:hover { border-color: var(--ink-3); }
.eh-input:focus-visible, .eh-skin main .eh-form input:focus-visible, .eh-skin main .eh-form select:focus-visible, .eh-skin main .eh-form textarea:focus-visible {
    outline: none; border-color: var(--ee-blue); box-shadow: 0 0 0 3px var(--ee-yellow);
}
.eh-input:disabled { background: var(--paper-2); }
.eh-label { display: block; margin-bottom: var(--space-2xs); font: 500 14px/1.3 var(--font-body); color: var(--ink); }
.eh-field { display: grid; gap: var(--space-2xs); margin-bottom: var(--space-md); }
.eh-alert { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); font-size: 15px; }
.eh-alert--ok { background: var(--ok-bg); color: var(--ok-ink); }
.eh-alert--bad { background: var(--bad-bg); color: var(--ee-red-deep); }
.eh-alert--info { background: var(--paper-2); color: var(--ink); }

/* ── surfaces ── */
.eh-panel { background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; padding: var(--space-lg); min-width: 0; }
.eh-card { position: relative; isolation: isolate; }
.eh-card::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); background: var(--ee-red); z-index: -1; }
.eh-card > a, .eh-card > div {
    display: flex; flex-direction: column; gap: var(--space-xs); height: 100%;
    padding: var(--space-lg) var(--space-md) var(--space-md);
    background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-md); text-decoration: none; color: inherit;
    transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.eh-card > a:hover, .eh-card > a:focus-visible { transform: translate(-6px, -6px); background: var(--ee-yellow); }
.eh-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-lg) var(--space-md); }
.eh-pill { display: inline-block; max-width: 100%; font-family: var(--font-mono); font-size: 11px; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--ee-yellow); color: var(--ee-navy); overflow-wrap: anywhere; }
.eh-pill--blue { background: var(--ee-blue); color: var(--paper); }
.eh-band { background: var(--ee-blue); color: var(--on-blue); }
.eh-band h2, .eh-band h3 { color: var(--ee-yellow) !important; }
.eh-band p { color: var(--on-blue-2); }

/* facts band: big yellow numbers on blue */
.eh-facts { background: var(--ee-blue); color: var(--on-blue); }
.eh-facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.eh-facts dl > div { display: flex; flex-direction: column-reverse; padding: var(--space-lg) var(--space-md); border-left: 1px solid rgba(255, 255, 255, .18); }
.eh-facts dl > div:first-child { border-left: 0; padding-left: 0; }
.eh-facts dd { margin: 0; font: 900 clamp(40px, 5vw, 72px)/1 var(--font-display); letter-spacing: -.03em; color: var(--ee-yellow); font-variant-numeric: tabular-nums; }
.eh-facts dt { margin-top: var(--space-xs); font: 400 12px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-blue-2); }

/* ── long-form text (terms, privacy, articles) ── */
.eh-prose { max-width: 72ch; color: var(--ink-2); }
.eh-prose h2 { margin: var(--space-xl) 0 var(--space-sm); font: 800 clamp(24px, 2.6vw, 32px)/1.15 var(--font-display); color: var(--ink); }
.eh-prose h3 { margin: var(--space-lg) 0 var(--space-xs); font: 700 20px/1.25 var(--font-display); color: var(--ink); }
.eh-prose p, .eh-prose ul, .eh-prose ol { margin: 0 0 var(--space-md); }
.eh-prose li { margin-bottom: var(--space-2xs); }
.eh-prose strong { color: var(--ink); }

/* ── tables ── */
.eh-table { width: 100%; border-collapse: collapse; }
.eh-table th { text-align: left; padding: 0 var(--space-md) var(--space-sm) 0; border-bottom: var(--stroke) solid var(--ink); font: 500 12px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.eh-table td { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }

/* reveal on scroll: visible at rest, a small lift plays when .is-in is added */
.rv { transform: translateY(18px); transition: transform 700ms var(--ease-out); }
.rv.is-in { transform: none; }

@media (prefers-reduced-motion: reduce) {
    .eh-page-hero h1, .eh-page-hero p { animation: none; }
    .rv { transform: none; }
    .eh-btn, .eh-card > a { transition-duration: 1ms; }
}
