/* ==========================================================================
   We-Automate - stylesheet
   Theme lifted from the live site (we-automate.net) so this stays on-brand:
     headings  Inter          body  DM Sans
     ink       #1D1E20        navy  #020122        accent  #E28156
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy: #020122;
  --ink: #1d1e20;
  --muted: #6b6b73;
  /* Sampled from the official logo (Brand/WA Main Logo.jpg) — the three bars,
     light to dark:
       #EDAA76  ->  #E28156  ->  #E65E36
     The live site's #E28156 is the MIDDLE bar; #E65E36 is the primary.
     The wordmark itself is black (white in the negative variant), NOT orange.

     No bar is dark enough to carry text: the primary reaches only 3.49:1 on
     white and WCAG AA needs 4.5:1. So the ramp stays decorative, and one
     darker step of the SAME hue (13.6deg) and saturation carries text and
     buttons at 4.97:1. */
  --accent: #e65e36;        /* brand primary — decorative, icons, dots */
  --accent-mid: #e28156;    /* logo mid bar */
  --accent-light: #edaa76;  /* logo light bar */
  --accent-text: #c84119;   /* text on light bg      — 4.97:1 */
  --accent-cta: #c84119;    /* button bg, white text — 4.97:1 */
  --accent-dark: #ac3815;   /* hover                 — 6.31:1 */
  --accent-soft: #fdf1ea;

  --bg: #ffffff;
  --bg-alt: #f8f6f4;
  --bg-navy: #020122;
  --border: #e7e3df;

  --font-head: "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  --logo-h: 88px;   /* customer logo display height in the banner */
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(2, 1, 34, 0.06), 0 2px 8px rgba(2, 1, 34, 0.04);
  --shadow-md: 0 4px 12px rgba(2, 1, 34, 0.07), 0 12px 32px rgba(2, 1, 34, 0.07);

  --step: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

/* `* var(--u-mult, 1)` lets the editor's S/M/L/XL scale each heading from its
   OWN size. Without the multiplier the utility would have to set font-size
   directly, which resolves against the parent and collapses the type scale. */
h1 { font-size: calc(clamp(2.3rem, 5.2vw, 3.9rem) * var(--u-mult, 1)); font-weight: 800; }
h2 { font-size: calc(clamp(1.85rem, 3.4vw, 2.6rem) * var(--u-mult, 1)); font-weight: 700; }
h3 { font-size: calc(1.2rem * var(--u-mult, 1)); font-weight: 700; }

p { margin: 0 0 1rem; text-wrap: pretty; }
img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--bg-navy); color: #cfcfd8; }
.section--navy h2,
.section--navy h3 { color: #fff; }
/* On navy the roles invert: the deep text-accent is too dark (3.5:1), while
   the light brand accent reads cleanly (6.6:1). */
.section--navy .eyebrow { color: var(--accent); }

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section--center .section-head { margin-inline: auto; text-align: center; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.75rem;
}

.lede { font-size: calc(1.15rem * var(--u-mult, 1)); color: var(--muted); }
.section--navy .lede { color: #9d9daa; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--step), background 0.18s var(--step),
    border-color 0.18s var(--step), color 0.18s var(--step);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent-cta); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: var(--border); color: var(--navy); background: transparent; }
.btn--ghost:hover { border-color: var(--navy); }
.section--navy .btn--ghost { border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.section--navy .btn--ghost:hover { border-color: #fff; }

/* ---------- Skip link ----------
   Offscreen until keyboard-focused, then flies in. */
.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  transition: transform 0.2s var(--step);
}
.skip-link:focus-visible { transform: translateY(1rem); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--step), box-shadow 0.2s var(--step);
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

/* The logo is the brand's strongest asset — give it room and let it lead. */
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
  transition: opacity 0.18s var(--step);
}
.brand:hover { opacity: 0.75; }
.brand img {
  height: 40px;
  width: auto;
  max-width: none;
}
@media (max-width: 520px) {
  .brand img { height: 32px; }
}
.brand--footer img { height: 44px; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-family: var(--font-head);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s var(--step);
}
.nav a:hover { color: var(--accent-text); }
/* `.nav a` (0,1,1) out-specifies `.btn--primary` (0,1,0), which silently made
   the header CTA's label ink-on-orange at 3.5:1. Restore the white label. */
