/* eZephyr v2 — shared prototype components (introduced in Milestone 3C).
 * The pieces every redesigned page uses: SVG fills, buttons, links, the yellow
 * highlighter, eyebrows, editorial headings, placeholders, the motion toggle and
 * scroll reveals. Loaded by /about/ for now. Services and Our Work still carry
 * their own copies (so their approved files stay untouched); point them at this
 * file in the website-wide refinement round and delete the duplicates.
 * Needs css/prototype/tokens.css.
 */

/* ---------- SVG fills and strokes from the tokens ---------- */
.f-yellow { fill: var(--ez-yellow); }
.f-ink { fill: var(--ez-ink); }
.f-ink-soft { fill: var(--ez-ink-soft); }
.f-paper { fill: var(--ez-paper); }
.f-sky { fill: var(--ez-sky); }
.f-sky-mid { fill: var(--ez-sky-mid); }
.f-sky-light { fill: var(--ez-sky-light); }
.f-red { fill: var(--ez-red); }
.f-bus-green { fill: var(--ez-bus-green); }
.f-sea { fill: var(--ez-sea); }
.f-sea-light { fill: var(--ez-sea-light); }
.f-lilac { fill: var(--ez-lilac); }
.f-green { fill: var(--ez-green); }
.f-stone { fill: var(--ez-stone); }
.f-stone-grey { fill: var(--ez-stone-grey); }
.f-road { fill: var(--ez-road); }
.f-road-light { fill: var(--ez-road-light); }
.f-taxi { fill: var(--ez-taxi); }
.s-ink { stroke: var(--ez-ink); }
.s-ink-soft { stroke: var(--ez-ink-soft); }
.s-paper { stroke: var(--ez-paper); }
.s-red { stroke: var(--ez-red); }
.s-yellow { stroke: var(--ez-yellow); }

/* ---------- Buttons and links ---------- */
.ez-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 50px;
  padding: 0.55em 1.25em;
  border: 2px solid var(--ez-ink);
  border-radius: 4px;
  font-family: var(--ez-font-display);
  font-size: 1.125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s var(--ez-ease-out), box-shadow 0.2s var(--ez-ease-out);
}
.ez-btn--ink { background: var(--ez-ink); color: var(--ez-yellow); box-shadow: 0 4px 0 var(--ez-yellow), 0 4px 0 2px var(--ez-ink); }
.ez-btn--ink:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--ez-yellow), 0 7px 0 2px var(--ez-ink); }
.ez-btn--ink:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--ez-yellow), 0 2px 0 2px var(--ez-ink); }
/* On yellow, the button's shadow line is paper. */
.ez-btn--on-yellow { box-shadow: 0 4px 0 var(--ez-paper), 0 4px 0 2px var(--ez-ink); }
.ez-btn--on-yellow:hover { box-shadow: 0 7px 0 var(--ez-paper), 0 7px 0 2px var(--ez-ink); }

.ez-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-family: var(--ez-font-display);
  font-size: 1.0625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ez-ink);
  text-decoration: underline;
  text-decoration-color: var(--ez-yellow);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}
.ez-link:hover { text-decoration-color: var(--ez-ink); }
.ez-link--on-yellow { text-decoration-color: var(--ez-paper); }

/* ---------- Type ---------- */
/* The logo's yellow highlighter, drawn behind a key word. --hl changes its colour. */
.hl { position: relative; z-index: 0; white-space: nowrap; }
.hl::before {
  content: '';
  position: absolute;
  left: -0.05em;
  right: -0.07em;
  bottom: 0.24em;
  height: 0.34em;
  background: var(--hl, var(--ez-yellow));
  z-index: -1;
  transform-origin: left center;
}
.nowrap { white-space: nowrap; }

.ez-eyebrow {
  display: block;
  width: fit-content;
  margin-bottom: clamp(12px, 1.6vw, 20px);
  padding: 5px 12px 4px;
  background: var(--ez-ink);
  color: var(--ez-yellow);
  font-family: var(--ez-font-display);
  font-size: 0.9375rem;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ez-h2 {
  font-family: var(--ez-font-display);
  font-weight: 400;
  font-size: var(--ez-text-h2);
  line-height: 0.95;
  text-transform: uppercase;
}
.ez-outline { color: currentColor; }
@supports (-webkit-text-stroke: 2px black) {
  .ez-outline { color: transparent; -webkit-text-stroke: 2px var(--outline, var(--ez-ink)); }
}
.ez-lead { font-size: var(--ez-text-lead); line-height: 1.45; }
.ez-wrap { width: min(100% - 2 * var(--ez-gutter), var(--ez-max)); margin-inline: auto; }

/* ---------- Placeholders: designed, but impossible to mistake for real content ---------- */
[data-placeholder] { outline: 2px dashed rgba(49, 49, 50, 0.5); outline-offset: 3px; }
.placeholder-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px 1px;
  border-radius: 2px;
  background: var(--ez-ink);
  color: var(--ez-yellow);
  font: 700 0.6875rem/1.4 var(--ez-font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.2em;
}
.placeholder-text { font-style: italic; }
.ez-note {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 3px 9px 3px 3px;
  border-radius: 3px;
  background: var(--ez-paper);
  color: var(--ez-ink);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ---------- Motion toggle (WCAG 2.2.2) ---------- */
.ez-motion-toggle {
  position: absolute;
  right: var(--ez-gutter);
  bottom: clamp(8px, 1.2vw, 14px);
  z-index: 3;
  min-height: 32px;
  padding: 4px 12px;
  border: 2px solid var(--ez-ink);
  border-radius: 999px;
  background: var(--ez-paper);
  color: var(--ez-ink);
  font: 600 0.875rem/1 var(--ez-font-body);
  cursor: pointer;
}
.ez-motion-toggle[hidden] { display: none; }

/* Loops pause off-screen ([data-loop].is-paused) or on request (.is-motion-paused on <main>). */
[data-loop].is-paused,
[data-loop].is-paused *,
.is-motion-paused [data-loop],
.is-motion-paused [data-loop] * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* Reveal on scroll: the page script marks below-the-fold items as pending. */
  [data-reveal].is-pending { opacity: 0; transform: translateY(36px); }
  [data-reveal].is-revealed {
    transition: opacity var(--ez-dur) var(--ez-ease-out), transform var(--ez-dur) var(--ez-ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
}

@keyframes ez-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes ez-rise-sm { from { opacity: 0; transform: translateY(24px); } }
@keyframes ez-wipe { from { transform: scaleX(0); } }
@keyframes ez-twinkle { from { opacity: 1; } to { opacity: 0.2; } }
@keyframes ez-sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
