/* ==========================================================================
   Editorial marketing pages (Pen redesign) — shared, page-scoped styles.
   Every rule lives under .ed, and the font families below use editorial-only
   names, so pages that don't opt in (and the shared header/footer) are
   unaffected. Connect keeps its own connect.css. Widths follow site-grid.css.
   ========================================================================== */

/* Self-hosted faces (files already in the repo), registered under page-only names. */
@font-face { font-family: "BK Editorial Sans"; src: url("../fonts/Satoshi-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "BK Editorial Sans"; src: url("../fonts/Satoshi-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "BK Editorial Sans"; src: url("../fonts/Satoshi-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
/* JetBrains Mono — SIL Open Font License 1.1, see ../fonts/jetbrains-mono/OFL.txt */
@font-face { font-family: "BK Editorial Mono"; src: url("../fonts/jetbrains-mono/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

.ed {
    --ed-paper: #FBFAF8;
    --ed-paper-2: #F3F2EE;
    --ed-ink: #0C0C0E;
    --ed-red: #F92C4D;
    --ed-muted: #57554F;
    --ed-line: rgba(12, 12, 14, 0.12);
    --ed-field-line: rgba(12, 12, 14, 0.2);
    --ed-error: #B3112F;
    --ed-sans: "BK Editorial Sans", "Satoshi", system-ui, -apple-system, sans-serif;
    --ed-mono: "BK Editorial Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --ed-display: "Druk Super", Impact, "Arial Narrow", sans-serif;
    --ed-display-text: "Druk Text Bold", Impact, "Arial Narrow", sans-serif;
    --ed-ease: cubic-bezier(0.22, 1, 0.36, 1);
    background: var(--ed-paper);
    color: var(--ed-ink);
    font-family: var(--ed-sans);
    -webkit-font-smoothing: antialiased;
}
.ed *, .ed *::before, .ed *::after { box-sizing: border-box; }
.ed a { color: inherit; text-decoration: none; }
.ed :focus-visible { outline: 2px solid var(--ed-ink); outline-offset: 3px; }
.ed-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Atoms ───────────────────────────────────────────────────────────────── */
.ed-mono { font-family: var(--ed-mono); font-size: 12px; line-height: 1.35; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400; }
.ed-label-row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ed-line); color: var(--ed-muted); }
.ed-display { display: block; margin: 0; font-family: var(--ed-display); font-weight: 900; line-height: 0.88; text-transform: uppercase; letter-spacing: 0; }
.ed-contrast { display: block; margin: 0; font-family: var(--ed-sans); font-weight: 500; line-height: 0.92; letter-spacing: -0.06em; text-transform: none; }
.ed-pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; font-family: var(--ed-sans); font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color .2s var(--ed-ease), color .2s var(--ed-ease), opacity .2s var(--ed-ease); }
.ed-pill svg { flex-shrink: 0; transition: transform .25s var(--ed-ease); }
.ed .ed-btn-red { background: var(--ed-red); color: #fff; }
.ed .ed-btn-red:hover { background: #E5203F; }
.ed .ed-btn-ink { background: var(--ed-ink); color: #fff; }
.ed .ed-btn-ink:hover { background: #2A2A2E; }
.ed .ed-pill:hover svg { transform: translateX(3px); }
.ed .ed-pill:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Page hero (offset clears the fixed site header) ─────────────────────── */
.ed-hero { padding-block: calc(var(--site-header-height, 76px) + 48px) 96px; }
.ed-hero__head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(24px, 4vw, 56px); align-items: end; margin-top: 48px; }
.ed-hero__l1 { font-size: clamp(72px, 13.9vw, 200px); }
.ed-hero__l2 { font-size: clamp(64px, 13.9vw, 200px); color: var(--ed-red); padding-bottom: 0.06em; text-transform: lowercase; }
.ed-hero__intro { margin: 0 0 clamp(8px, 1.6vw, 24px); max-width: 46ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; font-weight: 500; }

/* ── Final CTA (red band) ────────────────────────────────────────────────── */
.ed-final { background: var(--ed-red); padding-block: clamp(96px, 11vw, 160px); overflow: hidden; }
.ed-final__labels { color: var(--ed-ink); border-bottom-color: rgba(12, 12, 14, 0.2); }
.ed-final__head { margin: 56px 0; }
.ed-final__head .ed-display { font-size: clamp(52px, 10.4vw, 150px); color: #fff; }
.ed-final__head .ed-contrast { font-size: clamp(48px, 10.4vw, 150px); color: var(--ed-ink); }
.ed-final__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.ed-final__body { margin: 0; max-width: 440px; font-size: 19px; line-height: 1.55; color: var(--ed-ink); }
.ed-final__btn { padding: 24px 36px; font-size: 19px; }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.ed-contact { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 64px; align-items: start; padding-bottom: 120px; }
.ed-form { display: flex; flex-direction: column; gap: 36px; padding: 48px; border-radius: 4px; background: var(--ed-paper-2); }
.ed-form__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ed-form__title { margin: 0; font-family: var(--ed-display-text); font-weight: 700; font-size: clamp(36px, 3.4vw, 48px); line-height: 0.95; text-transform: uppercase; }
.ed-form__note { color: var(--ed-muted); font-size: 11px; }
.ed-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ed-field { display: flex; flex-direction: column; gap: 10px; }
.ed-field__label { color: var(--ed-ink); }
.ed-input { width: 100%; height: 56px; padding: 16px 18px; border: 1px solid var(--ed-field-line); border-radius: 4px; background: var(--ed-paper); color: var(--ed-ink); font-family: var(--ed-sans); font-size: 16px; line-height: 1.4; transition: border-color .2s, box-shadow .2s; }
.ed-input::placeholder { color: var(--ed-muted); opacity: 1; }
.ed-input:focus { outline: none; border-color: var(--ed-ink); box-shadow: 0 0 0 1px var(--ed-ink); }
.ed-input[aria-invalid="true"] { border-color: var(--ed-error); }
.ed-textarea { height: 180px; resize: vertical; }
.ed-field__error, .ed-form__error { margin: 0; color: var(--ed-error); font-size: 14px; font-weight: 500; }
.ed-consent { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.45; }
.ed-consent input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--ed-ink); border-radius: 4px; background: var(--ed-paper); display: grid; place-content: center; cursor: pointer; }
.ed-consent input[type="checkbox"]::before { content: ""; width: 12px; height: 12px; background: var(--ed-paper); clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 86% 8%, 39% 70%); transform: scale(0); transition: transform .12s var(--ed-ease); }
.ed-consent input[type="checkbox"]:checked { background: var(--ed-ink); }
.ed-consent input[type="checkbox"]:checked::before { transform: scale(1); }
.ed-consent a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ed-consent a:hover { color: var(--ed-red); }
.ed-turnstile { min-height: 65px; }
/* 19px bold = WCAG "large text", so white on the brand red meets AA (3:1). */
.ed-form__submit { align-self: flex-start; padding: 18px 28px; font-size: 19px; }
.ed-success { display: flex; align-items: center; gap: 12px; margin: 0; padding: 18px 20px; border-left: 3px solid #157F3B; background: var(--ed-paper); color: #145C2E; font-weight: 500; }

.ed-info { border-top: 1.5px solid var(--ed-ink); }
.ed-info__item { display: flex; flex-direction: column; gap: 14px; padding: 28px 0 32px; border-bottom: 1px solid var(--ed-line); }
.ed-info__top { display: flex; justify-content: space-between; align-items: center; color: var(--ed-muted); }
.ed-info__item:first-child .ed-info__top { color: var(--ed-ink); }
.ed-info__value { margin: 0; font-family: var(--ed-display-text); font-weight: 700; font-size: 32px; line-height: 0.95; overflow-wrap: anywhere; }
.ed-info__value--lead { font-size: clamp(32px, 2.8vw, 40px); }
.ed-info__help { display: flex; flex-direction: column; gap: 14px; padding-top: 32px; }
.ed-info__help p { margin: 0; color: var(--ed-muted); font-size: 16px; line-height: 1.55; }
.ed-info__link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.ed-info__link:hover { color: var(--ed-red); }

/* ── Tablet ──────────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .ed-hero__head { grid-template-columns: minmax(0, 1fr); }
    .ed-hero__intro { margin-top: 28px; }
    .ed-contact { grid-template-columns: minmax(0, 1fr); gap: 56px; }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .ed-hero { padding-block: calc(var(--site-header-height, 76px) + 24px) 56px; }
    .ed-hero__head { margin-top: 32px; }
    .ed-contact { padding-bottom: 72px; }
    .ed-form { padding: 28px 20px; gap: 28px; }
    .ed-form__row { grid-template-columns: 1fr; gap: 28px; }
    .ed-form__submit { align-self: stretch; }
    .ed-final__row { flex-direction: column; align-items: flex-start; }
    /* Contact (Pen "Contact — Mobile (390)"): tighter form and detail rows. */
    .ed-form__title { font-size: 34px; }
    .ed-info__item { gap: 8px; padding: 16px 0 18px; }
    .ed-info__value, .ed-info__value--lead { font-size: 24px; }
    .ed-info__help { gap: 10px; padding-top: 24px; }
    .ed-final { padding-block: 64px; }
    .ed-final__row { gap: 28px; }
    .ed-final__body { font-size: 17px; }
    .ed-final__btn { width: 100%; justify-content: center; padding: 19px 24px; font-size: 19px; }
    .ed-final__head { margin: 40px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ed *, .ed *::before, .ed *::after { transition-duration: 0.01ms !important; }
}