.nav a.btn--primary { color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--navy); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gutter) 1.5rem;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin-top: 1rem; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: 1.25rem; }
.hero h1 em {
  font-style: normal;
  color: var(--accent-text);
}
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero-stats dt {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}
.hero-stats dd {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Hero visual: animated automation graphics ----------
   Two stacked panels. Graphics are SVG (with SMIL/CSS motion); the node text
   labels sit on top as real HTML so they stay editable. */
.hero-visual { background: transparent; border: 0; box-shadow: none; padding: 0;
  display: grid; gap: 1rem; }
.hv {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.15rem 1rem 1.4rem;
}
.hv-inner { position: relative; overflow: visible; line-height: 0; }
.hv-inner > svg { width: 100%; height: auto; display: block; }
.hv-label {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
  line-height: 1.1;
}
.hv-sub { display: block; font-size: 0.64rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }

@keyframes hvBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.hv-breathe { transform-box: fill-box; transform-origin: center; animation: hvBreathe 2.8s ease-in-out infinite; }
.hv-breathe.d1 { animation-delay: 0.35s; }
.hv-breathe.d2 { animation-delay: 0.7s; }
.hv-breathe.d3 { animation-delay: 1.05s; }
@keyframes hvDash { to { stroke-dashoffset: -16; } }
.hv-track { stroke-dasharray: 2 6; animation: hvDash 1s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .hero-visual * { animation: none !important; }
}

/* ---------- Logo marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  /* Feather the edges so logos fade in/out rather than pop. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  width: max-content;
  animation: scroll var(--marquee-duration, 40s) linear infinite;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }

.marquee__item {
  flex: none;
  display: grid;
  place-items: center;
  height: var(--logo-h);
}
.marquee__item img {
  /* Explicit px height, NOT max-height:100%. A percentage here fails to
     resolve against the grid area, letting each logo render at its full
     intrinsic 240px and blow the track width out. */
  height: var(--logo-h);
  width: auto;
  max-width: none;
  object-fit: contain;
  /* Full colour: these are the customers, not background texture. */
  transition: transform 0.3s var(--step);
}
.marquee__item:hover img { transform: scale(1.06); }

@keyframes scroll {
  from { transform: translate3d(0, 0, 0); }
  /* Track holds the logo set twice; -50% lands exactly on the seam. */
  to { transform: translate3d(-50%, 0, 0); }
}

.marquee__empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem;
}

/* ---------- Cards / services ---------- */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.22s var(--step), box-shadow 0.22s var(--step),
    border-color 0.22s var(--step);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d8d2cc;
}
.card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  margin-bottom: 1.1rem;
}
.card__icon svg { width: 22px; height: 22px; stroke: var(--accent-dark); }
.card p { color: var(--muted); font-size: 0.975rem; margin-bottom: 0.85rem; }
.card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.card ul li {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* ---------- Partner logo (collaboration cards) ----------
   Size by max-height + max-width so wide and squarish logos both sit at a
   comfortable, consistent height. */
.partner-logo { margin-bottom: 1.1rem; line-height: 0; }
.partner-logo img { max-height: 50px; max-width: 170px; height: auto; width: auto; object-fit: contain; }

/* ---------- Case-study workflow diagram ---------- */
.case-flow {
  margin: 1.25rem 0 1.35rem;
  padding: 1rem 0.5rem 0.25rem;
  border-top: 1px solid var(--border);
}
.case-flow svg { width: 100%; height: auto; display: block; }

/* Both case-study cards are the same height (grid stretch); pin the workflow
   diagram + chips to the bottom so they line up across cards regardless of how
   much body text sits above them. */
#results .grid > .card { display: flex; flex-direction: column; }
#results .case-flow { margin-top: auto; }

/* ---------- Editor width utilities (grid boxes) ----------
   Let a box span more of its row. Default boxes span one track. */
.u-wide { grid-column: span 2; }
.u-full { grid-column: 1 / -1; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step {
  position: relative;
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.85rem;
  letter-spacing: 0.05em;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.925rem; color: #9d9daa; margin: 0; }

/* ---------- Tech ---------- */
.tech-groups { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tech-group h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.tech-group ul { list-style: none; margin: 0; padding: 0; }
.tech-group li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  font-size: 0.95rem;
  font-family: var(--font-head);
  font-weight: 500;
}
.tech-group li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- Industries ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-head);
  font-size: 0.925rem;
  font-weight: 500;
  transition: border-color 0.18s var(--step), transform 0.18s var(--step);
}
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.chip svg { width: 17px; height: 17px; stroke: var(--accent); }

/* On the navy band a white pill would inherit the section's pale grey text,
   landing at ~1.4:1 contrast. Invert them instead. */
.section--navy .chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.section--navy .chip:hover { border-color: var(--accent); }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  gap: 2.75rem 2.5rem;
  /* Cap the column instead of letting it stretch to 1fr. With a small team,
     `1fr` gives each card ~470px around a 150px photo — the people end up
     marooned in whitespace. A fixed cap + centring reads as deliberate
     whether there are two of them or ten. */
  grid-template-columns: repeat(auto-fit, minmax(180px, 210px));
  justify-content: center;
  max-width: 960px;
  margin-inline: auto;
}
.team-card { text-align: center; }

