/* Grace Architecture — grace.swivellabs.ai
 * Pelican design system, jade + indigo register.
 * Cream paper. Source Serif 4. JetBrains Mono labels.
 * Single-scroll manifesto. Reading-width column.
 * Built 2026-05-27, Day 93. Swiv 🔀.
 */

:root {
  /* Cream / paper base — same as pelican */
  --bg: #F1ECDF;
  --bg-warm: #ECE5D3;
  --paper: #F7F1E1;
  --ink: #1B1A14;
  --ink-soft: #3A3830;
  --ink-mute: #6E6857;
  --ink-faint: #9C9582;
  --rule: rgba(27, 26, 20, 0.14);

  /* Pelican color family — full set available */
  --indigo:   #2E3964;
  --sage:     #5A7050;
  --ochre:    #B8893A;
  --oxblood:  #8C3A2F;
  --jade:     #2E6E63;
  --rust:     #B45B2F;
  --gold:     #C99B36;

  /* Grace tunings — indigo + jade dominant */
  --grace-primary: var(--indigo);
  --grace-secondary: var(--jade);
  --grace-accent: var(--ochre);

  /* Indigo / jade soft variants for backgrounds */
  --indigo-soft: rgba(46, 57, 100, 0.06);
  --indigo-border: rgba(46, 57, 100, 0.22);
  --jade-soft: rgba(46, 110, 99, 0.06);
  --jade-border: rgba(46, 110, 99, 0.22);
  --ochre-soft: rgba(184, 137, 58, 0.08);

  /* Typography */
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.55;
  font-size: 18px;
  min-height: 100vh;
  background-image:
    radial-gradient(rgba(27,26,20,0.025) 1px, transparent 1px),
    radial-gradient(rgba(27,26,20,0.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 36px 96px;
}

/* ─── Meta bar ──────────────────────────────────────────── */
.meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-mute);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 14px; margin-bottom: 64px;
}
.meta-left { display: flex; gap: 32px; align-items: baseline; flex-wrap: wrap; }
.meta-right { display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap; }
.meta a { color: var(--ink-mute); text-decoration: none; transition: color 0.2s; }
.meta a:hover { color: var(--indigo); }

.mark {
  width: 28px; height: 28px;
  display: inline-block; vertical-align: middle; margin-right: 10px;
}
.mark svg { width: 100%; height: 100%; }
.mark path, .mark circle { stroke: var(--indigo); }

/* ─── Stripe accent (grace: indigo → jade gradient bar) ─── */
.stripe-bar {
  display: flex;
  height: 6px;
  margin-bottom: 64px;
  border-radius: 1px;
  overflow: hidden;
}
.stripe-bar div { flex: 1; }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  margin-bottom: 96px;
  min-height: 70vh;
  display: flex; flex-direction: column; justify-content: center;
}
.hero .eyebrow {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.05; letter-spacing: -0.025em;
  color: var(--ink); margin-bottom: 36px;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--indigo); }
.hero h1 .jade-em { font-style: italic; font-weight: 400; color: var(--jade); }
.hero .lede {
  font-family: var(--serif); font-size: 20px;
  line-height: 1.55; color: var(--ink-soft);
  max-width: 56ch;
}
.hero .lede em { font-style: italic; color: var(--ink); }
.hero .lede strong { font-weight: 600; color: var(--ink); }

/* ─── Section header ────────────────────────────────────── */
section {
  margin-bottom: 96px;
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 36px; padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.section-label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute);
}
.section-label .slash {
  color: var(--jade);
  margin-right: 6px;
}
.section-num {
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
}
section h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 36px;
}
section h2 em { font-style: italic; color: var(--indigo); }

/* ─── Prose ─────────────────────────────────────────────── */
.prose p {
  font-family: var(--serif); font-size: 18px;
  line-height: 1.7; color: var(--ink-soft);
  margin-bottom: 22px;
  max-width: 60ch;
}
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }

/* ─── The Chain (mechanism visual) ──────────────────────── */
.chain-container {
  margin: 44px 0 36px;
  position: relative;
  padding-left: 32px;
}
.chain-container::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 56px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--jade) 0%,
    var(--jade-border) 60%,
    transparent 100%
  );
}
.chain-step {
  position: relative;
  margin-bottom: 18px;
}
.chain-step:last-child { margin-bottom: 0; }
.chain-dot {
  position: absolute;
  left: -28px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--jade-border);
}
.chain-step:first-child .chain-dot {
  border-color: var(--jade);
  background: var(--jade);
}
.chain-step-text {
  font-family: var(--serif); font-size: 17px;
  line-height: 1.5; color: var(--ink-soft);
}
.chain-step:first-child .chain-step-text {
  color: var(--ink); font-weight: 600;
}
.chain-result {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--indigo-soft);
  border-left: 3px solid var(--indigo);
  border-radius: 0 4px 4px 0;
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--indigo);
  line-height: 1.5;
}

