/* ─── PKTD™ Our Story — The Build Journal ───
   Loaded after legal.css and blog.css. Those files provide the local fonts,
   shared colour tokens, navigation, footer, skip link, and focus treatment.
   Story content is fully visible by default; JavaScript only opts into motion. */

:root {
  --story-paper: #fbf8f1;
  --story-paper-deep: #e8dfcf;
  --story-ink: #2c1810;
  --story-rule: color-mix(in srgb, var(--border) 82%, transparent);
  --story-gold: #a97b35;
  --story-gold-soft: #dcc69d;
  --story-dark: #21312d;
  --story-dark-raised: #2b403a;
  --story-shadow: 0 22px 65px rgba(44, 24, 16, 0.12);
  --story-shadow-soft: 0 12px 34px rgba(44, 24, 16, 0.09);
}

.story-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(169, 123, 53, 0.08), transparent 24rem),
    radial-gradient(circle at 88% 34%, rgba(97, 143, 130, 0.09), transparent 30rem),
    var(--bg);
}

.story-main,
.story-page {
  overflow: clip;
}

.story-main img,
.story-page img {
  max-inline-size: 100%;
}

.story-main h1,
.story-main h2,
.story-main h3 {
  overflow-wrap: anywhere;
}

.story-shell {
  inline-size: min(100% - 3rem, 1120px);
  margin-inline: auto;
}

.story-reading-width {
  max-inline-size: 720px;
}

.story-kicker,
.story-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--verdigris-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.story-label {
  display: inline-flex;
  align-items: center;
  min-block-size: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--verdigris) 36%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--verdigris) 9%, var(--story-paper));
  color: var(--verdigris-dark);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
}

.story-main p,
.story-main li,
.story-main figcaption,
.story-page p,
.story-page li,
.story-page figcaption {
  overflow-wrap: anywhere;
}

.story-main a:not(.story-button):not(.story-artifact-link) {
  color: var(--verdigris-dark);
  text-decoration-color: color-mix(in srgb, var(--verdigris) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.story-main a:not(.story-button):not(.story-artifact-link):hover {
  text-decoration-color: currentColor;
}

/* ─── Hero ─── */

.story-hero {
  position: relative;
  min-block-size: min(880px, 92svh);
  padding-block: 10rem 6rem;
  border-block-end: 1px solid var(--story-rule);
}

.story-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--bg) 95%, transparent) 0 48%, transparent 72%),
    linear-gradient(180deg, transparent 78%, var(--bg));
  content: '';
  pointer-events: none;
}

.story-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.story-hero-copy {
  position: relative;
  z-index: 1;
  min-inline-size: 0;
}

.story-hero h1 {
  max-inline-size: 13ch;
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.9rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.story-hero-lede {
  max-inline-size: 42rem;
  margin-block-start: 1.75rem;
  color: var(--text-body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.75;
}

.story-hero-deck {
  max-inline-size: 42rem;
  margin-block-start: 1.75rem;
  color: var(--text-body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.75;
}

.story-hero-forward {
  max-inline-size: 36rem;
  margin-block-start: 1.25rem;
  padding-inline-start: 1rem;
  border-inline-start: 2px solid var(--story-gold);
  color: var(--verdigris-dark);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.6;
}

.story-hero-figure,
.story-hero-artifact {
  position: relative;
  min-inline-size: 0;
  margin: 0;
  padding: clamp(0.55rem, 1.3vw, 0.9rem);
  border: 1px solid color-mix(in srgb, var(--story-gold) 38%, var(--border));
  border-radius: 4px;
  background: var(--story-paper);
  box-shadow: var(--story-shadow);
  transform: rotate(0.65deg);
}

.story-hero-figure::before,
.story-hero-artifact::before {
  position: absolute;
  inset: 0.42rem;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--verdigris) 24%, transparent);
  content: '';
  transform: translate(0.65rem, 0.65rem);
}

.story-hero-figure img,
.story-hero-artifact img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border: 1px solid var(--story-rule);
}

