/* ==========================================================================
   Alignment Marketing design system 1.0 (2026-11-12): components
   Only what the home uses, with the states each has. Requires tokens.css
   and base.css first. Breakpoints: 40rem (sm), 64rem (lg).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Site header
   Use when: the top of every page; wordmark left, credit right.
   Not when: a page needs a primary action or nav; this header carries none
   because the site has none (measured, both widths).
   Measured: border-bottom 1 px line, 16 px block padding, height 61 px.
   -------------------------------------------------------------------------- */
.site-header { border-bottom: var(--rule) solid var(--line); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}

/* --------------------------------------------------------------------------
   Wordmark (live text, the site's only logo)
   Use when: the header, linking home. Not when: inside running text; write
   the name plainly there.
   Rules: set in the sans at 18 px semibold, tracking tight, ink on paper;
   clear space is the header padding (16 px); never below 16 px; never
   recolored, outlined, stretched or set in another face.
   States: rest ink; hover ink (unchanged, as measured); focus ring.
   -------------------------------------------------------------------------- */
.wordmark {
  font-size: var(--type-wordmark-size);
  line-height: var(--type-wordmark-line);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Credit link (the quiet underlined link: "by GLIDE", "GLIDE®")
   Use when: a link sits in muted small text. Not when: a link names a
   destination in running ink text; it stays underlined there too.
   Link rule: underlined at rest (2 px offset) in the text color; hover
   turns ink; active ink; visited unchanged (one site, one destination);
   focus ring. Underline is the text color, so it meets the text's 4.73:1.
   -------------------------------------------------------------------------- */
.link-quiet {
  text-decoration-line: underline;
  text-underline-offset: 2px;
  transition: color var(--duration) var(--ease);
}
.link-quiet:visited { color: inherit; }
.link-quiet:hover,
.link-quiet:active { color: var(--ink); }

/* --------------------------------------------------------------------------
   Page hero (the centered title block)
   Use when: the head of a page whose content is a list or grid below.
   Not when: a page needs an image or an action in its head.
   Measured: centered; h1 then lede 16 px below; 64 px to the content.
   -------------------------------------------------------------------------- */
.page-hero {
  text-align: center;
  margin-bottom: var(--section-y);
}
.page-hero .t-lede {
  margin-top: var(--space-4);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Principle grid
   Use when: a numbered set of equal items, each a link. Not when: items
   differ in weight; use a list instead.
   Measured: 1 column, 2 from 40rem, 3 from 64rem; 16 px gap.
   -------------------------------------------------------------------------- */
.principle-grid {
  display: grid;
  gap: var(--grid-gap);
}
@media (min-width: 40rem) { /* --bp-sm */
  .principle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) { /* --bp-lg */
  .principle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Principle card (the whole card is one link)
   Use when: one item of the principle grid. Not when: the card would hold
   a second link or a button; a card is one destination.
   Anatomy: eyebrow (group), then title with its muted number.
   States, all measured except focus:
     rest: 1 px line, paper.
     hover: line darkens to ink at 20%, fill wash at 50%, title ink at 80%.
     active: as hover (no separate pressed state on the site).
     focus: the system ring, 2 px ink, 2 px offset (added).
   Motion: color shift, 150 ms; instant under reduced motion.
   -------------------------------------------------------------------------- */
.principle-card {
  display: block;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius);
  padding: var(--card-inset);
  transition:
    border-color var(--duration) var(--ease),
    background-color var(--duration) var(--ease);
}
.principle-card__title {
  margin-top: var(--space-2);
  transition: color var(--duration) var(--ease);
}
.principle-card__num {
  color: var(--muted);
  font-weight: var(--weight-regular);
}
@media (hover: hover) {
  .principle-card:hover {
    border-color: var(--line-hover);
    background-color: var(--wash-hover);
  }
  .principle-card:hover .principle-card__title { color: var(--ink-soft); }
}
.principle-card:active {
  border-color: var(--line-hover);
  background-color: var(--wash-hover);
}

/* --------------------------------------------------------------------------
   Site footer
   Use when: the foot of every page: motto, rule, credit.
   Not when: a sitemap or contact route is needed; the site has none.
   Measured: border-top 1 px line, 32 px block padding, centered.
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: var(--rule) solid var(--line);
  text-align: center;
}
.site-footer__inner { padding-block: var(--space-8); }

/* --------------------------------------------------------------------------
   Separator (short centered rule)
   Use when: dividing two lines of a centered footer. Not when: dividing
   bands; bands are divided by their own border.
   Measured: 1 px line, max 20rem, 16 px above and below.
   -------------------------------------------------------------------------- */
.separator {
  height: var(--rule);
  width: 100%;
  max-width: var(--container-narrow);
  margin: var(--space-4) auto;
  background-color: var(--line);
  border: 0;
}

/* ==========================================================================
   Added for the principle pages (PAGES round, 2026-11-12). Nothing above
   this line changed. Source: material/pages/principles/<slug>/rendered.html
   and styles.css (identical sheet to the home's), boxes.json at both widths.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Principle detail (the single reading column of a principle page)
   Use when: one principle, read alone: back link, eyebrow, title, lede.
   Not when: a list or grid of items; use page hero and principle grid.
   Measured: max-w-3xl 48rem (site --container-3xl) with the 24 px gutter,
   so the text column is 720 px, left edge 360 at 1440; 64 px top and
   bottom; title 8 px under the eyebrow line; lede 24 px under the title.
   The back link and the eyebrow share one line, as on the live page: the
   link is inline, its 32 px bottom margin sets the line, and the eyebrow
   follows it with no space between (the link's 10 px padding is the gap).
   -------------------------------------------------------------------------- */
.principle-detail {
  max-width: 48rem; /* site --container-3xl */
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--section-y);
}
.principle-detail__title {   /* h1: 30 px / 36 px, 36 px / 40 px from 40rem */
  margin-top: var(--space-2);
  font-size: 1.875rem;       /* site --text-3xl */
  line-height: 2.25rem;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
@media (min-width: 40rem) { /* --bp-sm */
  .principle-detail__title {
    font-size: var(--am-size-36);
    line-height: var(--type-display-line);
  }
}
.principle-detail__num {
  color: var(--muted);
  font-weight: var(--weight-regular);
}
.principle-detail__lede {    /* with .t-lede: 18 px muted, relaxed, full column */
  margin-top: var(--space-6);
  line-height: 1.625;        /* site --leading-relaxed, 29.25 px */
  max-width: none;
}

/* --------------------------------------------------------------------------
   Back link (small ghost button: arrow and label, "All Principles")
   Use when: returning from a detail page to its list. Not when: a primary
   action; the site has no filled button on any page.
   Measured: inline-flex, 32 px high, 10 px side padding, 6 px gap plus the
   icon's 8 px margin, 16 px icon, 14 px medium ink, radius 6 px
   (site --radius-md), no border, no fill at rest, 32 px bottom margin.
   States: rest ink, no fill; hover and active fill wash, text ink-strong
   (measured: hover:bg-accent hover:text-accent-foreground); focus the
   system ring (the site's ring/50 is under 2:1, replaced as on the home).
   Motion: color shift, 150 ms; instant under reduced motion.
   -------------------------------------------------------------------------- */
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;             /* site gap-1.5 */
  height: var(--space-8);
  padding-inline: 0.625rem;  /* site px-2.5 with an icon */
  margin-bottom: var(--space-8);
  border-radius: 0.375rem;   /* site --radius-md */
  font-size: var(--type-small-size);
  line-height: var(--type-small-line);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  color: var(--ink);
  vertical-align: baseline;
  transition:
    color var(--duration) var(--ease),
    background-color var(--duration) var(--ease);
}
.back-link__icon {
  width: var(--space-4);
  height: var(--space-4);
  margin-right: var(--space-2);
  flex-shrink: 0;
  pointer-events: none;
}
.back-link:hover,
.back-link:active {
  background-color: var(--wash);
  color: var(--ink-strong);
}
