/* =========================================================
   Freedom in the Arts — shared design system
   Locked at Style Tile B → canonical 2026-04-30.
   Single grotesque (Hanken Grotesk), two grounds, one accent.
   ========================================================= */

:root {
  /* Palette — locked */
  --paper:    #F4F1EA;
  --white:    #FFFFFF;
  --black:    #0A0A0A;
  --graphite: #1F1F1F;
  --red:      #B6232A;
  --rule:           rgba(10, 10, 10, 0.22);
  --rule-strong:    rgba(10, 10, 10, 0.55);
  --rule-on-black:  rgba(244, 241, 234, 0.20);
  --paper-on-black:     rgba(244, 241, 234, 0.92);
  --paper-on-black-dim: rgba(244, 241, 234, 0.60);

  /* Measures — analytical, narrow (s3), wide */
  --measure-prose:  36rem;
  --measure-narrow: 27rem;
  --measure-wide:   52rem;

  /* Page width / gutters */
  --page-max:   1320px;
  --gutter-x:   5rem;
  --gutter-x-sm: 1.5rem;

  /* Masthead heights — first land vs. shrunk */
  --mast-h-large:  120px;
  --mast-h-small:  56px;

  /* Motion */
  --ease-shrink: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--graphite);
  font-family: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* =========================================================
   PAGE FRAME
   ========================================================= */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page > main { flex: 1 0 auto; }

/* =========================================================
   MASTHEAD — black band, horizontal wordmark left, nav right.
   Two states: hero-scale (first land) and shrunk (sticky).
   Shrink is one direction — once shrunk, stays shrunk.
   ========================================================= */
.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 var(--gutter-x);
  height: var(--mast-h-large);
  border-bottom: 1px solid var(--rule-on-black);
  transition: height 320ms var(--ease-shrink);
  will-change: height;
}
@media (max-width: 720px) {
  .mast { padding: 0 var(--gutter-x-sm); }
}
.mast.is-shrunk {
  height: var(--mast-h-small);
}

.mast-mark-link {
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
}
.mast-mark {
  display: inline-block;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper);
  white-space: nowrap;
  transition: font-size 320ms var(--ease-shrink), letter-spacing 320ms var(--ease-shrink);
  will-change: font-size;
}
.mast-disclaimer {
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--paper);
  opacity: 0.7;
  white-space: nowrap;
  text-transform: none;
  transition: opacity 200ms ease, font-size 320ms var(--ease-shrink), max-height 320ms var(--ease-shrink);
}
@media (max-width: 720px) {
  .mast-disclaimer { font-size: 0.7rem; white-space: normal; }
}
.mast.is-shrunk .mast-disclaimer {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}
@media (max-width: 720px) {
  .mast-mark { font-size: 1.05rem; letter-spacing: 0.06em; }
}
.mast.is-shrunk .mast-mark { font-size: 0.95rem; }
@media (max-width: 720px) {
  .mast.is-shrunk .mast-mark { font-size: 0.78rem; }
}

.mast-nav {
  display: flex;
  gap: 1.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--paper);
  flex-wrap: nowrap;
}
.mast-nav a {
  color: var(--paper);
  text-decoration: none;
  opacity: 0.85;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: opacity 160ms ease, border-color 160ms ease;
}
.mast-nav a:hover,
.mast-nav a.is-current {
  opacity: 1;
  border-bottom-color: var(--paper);
}
/* Burger button — hidden by default, shown when nav can't fit */
.mast-burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem -0.5rem 0;
  cursor: pointer;
  width: 2.6rem;
  height: 2.6rem;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0.42rem;
}
.mast-burger-line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--paper);
  transition: transform 240ms ease, opacity 240ms ease;
}

/* Below 1100px the six-item nav can't sit on one line cleanly — collapse to burger */
@media (max-width: 1100px) {
  .mast-nav { display: none; }
  .mast-burger { display: flex; }
}

