/**
 * Horizon Core: the centred email sign-up block's measure.
 *
 * ⭐ ONE copy for every theme. The block's base rules sit in FIVE theme copies of hp-components.css (shell,
 * entertainer, commerce, two per-client), all capping it at 520px. The consent sentence Core prints
 * (hp_email_signup_consent_text(), signed wording) is about 546px at desktop size and about 605px at the
 * mobile layer's 16px floor (768 to 1024px), so at 520px it wrapped on every site, leaving "privacy policy."
 * alone on a second line.
 *
 * The fix is the measure, never the wording: the sentence is consent evidence and the relay recomputes it.
 *  - 42rem fits the default sentence on one line at both sizes for typical creator names (measured on a
 *    creator site at 1440 and 1000px wide).
 *  - A very long name, or a creator's own longer wording, still wraps; `text-wrap: balance` makes that two
 *    even lines instead of a stray last word.
 *
 * Below the measure: the section ground and the band's email field, so the block matches the home page everywhere.
 *
 * Out of scope on purpose: the split layout (.hp-email-signup-split, its own sheet) and the latex-edition
 * home's two columns (hp-home-latex.css, more specific, sets max-width: none).
 *
 * Enqueued after hp-mobile.css (src/Content/email-signup-form.php). `body` prefix: one element above the
 * theme's single-class rules.
 */

body .hp-email-section .hp-email-signup {
  max-width: 42rem;
}

body .hp-email-signup__consent span {
  text-wrap: balance;
}

/*
 * HORIZON-20261026-062: the block looks the same on every page as it does on the home page.
 *
 * The home page was the only place it was finished. Two theme rules dress it there, and neither reaches anywhere else:
 *  1. The section ground (96px top and bottom, the page colour, the faint glow) is in each theme's hp-home.css, which
 *     loads on the front page only. Everywhere else (the footer band on every inner page, and a sign-up a manifest
 *     places on an inner page such as /subscribe/) the section had no padding at all: the band's top rule sat on the
 *     heading and the footer followed straight after the small print. Measured on a creator site (blog 4), 2026-10-26.
 *  2. The email field is dressed by hp-base.css's form-field rule, scoped to `.hp .site-main form`. The footer band
 *     prints after .site-main, so its field fell back to GeneratePress's light default: a white box with square
 *     corners beside the rounded button.
 *
 * Copied, not changed: the values are the five themes' own (identical in all five). The section rule is `:where()`, ZERO
 * specificity, so wherever a theme or Core sheet already styles the section (home's hp-home.css, the latex, backdrop
 * and split layouts) that rule still wins and nothing there moves. Only the centred block is matched: the split
 * layouts (commerce's tinted band, a creator's split photo band) have their own sheets and their own grounds.
 */
:where(.hp-email-section:has(> .hp-container > .hp-email-signup)) {
  background: var(--hp-bg);
  padding: var(--hp-sp-24) 0;
  position: relative;
  overflow: hidden;
}

:where(.hp-email-section:has(> .hp-container > .hp-email-signup))::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hp-email-glow, radial-gradient(ellipse 50% 80% at 50% 100%, rgba(201,169,110,0.05) 0%, transparent 70%));
  pointer-events: none;
}

/* hp-base.css's `.hp .site-main form input[type="email"]` values, for the one place the block sits outside .site-main. */
.hp .hp-capture-band .hp-email-signup form input[type="email"] {
  background: var(--hp-bg);
  border: 1px solid var(--hp-border);
  color: var(--hp-text);
  border-radius: var(--hp-r-sm);
  padding: 0.75rem 1rem;
  font-family: var(--hp-font-body);
  font-size: var(--hp-text-base);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--hp-dur) var(--hp-ease), box-shadow var(--hp-dur) var(--hp-ease);
}

.hp .hp-capture-band .hp-email-signup form input[type="email"]:focus {
  border-color: var(--hp-border-strong);
  box-shadow: 0 0 0 3px var(--hp-gold-muted);
  outline: none;
}

.hp .hp-capture-band .hp-email-signup input::placeholder {
  color: var(--hp-text-muted);
  opacity: 1;
}
