/*
 * components.css — presentation for the two surfaces the ENGINE emits on every tenant:
 * the newsletter signup band and /archive.html.
 *
 * Why it is not in a tenant's site.css (2026-09-18): site.css is written per tenant by the
 * generator, which lives in another repo. Anything the engine emits unconditionally must carry its
 * own styling, or the first tenant built by an older generator ships an unstyled band and an
 * unstyled archive and nobody finds out until an owner looks at it.
 *
 * Every value here resolves through the palette and type custom properties in brand.css, so these
 * components inherit the tenant's identity exactly like the rest of the site. No literal colours,
 * no web fonts, no url() references.
 */

/* --- newsletter band ----------------------------------------------------- */
.signup-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin: clamp(3rem, 7vw, 5.5rem) 0 0;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--ink);
  border-radius: var(--content-radius);
  background: var(--surface);
}
.signup-copy h2 { margin-bottom: .6rem; font-size: clamp(1.45rem, 2.2vw, 2.1rem); }
.signup-copy p { max-width: 46ch; margin-bottom: 0; color: var(--body-ink); font-size: .95rem; }
.signup-form { display: grid; gap: .8rem; }
.signup-field { display: grid; gap: .35rem; }
.signup-field label { color: var(--ink); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.signup-field input {
  width: 100%;
  min-height: 3rem;
  padding: .7rem .85rem;
  border: 1px solid var(--ink);
  border-radius: var(--content-radius);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
}
.signup-field input::placeholder { color: var(--muted); }
.signup-field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.signup-form .button { justify-content: center; width: 100%; border: 1px solid var(--accent-dark); font-family: var(--sans); cursor: pointer; }
.signup-form .button[disabled] { background: var(--muted); box-shadow: none; cursor: progress; }

/* Off-screen rather than display:none: a bot filling a hidden field is the whole point, and a
 * display:none input is the one thing every bot knows to skip. */
.signup-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* State is never colour alone: the message text differs per state and carries a leading glyph. */
.signup-result { margin: 0; min-height: 1.4rem; color: var(--body-ink); font-size: .88rem; font-weight: 700; }
.signup-result[data-state="idle"] { display: none; }
.signup-result[data-state="busy"] { color: var(--soft-ink); }
.signup-result[data-state="ok"] { color: var(--support); }
.signup-result[data-state="error"] { color: var(--accent-dark); }
.signup-result[data-state="ok"]::before { content: "\2713\00a0"; }
.signup-result[data-state="error"]::before { content: "\0021\00a0"; }

/* --- /archive.html ------------------------------------------------------- */
.archive-page > .lede { max-width: 60ch; }
.archive-page h1 { max-width: 22ch; font-size: clamp(2.4rem, 5vw, 4rem); }
.archive-year { margin-top: clamp(2.25rem, 5vw, 3.5rem); }
.archive-year h2 { padding-bottom: .5rem; border-bottom: 1px solid var(--ink); font-size: clamp(1.35rem, 2vw, 1.85rem); }
.archive-list { display: grid; gap: 0; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.archive-entry { padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.archive-entry .content-meta { margin-bottom: .4rem; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.archive-entry h2, .archive-entry h3 { max-width: 40ch; margin-bottom: .4rem; font-size: clamp(1.2rem, 1.8vw, 1.55rem); }
.archive-entry a { color: var(--ink); text-decoration-color: var(--line); }
.archive-entry a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
.archive-description { max-width: 68ch; margin-bottom: 0; color: var(--body-ink); font-size: .95rem; }

/* --- footer archive link -------------------------------------------------
 * The archive is linked from the footer of every page and from nowhere else in the chrome: it is
 * the site's index of record, not a destination competing with the six nav entries. */
.footer-links { display: grid; align-content: start; gap: .35rem; }
.footer-links p { margin-bottom: 0; }

/* --- licensed image attribution ----------------------------------------- */
/* Credits can sit directly over an image. Match the AI-art disclosure chip so their contrast never depends on the
 * brightness of a particular photograph. */
.asset-attribution { display: inline-block; margin-top: .55rem; padding: .22rem .42rem; background: color-mix(in srgb, var(--ink) 72%, transparent); color: var(--on-accent); font-size: .72rem; font-weight: 800; line-height: 1.45; letter-spacing: .02em; }
.ai-generated-image-label { display: inline-block; margin-top: .55rem; padding: .22rem .42rem; background: color-mix(in srgb, var(--ink) 72%, transparent); color: var(--on-accent); font-size: .72rem; font-weight: 800; line-height: 1.45; letter-spacing: .02em; }
.asset-attribution a { color: inherit; font-weight: inherit; }
.immersive-hero > .asset-attribution { position: absolute; z-index: 2; right: max(1rem, calc((100vw - var(--shell-width)) / 2)); bottom: 1rem; max-width: 29ch; color: var(--on-accent); text-align: right; }
.immersive-hero > .asset-attribution a, .image-band > .asset-attribution a { color: inherit; }
.image-band > .asset-attribution { position: absolute; z-index: 2; right: max(1rem, calc((100vw - var(--shell-width)) / 2)); bottom: 1rem; max-width: 29ch; color: var(--on-accent); text-align: right; }

@media (max-width: 860px) {
  .signup-band { grid-template-columns: 1fr; }
}