/* Full-screen overlay menu */
.mast-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: var(--gutter-x);
  visibility: hidden;
  opacity: 0;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}
.mast-menu.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 240ms ease;
}
@media (max-width: 720px) {
  .mast-menu { padding: var(--gutter-x-sm); }
}

.mast-menu-close {
  position: absolute;
  top: calc((var(--mast-h-large) - 2.6rem) / 2);
  right: var(--gutter-x);
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mast-menu-close .mast-burger-line {
  position: absolute;
  width: 1.6rem;
}
.mast-menu-close .mast-burger-line:first-child { transform: rotate(45deg); }
.mast-menu-close .mast-burger-line:last-child { transform: rotate(-45deg); }
@media (max-width: 720px) {
  .mast-menu-close {
    right: var(--gutter-x-sm);
    top: calc((var(--mast-h-large) - 2.6rem) / 2);
  }
}

.mast-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-align: left;
  max-width: 32rem;
  margin: 0 auto;
  width: 100%;
}
.mast-menu-nav a {
  color: var(--paper);
  text-decoration: none;
  opacity: 0.92;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.3rem;
  transition: opacity 160ms ease, border-color 160ms ease;
}
.mast-menu-nav a:hover,
.mast-menu-nav a.is-current {
  opacity: 1;
  border-bottom-color: var(--paper);
}
@media (max-width: 720px) {
  .mast-menu-nav { font-size: 1.15rem; gap: 1.25rem; }
}

body.menu-open { overflow: hidden; }

/* =========================================================
   FOOTER — paper, hairline above, editorial register
   ========================================================= */
.foot {
  position: relative;
  background: var(--paper);
  color: var(--graphite);
  padding: 4rem var(--gutter-x) 3rem;
}
.foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter-x);
  right: var(--gutter-x);
  height: 1px;
  background: var(--rule);
}
@media (max-width: 720px) {
  .foot { padding: 3rem var(--gutter-x-sm) 2rem; }
  .foot::before { left: var(--gutter-x-sm); right: var(--gutter-x-sm); }
}

.foot-grid {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr; gap: 2.25rem; }
}

.foot h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--rule-strong);
  margin: 0 0 1rem;
}

.foot p,
.foot a {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--graphite);
}
.foot a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 160ms ease;
}
.foot a:hover { border-bottom-color: var(--black); }
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot ul li { margin: 0 0 0.55rem; }
.foot ul li:last-child { margin: 0; }

.foot-tag {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--graphite);
  max-width: 28rem;
  margin: 0 0 1rem;
}

.foot-meta {
  max-width: var(--page-max);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rule-strong);
}

/* =========================================================
   SECTION PRIMITIVES — shared across both pages
   ========================================================= */
.sec {
  padding: 6rem var(--gutter-x);
}
.sec--top {
  padding-top: 7rem;
}
.sec--tight {
  padding: 4rem var(--gutter-x);
}
@media (max-width: 720px) {
  .sec,
  .sec--tight,
  .sec--top { padding-left: var(--gutter-x-sm); padding-right: var(--gutter-x-sm); }
  .sec { padding-top: 4rem; padding-bottom: 4rem; }
  .sec--top { padding-top: 5rem; }
}

.sec-inner { max-width: var(--page-max); margin: 0 auto; }

/* "Seam" — black-to-paper structural transition. No fade.
   Section dividers are inset to the gutters, never full-bleed. */
.sec--paper { background: var(--paper); }
.sec--white { background: var(--white); }
.sec--black { background: var(--black); color: var(--paper); }

.sec--paper,
.sec--white,
.section-rule { position: relative; }
.sec--paper::before,
.sec--white::before,
.section-rule::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter-x);
  right: var(--gutter-x);
  height: 1px;
  background: var(--rule);
}
@media (max-width: 720px) {
  .sec--paper::before,
  .sec--white::before,
  .section-rule::before {
    left: var(--gutter-x-sm);
    right: var(--gutter-x-sm);
  }
}

