:root {
  --navy: #17233b;
  --page: #f7f8fa;
  --coral: #f06449;
  --coral-deep: #d94f35;
  --margin-blue: #7fa4d8;
  --graphite: #566173;
  --ink: #202c47;
  --leaf-line: rgba(23, 35, 59, 0.14);
  --display: "Literata", Georgia, serif;
  --text: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--navy);
  color: var(--page);
  padding: 28px min(6vw, 72px) 96px;
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.wordmark svg {
  width: 40px;
  height: 40px;
  flex: none;
}

.nav-invite {
  color: var(--page);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--coral);
  padding-bottom: 2px;
}

.nav-invite:hover {
  color: var(--coral);
}

.hero-copy {
  max-width: 780px;
  margin: 0 auto;
  padding-top: clamp(56px, 10vw, 120px);
}

.hero-copy h1 {
  margin: 0 0 28px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.75rem, 7.5vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.hero-copy p {
  max-width: 56ch;
  margin: 0 0 40px;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  line-height: 1.65;
  color: rgba(247, 248, 250, 0.87);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cta {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 26px;
  border-radius: 4px;
  transition: background 160ms ease, transform 160ms ease;
}

.cta:hover {
  background: var(--coral-deep);
  transform: translateY(-1px);
}

.hero-note {
  color: var(--margin-blue);
  font-size: 0.95rem;
  font-weight: 700;
}

/* ---------- Manuscript leaves + narrative thread ---------- */

.manuscript {
  position: relative;
  max-width: 1020px;
  margin: 0 auto;
  padding: 88px min(5vw, 48px) 112px;
}

.thread {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  background: var(--coral);
  transform-origin: top;
  animation: draw-thread 1.4s ease-out both;
}

@keyframes draw-thread {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thread {
    animation: none;
  }
}

.leaf {
  position: relative;
  max-width: 820px;
  margin: 0 auto 72px;
  padding: 44px clamp(24px, 5vw, 56px) 40px;
  background: #fff;
  border: 1px solid var(--leaf-line);
  border-radius: 3px 8px 8px 3px;
  box-shadow: 0 14px 32px rgba(23, 35, 59, 0.08);
}

.leaf:last-child {
  margin-bottom: 0;
}

/* The blue page tab from the mark, alternating edges like turned leaves. */
.leaf-tab {
  position: absolute;
  top: -1px;
  left: 40px;
  width: 58px;
  height: 9px;
  background: var(--margin-blue);
  border-radius: 0 0 3px 3px;
}

.leaf:nth-child(odd) .leaf-tab {
  left: auto;
  right: 40px;
}

@media (min-width: 900px) {
  .leaf:nth-child(even) {
    transform: translateX(-44px);
  }

  .leaf:nth-child(odd) {
    transform: translateX(44px);
  }
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--coral);
}

.leaf h2 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  line-height: 1.15;
  color: var(--navy);
}

.leaf > p:not(.eyebrow) {
  max-width: 62ch;
  margin: 0 0 28px;
}

.leaf code {
  font-size: 0.95em;
  background: rgba(127, 164, 216, 0.16);
  padding: 1px 5px;
  border-radius: 3px;
}

.leaf figure {
  margin: 0;
}

.leaf figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--leaf-line);
  border-radius: 6px;
}

/* ---------- Closing ---------- */

.close {
  background: var(--navy);
  color: var(--page);
  padding: 88px min(6vw, 72px) 48px;
}

.close-copy {
  max-width: 780px;
  margin: 0 auto 72px;
  text-align: center;
}

.close-copy h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.close-copy p {
  margin: 0 0 32px;
  color: rgba(247, 248, 250, 0.85);
}

.close-meta {
  max-width: 780px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(247, 248, 250, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
}

.close-meta a {
  color: var(--page);
}

.close-meta a:hover {
  color: var(--coral);
}

.close-meta p {
  margin: 0;
}

.fine {
  color: var(--graphite);
}

@media (max-width: 620px) {
  .close-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