.story-hero-figure figcaption,
.story-hero-artifact figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.25rem 0.1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ─── Journal chapters ─── */

.story-chapter {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8.5rem);
}

.story-chapter + .story-chapter {
  border-block-start: 1px solid var(--story-rule);
}

.story-chapter-header {
  display: grid;
  grid-template-columns: minmax(4.5rem, 0.22fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  margin-block-end: clamp(2.5rem, 6vw, 4.5rem);
}

.story-chapter-index {
  color: var(--story-gold);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-variant-numeric: oldstyle-nums;
  line-height: 1;
}

.story-chapter-heading {
  min-inline-size: 0;
  max-inline-size: 800px;
}

.story-chapter h2 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.story-chapter-intro {
  max-inline-size: 680px;
  margin-block-start: 1.25rem;
  color: var(--text-body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
}

.story-narrow {
  max-inline-size: 760px;
  margin-inline: auto;
}

.story-section-heading {
  max-inline-size: 780px;
  margin-block-end: clamp(2.5rem, 6vw, 4.5rem);
}

.story-section-heading h2 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}

.story-section-heading > p:last-child {
  max-inline-size: 680px;
  margin-block-start: 1.25rem;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
}

.story-promise .story-narrow > p:not(.story-eyebrow) {
  max-inline-size: 680px;
  margin-block-start: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.story-promise blockquote {
  position: relative;
  margin: clamp(2.5rem, 7vw, 4.5rem) 0 0;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-inline-start: 3px solid var(--story-gold);
  background: color-mix(in srgb, var(--story-paper) 82%, transparent);
  box-shadow: var(--story-shadow-soft);
}

.story-promise blockquote p {
  margin: 0;
  color: var(--story-ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: balance;
}

.story-promise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.75fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 6rem);
}

.story-prose {
  max-inline-size: 680px;
  font-size: 1.05rem;
  line-height: 1.85;
}

.story-prose > * + * {
  margin-block-start: 1.1rem;
}

.story-pullquote {
  position: relative;
  margin: 0;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-inline-start: 3px solid var(--story-gold);
  background: color-mix(in srgb, var(--story-paper) 82%, transparent);
  box-shadow: var(--story-shadow-soft);
  color: var(--story-ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: balance;
}

/* ─── Team ─── */

.story-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.6vw, 1.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-team-grid > li {
  min-inline-size: 0;
}

.story-person {
  block-size: 100%;
  overflow: hidden;
  border: 1px solid var(--story-rule);
  border-radius: 3px;
  background: color-mix(in srgb, var(--story-paper) 92%, var(--bg));
  box-shadow: var(--story-shadow-soft);
}

.story-person-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-block-end: 1px solid var(--story-rule);
  background: var(--story-paper-deep);
}

.story-person-portrait img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.story-person-placeholder {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 5;
  min-block-size: 100%;
  place-items: center;
  overflow: hidden;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(97, 143, 130, 0.15), transparent 26%),
    linear-gradient(145deg, var(--story-paper), var(--story-paper-deep));
  color: var(--verdigris-dark);
  text-align: center;
}

.story-person-placeholder::before,
.story-person-placeholder::after {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--verdigris) 38%, transparent);
  content: '';
  pointer-events: none;
}

.story-person-placeholder::before {
  inset: 0.75rem;
}

.story-person-placeholder::after {
  inline-size: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 1rem color-mix(in srgb, var(--story-paper) 58%, transparent);
}

.story-person-placeholder-motif {
  position: absolute;
  inset-block-start: 24%;
  inline-size: 3.4rem;
  block-size: 2.7rem;
  border: 2px solid color-mix(in srgb, var(--verdigris-dark) 66%, transparent);
  border-radius: 0.5rem;
}

.story-person-placeholder-motif::before {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 1.15rem;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: '';
  transform: translate(-50%, -50%);
}

.story-person-placeholder-motif::after {
  position: absolute;
  inset-block-start: -0.55rem;
  inset-inline-start: 0.5rem;
  inline-size: 1.2rem;
  block-size: 0.55rem;
  border: 2px solid currentColor;
  border-block-end: 0;
  border-radius: 0.25rem 0.25rem 0 0;
  content: '';
}