/* Section eyebrow (editorial metadata, not deck-chrome) */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--rule-strong);
  margin: 0 0 1.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.eyebrow .num { color: var(--red); }
.eyebrow--on-black { color: var(--paper-on-black-dim); }
.eyebrow--on-black .num { color: var(--paper); }

/* =========================================================
   TYPE SCALE
   ========================================================= */
.h-display {
  font-weight: 700;
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--black);
  margin: 0;
}
.h-display em { font-style: italic; font-weight: 500; }

.h-section {
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--black);
  margin: 0 0 2rem;
  max-width: 16ch;
}

.h-sub {
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--black);
  margin: 0 0 0.75rem;
}

.lede {
  font-weight: 300;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--graphite);
  max-width: var(--measure-prose);
  margin: 0 0 2.5rem;
}
.lede em { font-weight: 400; }
.lede--on-black { color: var(--paper-on-black); }

.prose {
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--graphite);
  max-width: var(--measure-prose);
}
.prose p { margin: 0 0 1.2em; }
.prose p:last-child { margin: 0; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  transition: border-color 160ms ease;
}
.prose a:hover { border-bottom-color: var(--black); }

.attrib {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--rule-strong);
  margin: 1.25rem 0 0;
}
.attrib--on-black { color: var(--paper-on-black-dim); }

/* =========================================================
   MECHANISM TERMS — red small-cap glossary entries
   The page is teaching vocabulary, not listing features.
   ========================================================= */
.mech-block {
  max-width: var(--measure-wide);
  margin: 2.5rem 0 2.5rem;
  border-top: 1px solid var(--black);
  padding-top: 2rem;
}
.mech-block-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--rule-strong);
  margin: 0 0 1.75rem;
}
.mech-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}
@media (max-width: 720px) { .mech-list { grid-template-columns: 1fr; } }

.mech {
  display: flex;
  flex-direction: column;
}
.mech a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.mech .term {
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--red);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}
.mech .term .n {
  font-style: italic;
  font-size: 0.9rem;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}
.mech .term .arrow {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.mech a:hover .term .arrow {
  opacity: 1;
  transform: translateX(0);
}
.mech .gloss {
  font-weight: 400;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--graphite);
  margin: 0;
}

/* Scroll reveal — initial state, animated state */
.mech {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.mech.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .mech { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   CTA — the single red moment in section 6
   ========================================================= */
.cta-primary {
  display: inline-block;
  background: var(--red);
  color: var(--paper);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-decoration: none;
  padding: 1.1rem 2rem;
  border: 1px solid var(--red);
  transition: background 160ms ease, color 160ms ease;
}
.cta-primary:hover {
  background: var(--black);
  border-color: var(--black);
}

.cta-secondary {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--black);
  padding-bottom: 0.3rem;
  transition: opacity 160ms ease;
}
.cta-secondary:hover { opacity: 0.7; }

/* =========================================================
   ITALIC BEATS — the three placed moments only
   ========================================================= */
.beat-moral {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--paper);
  max-width: 26ch;
  margin: 0;
}

.beat-pull {
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--black);
  margin: 0 0 1.75rem;
  max-width: 18ch;
}

.beat-testimony {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--graphite);
  margin: 0;
  max-width: 28ch;
  position: relative;
}
.beat-testimony::before {
  content: "\201C";
  font-style: normal;
  font-weight: 700;
  font-size: 3rem;
  line-height: 0;
  color: var(--black);
  display: block;
  margin: 0 0 1.25rem -0.3rem;
}

/* =========================================================
   UTILITIES
   ========================================================= */
.rule-line {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 2.5rem 0;
}
.rule-line--strong { background: var(--black); }

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--black);
  color: var(--paper);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  z-index: 100;
}
.skip-link:focus { top: 0; }
