:root {
  color-scheme: light;
  --ink: #432b16;
  --ink-deep: #38220e;
  --ink-soft: #64503a;
  --rust: #8e3b21;
  --gold: #a3742c;
  --gold-deep: #7c561a;
  --gold-soft: #c3a05e;
  --paper: #f2e9d5;
  --paper-panel: #f7efdd;
  --paper-light: #faf5e8;
  --line: #b39a6b;
  --display: "Cinzel", "Trajan Pro", Baskerville, Georgia, serif;
  --body: "EB Garamond", Baskerville, "Iowan Old Style", "Palatino Linotype",
    Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--body);
  background:
    url("/assets/paper-grain.webp"),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(110, 78, 38, 0.08)),
    radial-gradient(circle at 16% 6%, rgba(255, 252, 240, 0.55), transparent 30rem),
    radial-gradient(circle at 88% 30%, rgba(160, 120, 50, 0.08), transparent 34rem),
    radial-gradient(circle at 30% 88%, rgba(160, 120, 50, 0.07), transparent 30rem),
    var(--paper);
  background-attachment: scroll, fixed, scroll, scroll, scroll, scroll;
  background-blend-mode: multiply, normal, normal, normal, normal, normal;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  color: var(--paper-light);
  background: var(--ink);
  border-radius: 0.2rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(100% - clamp(1.5rem, 5vw, 4rem), 74rem);
  margin: 0 auto;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(1.6rem, 3vw, 2.8rem) 0 1.2rem;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.wordmark-name {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-deep);
}

.wordmark-est {
  margin-top: 0.55rem;
  font-size: clamp(0.55rem, 0.9vw, 0.72rem);
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.flourish {
  display: flex;
  align-items: center;
  width: 100%;
  color: var(--gold);
}

.flourish::before,
.flourish::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
}

.flourish svg {
  flex: none;
  width: 5.25rem;
  height: 1rem;
}

.title-lockup {
  width: fit-content;
  max-width: 100%;
}

.wordmark .flourish {
  align-self: stretch;
  margin-top: 0.5rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.1rem, 3vw, 2.9rem);
  justify-content: flex-end;
  padding-top: 0.85rem;
}

nav a {
  position: relative;
  padding: 0.35rem 0;
  font-size: clamp(0.78rem, 1.15vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 160ms ease;
}

nav a:hover::after,
nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

nav a[aria-current="page"] {
  color: var(--gold-deep);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(17rem, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 3rem) 0 clamp(3rem, 6vw, 5.5rem);
}

.hero-copy {
  max-width: 34rem;
  padding-top: clamp(0.5rem, 2vw, 2.5rem);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.2rem, 8.6vw, 7.6rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-deep);
}

.hero-copy .flourish {
  margin: 0.9rem 0 1.1rem;
}

