/* =============================================================================
   Authr web — component layer.

   HARD CONSTRAINTS, enforced by tools/check-source.js:
     - No hex, anywhere, ever.
     - No raw lengths. Every length is var(--…), from the brand token contract or
       from display-scale.css (the one sanctioned exception, SKALD-D-012).
     - Only SEMANTIC tokens. The contract also exposes a primitive teal ramp in
       :root; referencing it directly is what method/08 Phase 2 forbids.

   A NOTE ON NAMESPACING, from assumption A-006: the contract's semantic names are
   short and unprefixed (--bg, --text, --card). This file must therefore NEVER
   define a variable by one of those names. Everything declared here is either in
   display-scale.css or prefixed.

   Structure follows design_language.md Part 2's resolution: ONE CONTINUOUS GROUND
   with EXACTLY ONE INVERSION. `ocean` is the ground and is the :root default;
   `light` carries the About region. `hybrid` is parked, not used at launch.
   ============================================================================= */

/* --- imagery plates -----------------------------------------------------
   Part 5: Authr has no photography and nothing to film, so the four shipped
   authr-gradient plates are the source rather than a commission. The hero plate
   is hybrid-mountain-silhouette-01, in its approved 1024w rendition
   (hybrid-mountain-silhouette-01-1024w.png; F-1: dark ridge, dusk sky, least
   scrim work), which frees the rivers plates for the data section.

   Declared here rather than inline on the element on purpose: an inline style
   attribute would need 'unsafe-inline' in the content-security policy, and a
   strict CSP with no external hosts is definition-of-done point 6. The path is
   the deterministic passthrough-copy destination set in .eleventy.js. */
:root {
  --hero-plate: url("/assets/brand/imagery/hybrid-mountain-silhouette-01-1024w.png");
  --data-plate: url("/assets/brand/imagery/insight-aerial-rivers-01.png");
}

/* --- reset-ish ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  line-height: var(--lh-lg);
  font-weight: var(--weight-body);
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* --- layout -------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.wrap--wide { max-width: none; padding-inline: var(--space-8); }

.section { padding-block: var(--rhythm-section); }
.section--tight { padding-block: var(--rhythm-section-tight); }
.section + .section { border-top: var(--hairline) solid var(--border); }

/* --- 6.1 the hero -------------------------------------------------------
   Restrained, per Heyra. Light-weight statement set LOW over the plate, with a
   full-width hairline rule beneath carrying the announcement line left and the
   affordance right. --on-gradient rather than --text over any image. */
.hero {
  position: relative;
  min-height: var(--hero-min-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--bg);
  background-image: var(--scrim-media), var(--hero-plate);
  background-size: cover, cover;
  background-position: center, center;
  color: var(--on-gradient);
}
.hero__statement {
  font-family: var(--font-display);
  font-size: var(--display-1);
  font-weight: var(--weight-body);
  line-height: var(--lh-4xl);
  letter-spacing: var(--track-tight);
  max-width: var(--measure);
  margin: 0 0 var(--rhythm-section-tight);
}
.hero__rule {
  border-top: var(--hairline) solid var(--border-bright);
  padding-block: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: baseline;
  justify-content: space-between;
}
.hero__announce,
.hero__affordance {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  margin: 0;
}
.hero__affordance {
  text-decoration: none;
  border-bottom: var(--hairline) solid currentColor;
  transition: color var(--duration-fast) var(--ease-standard);
}
.hero__affordance:hover,
.hero__affordance:focus-visible { color: var(--accent); }

/* The walkthrough's dark hero (6.5): the same statement and rule, no plate. */
.hero--plain {
  min-height: auto;
  background-image: none;
  padding-block: var(--rhythm-section) var(--rhythm-section-tight);
}

/* --- the masthead -------------------------------------------------------
   Not in design_language.md Part 6, which has no navigation component. The
   name (home in this language) and the language switcher, set like the hero's
   announcement line so it stays quiet. Placement for design_director. */
.masthead { border-bottom: var(--hairline) solid var(--border); }
.masthead__bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: baseline;
  justify-content: space-between;
  padding-block: var(--space-4);
}
.masthead__name,
.masthead__switch {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}
.masthead__switch { border-bottom: var(--hairline) solid currentColor; }
.masthead__name:hover,
.masthead__name:focus-visible,
.masthead__switch:hover,
.masthead__switch:focus-visible { color: var(--accent); }

/* --- the lede -----------------------------------------------------------
   Each page's opening line, which is also its meta description. */
.lede {
  font-size: var(--display-3);
  line-height: var(--lh-xl);
  max-width: var(--measure);
  margin: var(--space-6) 0;
}

/* --- 6.2 the three-beat spine ------------------------------------------
   The homepage states its entire core in three short propositions, each
   occupying a full region of the continuous ground. If a section cannot be
   assigned to a beat, it is a candidate for cutting. */
.spine { display: grid; gap: var(--rhythm-section-tight); }
.beat { display: grid; gap: var(--space-4); }
.beat__index {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--dim);
}
.beat__proposition {
  font-family: var(--font-display);
  font-size: var(--display-2);
  font-weight: var(--weight-body);
  line-height: var(--lh-3xl);
  letter-spacing: var(--track-tight);
  max-width: var(--measure-narrow);
  margin: 0;
}

/* --- 6.7 the statistic band -------------------------------------------
   One long sentence containing a number, set at size, occupying a whole
   section. A claim about the CATEGORY, never a self-claim — the figure must be
   attributed to a public source, which is why the attribution is not optional
   markup. */