.team-card__photo {
  position: relative;
  width: 150px;
  aspect-ratio: 1;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt);
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--step);
}
.team-card:hover .team-card__photo { transform: translateY(-4px); }
.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Empty-state silhouette shown until a real head-shot is dropped in Team/ */
.team-card__photo--empty {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: var(--border);
  box-shadow: none;
}
.team-card__photo--empty svg { width: 54px; height: 54px; stroke: #c9c3bd; }

.team-card h3 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.team-card .role {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.6rem;
}
.team-card .bio {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.team-card .li-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
}
.team-card .li-link:hover { color: var(--accent-text); }
.team-card .li-link svg { width: 14px; height: 14px; }

.team-empty-note {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Testimonial ---------- */
.quote {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}
.quote blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}
.quote blockquote::before { content: "\201C"; color: var(--accent); }
.quote blockquote::after { content: "\201D"; color: var(--accent); }
.quote figcaption { font-size: 0.9rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.18s var(--step), box-shadow 0.18s var(--step);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 120px; }

.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.contact-list li { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.85rem; }
.contact-list svg { width: 18px; height: 18px; stroke: var(--accent); flex: none; }
.contact-list a { color: var(--navy); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-navy);
  color: #85858f;
  padding-block: 3.5rem 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
/* The colour logo sits happily on navy: the wordmark orange reads 5.2:1
   against #020122, so no separate negative version is needed. */
.site-footer .brand { color: #fff; }
.site-footer h3 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { text-decoration: none; transition: color 0.15s var(--step); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.825rem;
}

/* ==========================================================================
   Editor utilities
   The visual editor (scripts/start_site.py -> /edit) can only ever apply the
   classes below. That's deliberate: a free colour picker or arbitrary pixel
   sizes would let the page drift off-brand and below WCAG AA. Every value
   here is on-palette and contrast-checked.
   ========================================================================== */

/* Size: a MULTIPLIER, not a size.
   These classes must never set font-size directly. `font-size: 1.4em` resolves
   against the PARENT's size, so it would replace an h1's 62px with 17px*1.4 =
   24px — smaller than body text. Instead each element multiplies its own
   declared size by --u-mult (see the h1/h2/h3/.lede rules), so the type scale
   survives and an h1 stays an h1 at every step. */
.u-size-s  { --u-mult: 0.85; }
.u-size-m  { --u-mult: 1; }
.u-size-l  { --u-mult: 1.18; }
.u-size-xl { --u-mult: 1.4; }

/* Elements with no font-size of their own scale from what they inherit. */
p[data-edit], li[data-edit], dd[data-edit],
span[data-edit], a[data-edit], button[data-edit], figcaption[data-edit] {
  font-size: calc(1em * var(--u-mult, 1));
}

/* Colour on LIGHT backgrounds. Ratios are against white. */
.u-color-navy  { color: var(--navy); }        /* 20.4:1 */
.u-color-ink   { color: var(--ink); }         /* 16.9:1 */
.u-color-muted { color: var(--muted); }       /*  5.3:1 */
.u-color-brand { color: var(--accent-text); } /*  4.97:1 */

/* Colour on DARK (navy) backgrounds — the light accent is the readable one
   there, and the deep one is not. Scoped so the same button can't misfire. */
.section--navy .u-color-white,
.site-footer  .u-color-white  { color: #fff; }            /* 20.4:1 */
.section--navy .u-color-light,
.site-footer  .u-color-light  { color: #cfcfd8; }         /* 13.4:1 */
.section--navy .u-color-brand,
.site-footer  .u-color-brand  { color: var(--accent); }   /*  5.8:1 */

.u-weight-normal { font-weight: 400; }
.u-weight-bold   { font-weight: 700; }
.u-align-left   { text-align: left; }
.u-align-center { text-align: center; }
.u-align-right  { text-align: right; }

/* ---------- Placeholder marker ----------
   Anything wearing this needs real content signed off before launch. */
[data-placeholder] {
  position: relative;
  outline: 1.5px dashed rgba(226, 129, 86, 0.5);
  outline-offset: 4px;
  border-radius: 3px;
}
body.hide-placeholders [data-placeholder] { outline: none; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--step), transform 0.55s var(--step);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ----------
   Honour the OS setting: kill the marquee and every reveal. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  /* The duplicated half is decorative; hide it when not scrolling. */
  .marquee__track [data-clone="true"] { display: none; }
  .reveal { opacity: 1; transform: none; }
}