.family-values {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.family-values i,
.contact-line i,
.footer-name i {
  padding: 0 0.4rem;
  color: var(--gold);
  font-style: normal;
}

.hero-statement {
  margin: clamp(1.6rem, 3vw, 2.5rem) 0 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.55;
  text-transform: uppercase;
  color: var(--rust);
}

.hero-introduction {
  max-width: 27rem;
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.archive-button {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-top: clamp(1.7rem, 3.5vw, 2.7rem);
  padding: 1rem 1.6rem;
  font-family: var(--display);
  font-size: clamp(0.82rem, 1.2vw, 0.98rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  color: #f6e8c6;
  background: linear-gradient(#63401f, #47290e);
  border: 1px solid var(--gold);
  border-radius: 0.4rem;
  box-shadow:
    0 0 0 3px var(--paper),
    0 0 0 4px var(--gold-soft),
    0 0.7rem 1.4rem rgba(77, 48, 12, 0.22);
  transition: box-shadow 160ms ease, transform 160ms ease, filter 160ms ease;
}

.archive-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px var(--paper),
    0 0 0 4px var(--gold-soft),
    0 0.95rem 1.7rem rgba(77, 48, 12, 0.3);
}

.lock {
  position: relative;
  flex: none;
  width: 0.85rem;
  height: 0.7rem;
  background: currentColor;
  border-radius: 0.12rem;
}

.lock::before {
  position: absolute;
  top: -0.48rem;
  left: 0.17rem;
  width: 0.5rem;
  height: 0.52rem;
  content: "";
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 0.35rem 0.35rem 0 0;
}

.archive-note {
  margin: 1.15rem 0 0;
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- manuscript stack ---------- */

.paper-stack {
  position: relative;
  width: min(100%, 42rem);
  aspect-ratio: 100 / 128;
  justify-self: end;
}

.sheet {
  display: block;
  height: auto;
  filter: drop-shadow(0.35rem 0.9rem 1.1rem rgba(72, 45, 15, 0.35));
}

.paper-cluster {
  position: absolute;
  top: 0;
  left: 2%;
  width: 92%;
  aspect-ratio: 530 / 315;
  transform: rotate(-1.6deg);
}

.sheet-generation {
  position: absolute;
  top: 0;
  left: 0;
  width: 70.19%;
}

.sheet-flowchart {
  position: absolute;
  top: 16.83%;
  left: 52.26%;
  width: 47.74%;
}

.sheet-khandan {
  position: absolute;
  top: 38.3%;
  left: 1.5%;
  width: 97%;
  transform: rotate(1.3deg);
}

/* ---------- framed sections ---------- */

.framed {
  position: relative;
  padding: clamp(1.6rem, 3.5vw, 3rem);
  background: var(--paper-panel);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: 0 0.5rem 1.6rem rgba(97, 66, 25, 0.07);
}

.framed::before {
  position: absolute;
  inset: 0.3rem;
  content: "";
  border: 1px solid rgba(179, 154, 107, 0.45);
  border-radius: 0.65rem;
  pointer-events: none;
}

.section-kicker {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-size: clamp(0.85rem, 1.3vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ---------- founder ---------- */

.founder {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 1.05fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.portraits {
  display: grid;
  grid-template-columns: 0.88fr 1fr;
  gap: 1rem;
  align-items: stretch;
  aspect-ratio: 1.45;
}

.portrait {
  margin: 0;
  padding: 0.55rem;
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  box-shadow: 0 0.6rem 1.4rem rgba(84, 56, 20, 0.14);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(122, 92, 44, 0.4);
  border-radius: 0.2rem;
}

.founder-lead {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  color: var(--ink);
}

.founder h2 {
  margin: 0.4rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.08;
  text-transform: uppercase;
  color: #5a2d14;
}

.founder-copy .flourish {
  margin: 1.1rem 0 1.2rem;
}

.founder-story {
  max-width: 30rem;
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.life-dates {
  margin: 1.2rem 0 0;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  color: var(--gold-deep);
}

/* ---------- timeline ---------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 2rem);
  margin-top: clamp(1.4rem, 3vw, 2.2rem);
  padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.2rem, 2.5vw, 2rem);
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
}

/* headings and first text lines stay level across items; only icons center */
.timeline article > div {
  align-self: start;
}

.timeline article:not(:last-child)::after {
  position: absolute;
  top: calc(50% - 1px);
  right: calc(-1 * clamp(0.75rem, 2vw, 2rem) + 0.2rem);
  width: clamp(0.5rem, 1.5vw, 1.6rem);
  content: "";
  border-top: 2px dotted var(--gold-soft);
}

.timeline-icon {
  display: grid;
  place-content: center;
  width: 3.7rem;
  height: 3.7rem;
  color: #54401f;
  background: var(--paper-light);
  border: 1.5px solid #6d5426;
  border-radius: 50%;
}

.timeline-icon svg {
  width: 1.95rem;
  height: 1.95rem;
}

.timeline h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-deep);
}

.timeline p {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ---------- welcome ---------- */

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.72fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: center;
  padding: clamp(1rem, 1.9vw, 1.75rem) 0;
}

.welcome h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--ink-deep);
}

.welcome-lead {
  margin: 0.8rem 0 0;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  color: var(--ink);
}

.short-rule {
  width: min(11rem, 55%);
  height: 1px;
  margin: 1.2rem 0;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.welcome-body {
  max-width: 24rem;
  margin: 0;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.welcome-tree {
  width: 100%;
  height: auto;
}

blockquote {
  position: relative;
  width: fit-content;
  margin: 0;
  padding: 1.9rem 0 1.5rem;
  justify-self: center;
}

.quote-mark {
  position: absolute;
  font-family: var(--body);
  font-size: 4.2rem;
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
}

.quote-open {
  top: -0.5rem;
  left: -1.4rem;
}

.quote-close {
  right: -1.8rem;
  bottom: -0.9rem;
}

blockquote p {
  margin: 0;
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
  font-style: italic;
  line-height: 1.5;
  text-align: center;
  color: var(--rust);
}

/* ---------- contact ---------- */

.contact {
  padding: clamp(1.3rem, 2.5vw, 1.7rem) 0;
  text-align: center;
  border-top: 1px solid rgba(179, 154, 107, 0.5);
}

.contact .section-kicker {
  margin-bottom: 0.4rem;
}

.contact-line {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-soft);
}

.contact-line a {
  color: var(--gold-deep);
  overflow-wrap: anywhere;
  text-decoration-color: rgba(124, 86, 26, 0.4);
  text-underline-offset: 0.22em;
}

.contact-line a:hover {
  text-decoration-color: currentColor;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto minmax(12rem, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.3rem, 2.5vw, 1.9rem) 0;
}

.footer-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-name strong {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-deep);
}

.footer-name span {
  margin-top: 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.footer-name small {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer-medallion {
  display: grid;
  place-content: center;
  width: 6rem;
  height: 6rem;
  background: var(--paper-light);
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow:
    0 0 0 0.28rem var(--paper),
    0 0 0 0.34rem rgba(163, 116, 44, 0.55);
}

.footer-medallion img {
  width: 4.4rem;
  height: 4.4rem;
}

.footer-motto {
  text-align: center;
}

.footer-motto p {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--gold-deep);
}

.footer-span {
  margin-top: 0.6rem !important;
  font-size: clamp(1rem, 1.6vw, 1.25rem) !important;
  color: var(--ink) !important;
}

.footer-span .arrow {
  padding: 0 0.5rem;
  color: var(--gold);
}

.footer-span .infinity {
  font-size: 1.25em;
  line-height: 1;
}

.footer-legal {
  padding: 0.9rem 0 1.1rem;
  text-align: center;
  border-top: 1px solid rgba(179, 154, 107, 0.5);
}

.footer-legal small {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

:focus-visible {
  border-radius: 0.15rem;
  outline: 3px solid var(--gold-soft);
  outline-offset: 4px;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .founder {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .portraits {
    width: min(100%, 27rem);
  }

  .founder-copy .title-lockup {
    margin-inline: auto;
  }

  .founder-story {
    margin-inline: auto;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2rem;
  }

  .timeline article:nth-child(2)::after {
    content: none;
  }

  .welcome {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .welcome h2 {
    white-space: normal;
  }

  .welcome .short-rule {
    margin-inline: auto;
  }

  .welcome-tree {
    max-width: 20rem;
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
  }

  nav {
    justify-content: center;
    padding: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    max-width: none;
  }

  .paper-stack {
    justify-self: center;
    width: min(100%, 21rem);
  }

  .archive-button {
    width: 100%;
  }

  .timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline article::after {
    content: none !important;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