.story-person-placeholder > span:last-child {
  position: relative;
  z-index: 1;
  align-self: end;
  max-inline-size: 12rem;
  padding-block-end: 12%;
  font-size: clamp(0.82rem, 1.5vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.story-person-copy {
  padding: clamp(1.1rem, 2.6vw, 1.6rem);
}

.story-person h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  line-height: 1.15;
}

.story-person-role {
  margin-block-start: 0.4rem;
  color: var(--verdigris-dark);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.45;
  text-transform: uppercase;
}

.story-person-contribution,
.story-person-copy > p:last-child {
  margin-block-start: 0.9rem;
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ─── Artifact journal ─── */

.story-artifact-list {
  display: grid;
  gap: clamp(3.5rem, 9vw, 7rem);
}

.story-artifact {
  min-inline-size: 0;
}

.story-artifact figure {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 0.65fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: 0;
}

.story-artifact:nth-child(even) figure {
  grid-template-columns: minmax(17rem, 0.65fr) minmax(0, 1.5fr);
}

.story-artifact:nth-child(even) .story-artifact-link {
  grid-column: 2;
  grid-row: 1;
}

.story-artifact:nth-child(even) figcaption {
  grid-column: 1;
  grid-row: 1;
}

.story-artifact-link {
  position: relative;
  display: block;
  min-inline-size: 0;
  padding: clamp(0.45rem, 1vw, 0.75rem);
  border: 1px solid color-mix(in srgb, var(--story-gold) 35%, var(--border));
  border-radius: 3px;
  background: var(--story-paper);
  box-shadow: var(--story-shadow);
  color: var(--story-ink);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.story-artifact-link::before {
  position: absolute;
  inset: -0.4rem;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--verdigris) 22%, transparent);
  content: '';
  transform: rotate(-0.35deg);
}

.story-artifact-link:hover {
  border-color: var(--verdigris);
  box-shadow: 0 26px 74px rgba(44, 24, 16, 0.16);
  transform: translateY(-2px);
}

.story-artifact-link:focus-visible {
  outline: 3px solid var(--verdigris);
  outline-offset: 4px;
}

.story-artifact-link img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border: 1px solid var(--story-rule);
  background: var(--story-paper-deep);
}

.story-artifact-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-block-size: 44px;
  padding: 0.55rem 0.25rem 0.1rem;
  color: var(--verdigris-dark);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.story-artifact-action::after {
  content: '\2197';
  font-size: 1.05rem;
}

.story-artifact figcaption {
  min-inline-size: 0;
}

.story-artifact figcaption h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.story-artifact-summary,
.story-artifact figcaption > p:first-of-type {
  margin-block-start: 1rem;
  color: var(--text-body);
  line-height: 1.75;
}

.story-artifact-credit {
  margin-block-start: 1.25rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--story-rule);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.55;
}

/* ─── Concept-to-product bridge ─── */

.story-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-principle,
.story-principles > article {
  min-inline-size: 0;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-block-start: 3px solid var(--verdigris);
  background: color-mix(in srgb, var(--story-paper) 86%, transparent);
  box-shadow: var(--story-shadow-soft);
}

.story-principle h3,
.story-principles > article h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.story-principle p,
.story-principles > article p {
  margin-block-start: 0.75rem;
  font-size: 0.93rem;
  line-height: 1.7;
}

/* ─── Ledger concept chapter ─── */

