/* ============================================================
   MESA theme additions
   Rules the static mockup did not need but a WordPress theme does.
   Tokens only (tokens.css). Loaded after site.css and pages.css.
   ============================================================ */

/* === SKIP LINK ===
   Hidden until focused, then pinned top-left above the sticky header. */
.skip-link:focus {
  position: fixed;
  inset-block-start: var(--space-xs);
  inset-inline-start: var(--space-xs);
  z-index: var(--z-modal);
  width: auto;
  height: auto;
  margin: 0;
  padding: var(--space-xs) var(--space-s);
  overflow: visible;
  clip: auto;
  white-space: normal;
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--text-light);
  background: var(--tertiary-ultra-dark);
  border-radius: var(--radius-round);
}

/* === PROMO SLIDES WITH REAL ARTWORK ===
   The mockup only ships placeholders; artwork arrives wrapped in a link and a
   <picture>, both of which must fill the slide for object-fit to work. */
.promo__link,
.promo__slide picture {
  display: block;
  height: 100%;
}

/* === FLUENT FORMS: FOOTER NEWSLETTER ===
   Used only when Theme Settings sets a newsletter form ID. Reshapes Fluent
   Forms' markup into the mockup's row of pill field(s) plus button, on the
   dark footer. FIRST PASS ONLY: form 2 (name, consent, reCAPTCHA) does not
   yet match the mockup with this; see README, Before launch. */
.newsletter__form--fluent .fluentform,
.newsletter__form--fluent form {
  width: 100%;
}

.newsletter__form--fluent form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-xs);
}

.newsletter__form--fluent fieldset {
  display: contents;
  border: 0;
}

.newsletter__form--fluent .ff-el-group,
.newsletter__form--fluent .ff-t-container,
.newsletter__form--fluent .ff-t-cell {
  flex: 1 1 18rem;
  margin: 0;
  padding: 0;
}

.newsletter__form--fluent .ff-el-input--label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.newsletter__form--fluent .ff-el-form-control {
  width: 100%;
  padding: var(--space-xs) var(--space-s);
  font-size: var(--text-s);
  color: var(--text-light);
  background: hsl(33 60% 97% / 0.07);
  border: var(--border-width) solid hsl(33 60% 97% / 0.2);
  border-radius: var(--radius-round);
}

.newsletter__form--fluent .ff-el-form-control::placeholder {
  color: var(--text-light-muted);
}

.newsletter__form--fluent .ff_submit_btn_wrapper {
  flex: 0 0 auto;
  margin: 0;
}

.newsletter__form--fluent .ff-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding-block) var(--btn-padding-inline);
  font-family: var(--btn-font-family);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  line-height: var(--btn-line-height);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-light);
  background: var(--primary);
  border: var(--btn-border-width) solid var(--primary);
  border-radius: var(--btn-border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.newsletter__form--fluent .ff-btn-submit:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.newsletter__form--fluent .error,
.newsletter__form--fluent .ff-message-success {
  flex-basis: 100%;
  font-size: var(--text-xs);
  color: var(--accent-light);
}

/* === EWWW PICTURE WEBP ===
   EWWW serves WebP by wrapping each <img> in <picture> (Picture WebP mode,
   switched on 30 September 2026: its JS WebP swap left lazy images that were
   already on screen blank). display: contents keeps every image rule written
   for a direct child (height: 100%, grid placement) working unchanged. */
picture { display: contents; }
/* With the wrapper gone, <source> would become a grid item and take a cell
   of its own (story row, news cards). Hiding it doesn't affect which file
   the browser picks. */
picture > source { display: none; }

/* === SMALL FIXES FROM THE 30 SEPTEMBER 2026 UI AUDIT === */
/* Arrow links never break across lines, and never shrink beside a heading
   ("All news →" wrapped on phones in .section-head). */
.link-arrow { white-space: nowrap; }
.section-head > .link-arrow { flex-shrink: 0; }

/* "Hover a panel…" means nothing on a touch screen. */
@media (hover: none) {
  .panels__hint { display: none; }
}

/* === VIDEO STILLS ===
   pages.css dims the still to 55% over the dark card, which suited the
   mockup's texture but turns a real video frame muddy brown. */
.video-card img { opacity: 0.92; }

/* === DOT LIST ===
   Bullet list printed by mesa_the_text_blocks() (franchise support rows and
   FAQ answers). The dot is drawn, one line tall, so it sits on the first
   line of an item that wraps. */
.dot-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
}

.dot-list > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-xs);
}

.dot-list > li::before {
  content: "";
  width: 0.4em;
  height: 1lh;
  background: radial-gradient(circle closest-side, var(--primary) 96%, transparent) center / 100% 0.4em no-repeat;
}
