/* ==========================================================================
   Cosara.in — Base: fonts, reset, typography, layout primitives
   ========================================================================== */

/* ---- Self-hosted Source Sans Pro (latin subset) ---- */
@font-face{font-family:"Source Sans Pro";src:url("../fonts/source-sans-pro-latin-300-normal.woff2") format("woff2");font-weight:300;font-style:normal;font-display:swap;}
@font-face{font-family:"Source Sans Pro";src:url("../fonts/source-sans-pro-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:"Source Sans Pro";src:url("../fonts/source-sans-pro-latin-600-normal.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap;}
@font-face{font-family:"Source Sans Pro";src:url("../fonts/source-sans-pro-latin-700-normal.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap;}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-base);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-reg);
  color: var(--c-black);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- Focus: 2px cyan, 2px offset, on every interactive element ---- */
:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

/* On dark or accent surfaces the ring flips to white so it stays visible */
.band :focus-visible,
.site-footer :focus-visible { outline-color: var(--c-white); }
[data-accent="amber"].band :focus-visible,
[data-accent="green"].band :focus-visible { outline-color: var(--c-black); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-white); color: var(--c-black);
  padding: var(--s-3) var(--s-6); border: 2px solid var(--c-cyan);
}
.skip-link:focus { left: var(--s-4); top: var(--s-4); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--fw-light);
  letter-spacing: -0.005em;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); }

p { margin: 0 0 var(--s-6); max-width: var(--w-measure); }
p:last-child { margin-bottom: 0; }

/* Standfirst — Semibold intro paragraph beneath a heading */
.standfirst { font-weight: var(--fw-semi); }

/* Eyebrow label — the only uppercase text in the system */
.eyebrow {
  font-size: var(--fs-meta);
  font-weight: var(--fw-semi);
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-grey);
}

.meta { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--c-grey); }

.legal { font-size: 12px; line-height: 18px; }

/* Inline link inside body copy */
.link {
  color: var(--c-cyan-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-base);
}
.link:hover { color: var(--c-slate); }

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--w-container);
  margin-inline: auto;
  padding-inline: var(--s-6);
}
.container--wide { max-width: var(--w-container-wide); }

.section { padding-block: var(--pad-section); }
.section--compact { padding-block: var(--pad-section-sm); }
.section--grey { background: var(--c-grey-100); }
.section--grey-50 { background: var(--c-grey-50); }

/* Full-bleed accent band. One identity colour, edge to edge.
   Fill uses the AA-safe --c-band (brand Shade where the bright colour fails). */
.band {
  padding-block: var(--pad-band);
  background: var(--c-band);
  color: var(--c-accent-ink);
}
.band h1, .band h2, .band h3, .band h4 { color: inherit; }
/* On an accent band the molecule field inverts so it reads against the colour */
.band { --c-dot: rgba(255, 255, 255, .38); }
[data-accent="amber"].band, [data-accent="green"].band { --c-dot: rgba(0, 0, 0, .18); }
.band .figure-circle__media { background: rgba(255, 255, 255, .12); }

/* Per-section accent. --c-accent = bright mark colour (orbs, borders);
   --c-band = fill for solid bands; --c-accent-ink = text on that fill.
   Bright orange and cyan fail white text, so their bands use the Shade.
   Yellow and green read best as bright fills with black text. */
[data-accent="purple"]  { --c-accent: var(--c-purple);  --c-band: var(--c-purple);       --c-accent-ink: var(--c-white); }
[data-accent="magenta"] { --c-accent: var(--c-magenta); --c-band: var(--c-magenta);      --c-accent-ink: var(--c-white); }
[data-accent="orange"]  { --c-accent: var(--c-orange);  --c-band: var(--c-orange-shade); --c-accent-ink: var(--c-white); }
[data-accent="amber"]   { --c-accent: var(--c-amber);   --c-band: var(--c-amber);        --c-accent-ink: var(--c-black); }
[data-accent="green"]   { --c-accent: var(--c-green);   --c-band: var(--c-green);        --c-accent-ink: var(--c-black); }
[data-accent="cyan"]    { --c-accent: var(--c-cyan);    --c-band: var(--c-cyan-shade);   --c-accent-ink: var(--c-white); }
[data-accent="slate"]   { --c-accent: var(--c-slate);   --c-band: var(--c-slate);        --c-accent-ink: var(--c-white); }

/* Split media / text — the workhorse pattern. Sides alternate. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-20);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
.split__body { max-width: 560px; }
.split__body > * + * { margin-top: var(--s-6); }

/* Centred statement — opens and closes pages */
.statement { text-align: center; }
.statement > * { margin-inline: auto; }
.statement p { max-width: 640px; }

/* Signature gradient rule — 20px, full bleed, once per page under the header */
.brand-rule {
  height: 20px;
  background: var(--grad-brand);
}

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .split { gap: var(--s-12); }
}
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; gap: var(--s-8); }
  .split--reverse > :first-child { order: 0; }
  .container { padding-inline: var(--s-6); }
}