.story-ledger {
  overflow: hidden;
  border-block: 1px solid color-mix(in srgb, var(--verdigris) 34%, transparent);
  background:
    radial-gradient(circle at 78% 40%, rgba(97, 143, 130, 0.22), transparent 30rem),
    linear-gradient(145deg, var(--story-dark), #182521);
  color: #f3eee4;
}

.story-ledger .story-kicker,
.story-ledger .story-eyebrow,
.story-ledger .story-label {
  color: #c5ded7;
}

.story-ledger .story-label {
  border-color: rgba(197, 222, 215, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.story-ledger h2,
.story-ledger h3 {
  color: #fffaf0;
}

.story-ledger-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}

.story-ledger-copy p {
  max-inline-size: 36rem;
  margin-block-start: 1.25rem;
  color: #d9e2dd;
  font-size: 1.05rem;
  line-height: 1.75;
}

.story-ledger-copy,
.story-closing-inner {
  min-inline-size: 0;
}

.story-ledger-figure,
.story-ledger-art {
  margin: 0;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(220, 198, 157, 0.48);
  border-radius: 3px;
  background: var(--story-paper);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.story-ledger-figure img,
.story-ledger-art img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: 680px;
  object-fit: contain;
}

.story-ledger-figure figcaption,
.story-ledger-art figcaption {
  padding-block-start: 0.9rem;
  border-block-start: 1px solid var(--story-rule);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ─── Closing action ─── */

.story-closing {
  padding-block: clamp(5.5rem, 12vw, 10rem);
  text-align: center;
}

.story-closing-inner {
  max-inline-size: 800px;
  margin-inline: auto;
}

.story-closing h2 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.3rem);
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}

.story-closing p {
  max-inline-size: 580px;
  margin: 1.35rem auto 0;
  font-size: 1.05rem;
  line-height: 1.75;
}

.story-button,
.story-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 48px;
  margin-block-start: 2rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--verdigris-dark);
  border-radius: 999px;
  background: var(--verdigris-dark);
  box-shadow: 0 12px 28px rgba(77, 114, 104, 0.22);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.story-button:hover,
.story-primary-action:hover {
  background: var(--story-dark-raised);
  box-shadow: 0 16px 34px rgba(77, 114, 104, 0.28);
  transform: translateY(-2px);
}

/* ─── Homepage story preview ─── */

.story-preview {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
  overflow: hidden;
  border-block: 1px solid var(--story-rule);
  background:
    radial-gradient(circle at 12% 20%, rgba(169, 123, 53, 0.1), transparent 24rem),
    radial-gradient(circle at 88% 72%, rgba(97, 143, 130, 0.12), transparent 26rem),
    color-mix(in srgb, var(--story-paper) 78%, var(--bg));
}

.story-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}

.story-preview-copy {
  min-inline-size: 0;
  max-inline-size: 34rem;
  overflow-wrap: anywhere;
}

.story-preview-copy h2 {
  max-inline-size: 12ch;
  margin: 0;
  color: var(--text-heading);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.03;
  text-wrap: balance;
}

.story-preview-copy > p:not(.section-label) {
  margin-block-start: 1.4rem;
  color: var(--text-body);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.75;
}

.story-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-inline-size: 100%;
  min-block-size: 44px;
  margin-block-start: 1.7rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--verdigris-dark);
  border-radius: 999px;
  background: var(--verdigris-dark);
  box-shadow: 0 10px 24px rgba(77, 114, 104, 0.2);
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.story-preview-link:hover {
  background: var(--story-dark-raised);
  box-shadow: 0 14px 30px rgba(77, 114, 104, 0.27);
  transform: translateY(-2px);
}

.story-preview-link:focus-visible {
  outline: 3px solid var(--verdigris-dark);
  outline-offset: 3px;
}

.story-preview-team {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.7vw, 1.15rem);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-preview-team li,
.story-preview-team figure {
  min-inline-size: 0;
  margin: 0;
}

.story-preview-team figure {
  overflow: hidden;
  border: 1px solid var(--story-rule);
  border-radius: 3px;
  background: var(--story-paper);
  box-shadow: var(--story-shadow-soft);
}

.story-preview-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-block-end: 1px solid var(--story-rule);
  background: var(--story-paper-deep);
}

.story-preview-portrait img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.story-preview-placeholder {
  display: grid;
  place-items: center;
  padding: 0.75rem;
  background:
    radial-gradient(circle at 50% 40%, rgba(97, 143, 130, 0.16), transparent 30%),
    linear-gradient(145deg, var(--story-paper), var(--story-paper-deep));
  color: var(--verdigris-dark);
  text-align: center;
}