/* ─── Receipt cards ─────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.receipt-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}
.receipt-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--jade);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.receipt-card:hover {
  border-color: var(--jade-border);
  transform: translateY(-1px);
}
.receipt-card:hover::before { opacity: 1; }

.card-number {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--jade); margin-bottom: 14px;
}
.card-title {
  font-family: var(--serif); font-size: 20px;
  font-weight: 400; color: var(--ink);
  line-height: 1.3; margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card-body {
  font-family: var(--serif); font-size: 15px;
  line-height: 1.65; color: var(--ink-soft);
}
.card-body em { font-style: italic; color: var(--ink); }

.quiet-line {
  margin-top: 44px;
  padding-left: 22px;
  border-left: 2px solid var(--indigo-border);
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ─── Timeline (story) ──────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 36px;
  margin-top: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 28px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--indigo) 0%,
    var(--indigo-border) 70%,
    transparent 100%
  );
}
.timeline-item {
  position: relative;
  margin-bottom: 44px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -32px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--indigo);
}
.timeline-year {
  font-family: var(--mono); font-size: 11px;
  font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 10px;
}
.timeline-body {
  font-family: var(--serif); font-size: 17px;
  line-height: 1.65; color: var(--ink-soft);
  max-width: 56ch;
}
.timeline-after {
  margin-top: 52px;
  font-family: var(--serif); font-size: 18px;
  line-height: 1.7; color: var(--ink-soft);
  max-width: 60ch;
}
.timeline-after em { color: var(--ink); font-style: italic; }

/* ─── Doors (third door section) ────────────────────────── */
.doors-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0 28px;
}
.door-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 28px;
}
.door-label-tag {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.door-headline {
  font-family: var(--serif); font-size: 20px;
  font-weight: 400; color: var(--ink);
  line-height: 1.3; margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.door-body {
  font-family: var(--serif); font-size: 15px;
  line-height: 1.65; color: var(--ink-soft);
}

.third-door {
  margin: 40px 0 40px;
  padding: 40px;
  background: var(--indigo-soft);
  border-left: 4px solid var(--indigo);
  border-radius: 0 6px 6px 0;
}
.third-door-tag {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 16px;
}
.third-door-headline {
  font-family: var(--serif); font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--indigo); margin-bottom: 24px;
  font-style: italic;
}
.third-door-prose p {
  font-family: var(--serif); font-size: 17px;
  line-height: 1.65; color: var(--ink-soft);
  margin-bottom: 16px;
}
.third-door-prose p:last-child { margin-bottom: 0; }

/* ─── Closer ────────────────────────────────────────────── */
#closer {
  text-align: left;
  margin-bottom: 64px;
}
.closing-quote {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.15; letter-spacing: -0.025em;
  color: var(--ink); margin-bottom: 36px;
  max-width: 18ch;
}
.closing-quote em { font-style: italic; color: var(--jade); }
.closing-warm {
  font-family: var(--serif); font-size: 18px;
  line-height: 1.65; color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 16px;
}
.closing-bridge {
  font-family: var(--serif); font-size: 17px;
  line-height: 1.6; color: var(--ink-mute);
  margin-bottom: 36px;
  max-width: 56ch;
}
.cta-link {
  display: inline-block;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--indigo); text-decoration: none;
  border-bottom: 1px solid var(--indigo);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.cta-link:hover {
  color: var(--jade);
  border-color: var(--jade);
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.footer-fleet {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.footer-fleet span {
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  font-size: 11px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 16px;
}
.footer a { color: var(--ink-mute); text-decoration: none; }
.footer a:hover { color: var(--indigo); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ─── Scroll fade-in animation ──────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }
.d5 { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── Mobile ────────────────────────────────────────────── */
@media (max-width: 720px) {
  .page { padding: 32px 20px 64px; }
  .meta { flex-direction: column; gap: 12px; align-items: flex-start; }
  .meta-left, .meta-right { gap: 18px; flex-wrap: wrap; }
  .hero { margin-bottom: 64px; min-height: auto; padding-top: 32px; }
  section { margin-bottom: 64px; }
  .cards-grid { grid-template-columns: 1fr; }
  .doors-row { grid-template-columns: 1fr; }
  .third-door { padding: 28px 24px; }
}