.statband { background: var(--card); }
.statband__claim {
  font-family: var(--font-display);
  font-size: var(--display-2);
  font-weight: var(--weight-body);
  line-height: var(--lh-3xl);
  letter-spacing: var(--track-tight);
  margin: 0 0 var(--space-6);
}
.statband__source {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label-sm);
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

/* --- the single inversion ----------------------------------------------
   Part 3: the inverted region carries people and substance, and keeps roughly a
   fifth of the dark visible at the left edge so it reads as a LAYER rather than
   a page break. The theme attribute re-scopes the contract's semantic tokens for
   this subtree — that is the mechanism the token file is built for, not a hack. */
.inversion {
  background: var(--bg);
  color: var(--text);
  border-block: var(--hairline) solid var(--border);
}
.inversion__layer { margin-left: 18%; }

/* --- 6.8 the signed statement -------------------------------------------
   Institutional About prose closed by a personal signature — name and role.
   Resolves the D4 "we" problem. Under 200 words by SKALD-D-007, which makes
   principle P4 binding: brevity alone will not make it land, so weight, measure
   and air do the work. */
.about__body {
  font-size: var(--display-3);
  line-height: var(--lh-xl);
  max-width: var(--measure);
}
.about__body > p { margin: 0 0 var(--space-6); }
.signature {
  margin-top: var(--rhythm-section-tight);
  padding-top: var(--space-5);
  border-top: var(--hairline) solid var(--border);
  max-width: var(--measure-narrow);
}
/* The signed founder part (SKALD-AUTHR-028): the person's words, below the
   hairline and above the name, kept apart from the company text. */
.signature__statement { margin: 0 0 var(--space-5); }
.signature__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bright);
  margin: 0;
}
.signature__role {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--dim);
  margin: var(--space-1) 0 0;
}

/* --- 6.5 the case walkthrough -------------------------------------------
   Each step a dotted rule, a small-caps label, a headline and two paragraphs.
   The small square image per step waits on an asset. */
.case__client,
.step__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}
.step {
  margin-top: var(--rhythm-section-tight);
  padding-top: var(--space-5);
  border-top: var(--hairline) dotted var(--border);
  max-width: var(--measure);
}
.step__headline {
  font-family: var(--font-display);
  font-size: var(--display-3);
  font-weight: var(--weight-body);
  line-height: var(--lh-xl);
  margin: var(--space-2) 0 var(--space-4);
}
.step > p { margin: 0 0 var(--space-4); }

/* --- long text: the privacy page ---------------------------------------- */
.prose { max-width: var(--measure); }
.prose > p { margin: 0 0 var(--space-4); }

/* --- 6.13 the floating card -------------------------------------------
   Cards sit OVER the continuous ground. No card introduces a new background
   colour — that is the Heyra ground rule made concrete. */
.card {
  background: var(--card);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.card--raised { background: var(--raised); }

/* --- 6.10 the soft link -------------------------------------------------
   From SLA. A small grey label above an underlined inline link, instead of a
   button. This IS the contact mechanism (SKALD-D-008) — a mailto: in the footer,
   no form, no processor, no GDPR data flow, no gated outbound destination.
   Quieter than a button on a page that does not want to shout. */
.softlink { display: grid; gap: var(--space-2); }
.softlink__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--dim);
}
.softlink__link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: var(--space-1);
  transition: color var(--duration-fast) var(--ease-standard);
}
.softlink__link:hover,
.softlink__link:focus-visible { color: var(--accent); }

/* --- footer + 6.12 the persistent footnote ------------------------------
   Heyra's device: a quiet etymological line, bottom-left, every screen. Authr's
   exact analog is auðr. */
.foot {
  border-top: var(--hairline) solid var(--border);
  padding-block: var(--rhythm-section-tight);
  font-size: var(--text-md);
}
.foot__grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
}
@media (min-width: 48em) {
  .foot__grid { grid-template-columns: 2fr repeat(3, 1fr); align-items: start; }
}
.foot__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.foot__legal { color: var(--dim); font-size: var(--text-sm); }
.foot__legal > p { margin: 0 0 var(--space-2); }
.footnote {
  color: var(--dim);
  font-size: var(--text-xs);
  letter-spacing: var(--track-label-sm);
  margin: var(--space-8) 0 0;
}
.footnote em { font-style: italic; color: var(--text); }

/* --- accessibility ------------------------------------------------------
   Nothing depends on hover alone (Part 7). quality_systems_engineer audits the
   implementation; this is the floor, not the audit. */
:focus-visible {
  outline: var(--hairline) solid var(--focus-ring);
  outline-offset: var(--space-1);
}
.visually-hidden {
  position: absolute;
  width: var(--hairline);
  height: var(--hairline);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The skip link shows itself when a keyboard reaches it. */
a.visually-hidden:focus-visible {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  padding: var(--space-2) var(--space-4);
  background: var(--card);
  color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- placeholder copy, visible on purpose -------------------------------
   Until copy arrives through SKALD-ROOT-001 and the operator's sign-off, every
   outward claim is an @@AWAITING marker. Draft builds render them LOUDLY so
   nobody mistakes a scaffold for a site; a production build refuses them. */
.awaiting {
  display: inline-block;
  border: var(--hairline) dashed var(--border-bright);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--dim);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: var(--track-tag);
  line-height: var(--lh-md);
}