.story-preview-placeholder::before {
  position: absolute;
  inset: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--verdigris) 36%, transparent);
  content: '';
}

.story-preview-placeholder-motif {
  position: absolute;
  inset-block-start: 27%;
  inline-size: clamp(2.2rem, 4vw, 3.2rem);
  block-size: clamp(1.75rem, 3.2vw, 2.5rem);
  border: 2px solid currentColor;
  border-radius: 0.45rem;
}

.story-preview-placeholder-motif::before {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 36%;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: '';
  transform: translate(-50%, -50%);
}

.story-preview-placeholder-motif::after {
  position: absolute;
  inset-block-start: -0.45rem;
  inset-inline-start: 0.4rem;
  inline-size: 34%;
  block-size: 0.45rem;
  border: 2px solid currentColor;
  border-block-end: 0;
  border-radius: 0.2rem 0.2rem 0 0;
  content: '';
}

.story-preview-placeholder > span:last-child {
  position: relative;
  align-self: end;
  max-inline-size: 9rem;
  padding-block-end: 12%;
  font-size: clamp(0.58rem, 1vw, 0.72rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.story-preview-team figcaption {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
}

.story-preview-team figcaption strong {
  color: var(--text-heading);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.2;
}

.story-preview-team figcaption span {
  color: var(--verdigris-dark);
  font-size: clamp(0.6rem, 0.9vw, 0.7rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-transform: uppercase;
}

/* ─── Native artifact dialog ─── */

.story-dialog {
  inline-size: min(72rem, calc(100% - 2rem));
  max-inline-size: none;
  max-block-size: calc(100vh - 2rem);
  max-block-size: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--story-ink);
}

.story-dialog:not([open]) {
  display: none;
}

.story-dialog::backdrop {
  background: rgba(18, 21, 19, 0.84);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.story-dialog-panel {
  max-block-size: calc(100vh - 2rem);
  max-block-size: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(220, 198, 157, 0.72);
  border-radius: 4px;
  background: var(--story-paper);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.4);
}

.story-dialog-actions {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  min-block-size: 3.5rem;
  margin: 0;
  padding: 0.45rem;
  background: linear-gradient(180deg, var(--story-paper) 64%, transparent);
  pointer-events: none;
}

.story-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 44px;
  min-block-size: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--story-paper);
  box-shadow: 0 5px 18px rgba(44, 24, 16, 0.12);
  color: var(--story-ink);
  font: 600 0.82rem/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  pointer-events: auto;
}

.story-dialog-close:hover {
  border-color: var(--verdigris);
  color: var(--verdigris-dark);
}

.story-dialog-close:focus-visible {
  outline: 3px solid var(--verdigris);
  outline-offset: 2px;
}

.story-dialog figure {
  margin: -3.5rem 0 0;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.story-dialog [data-story-dialog-image] {
  display: block;
  inline-size: 100%;
  block-size: auto;
  max-block-size: min(72vh, 920px);
  max-block-size: min(72dvh, 920px);
  margin-inline: auto;
  border: 1px solid var(--story-rule);
  background: var(--story-paper-deep);
  object-fit: contain;
}

.story-dialog figcaption {
  padding: clamp(1.1rem, 3vw, 2rem) clamp(0.25rem, 2vw, 1.25rem) 0.5rem;
}

.story-dialog h2 {
  max-inline-size: 26ch;
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.story-dialog [data-story-dialog-summary] {
  max-inline-size: 70ch;
  margin-block-start: 0.8rem;
  line-height: 1.7;
}

.story-dialog [data-story-dialog-credit] {
  margin-block-start: 0.8rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.story-dialog [data-story-dialog-direct] {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  margin-block-start: 0.75rem;
  color: var(--verdigris-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-underline-offset: 0.2em;
}

.story-dialog [data-story-dialog-error] {
  margin-block-start: 0.75rem;
  color: var(--error);
  font-size: 0.9rem;
}

/* ─── Progressive motion ───
   Never hide content without the opt-in class added by pktd-story.js. */

.story-reveal,
[data-story-reveal] {
  opacity: 1;
  transform: none;
}

html.story-motion .story-reveal:not(.is-visible),
html.story-motion [data-story-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(12px);
}

html.story-motion .story-reveal,
html.story-motion [data-story-reveal] {
  transition:
    opacity 520ms ease var(--story-reveal-delay, 0ms),
    transform 520ms ease var(--story-reveal-delay, 0ms);
}

html.story-motion .story-reveal.is-visible,
html.story-motion [data-story-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive layout ─── */

@media (min-width: 60rem) {
  .story-team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 56rem) {
  .story-hero {
    min-block-size: auto;
    padding-block: 8rem 5rem;
  }

  .story-hero-grid,
  .story-promise-grid,
  .story-ledger-grid {
    grid-template-columns: 1fr;
  }

  .story-hero-copy {
    max-inline-size: 760px;
  }

  .story-hero h1 {
    max-inline-size: 15ch;
  }

  .story-hero-figure,
  .story-hero-artifact {
    inline-size: min(100%, 760px);
    justify-self: center;
    transform: none;
  }

  .story-artifact figure,
  .story-artifact:nth-child(even) figure {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .story-artifact:nth-child(even) .story-artifact-link,
  .story-artifact:nth-child(even) figcaption {
    grid-column: auto;
    grid-row: auto;
  }

  .story-artifact figcaption {
    max-inline-size: 700px;
  }

  .story-principles {
    grid-template-columns: 1fr;
  }

  .story-ledger-copy {
    max-inline-size: 720px;
  }

  .story-preview-grid {
    grid-template-columns: 1fr;
  }

  .story-preview-copy {
    max-inline-size: 44rem;
  }
}

@media (max-width: 40rem) {
  .story-shell {
    inline-size: min(100% - 1.5rem, 1120px);
  }

  .story-hero {
    padding-block: 7rem 4rem;
  }

  .story-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.8rem);
  }

  .story-hero-figure figcaption,
  .story-hero-artifact figcaption {
    display: block;
  }

  .story-hero-figure figcaption > * + *,
  .story-hero-artifact figcaption > * + * {
    margin-block-start: 0.35rem;
  }

  .story-chapter {
    padding-block: 4.5rem;
  }

  .story-chapter-header {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .story-chapter-index {
    font-size: 1.25rem;
  }

  .story-pullquote {
    font-size: clamp(1.55rem, 8vw, 2.35rem);
  }

  .story-artifact-list {
    gap: 4.5rem;
  }

  .story-artifact-link {
    padding: 0.4rem;
  }

  .story-artifact-action {
    padding-inline: 0.25rem;
  }

  .story-dialog {
    inline-size: calc(100% - 0.75rem);
    max-block-size: calc(100dvh - 0.75rem);
  }

  .story-dialog-panel {
    max-block-size: calc(100dvh - 0.75rem);
  }

  .story-dialog figure {
    padding: 0.45rem;
  }

  .story-dialog figcaption {
    padding: 1.15rem 0.65rem 0.8rem;
  }

  .story-preview-team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 21rem) {
  .story-team-grid,
  .story-preview-team {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-hero-figure,
  .story-hero-artifact,
  .story-artifact-link,
  .story-button,
  .story-primary-action,
  .story-preview-link {
    transform: none !important;
  }

  html.story-motion .story-reveal,
  html.story-motion [data-story-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .story-dialog::backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  .story-person,
  .story-artifact-link,
  .story-ledger-figure,
  .story-dialog-panel,
  .story-principle {
    border: 1px solid CanvasText;
  }

  .story-artifact-link:focus-visible,
  .story-dialog-close:focus-visible {
    outline-color: Highlight;
  }
}

@media print {
  .story-main {
    overflow: visible;
  }

  .story-hero,
  .story-chapter,
  .story-closing {
    padding-block: 2rem;
  }

  .story-reveal,
  [data-story-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .story-dialog {
    display: none !important;
  }
}
