@import url("https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;1,7..72,400&family=Unbounded:wght@500;600;700;800&display=swap");

:root {
  --paper: #ebe3d6;
  --paper-deep: #dfd4c4;
  --surface: #fffdf8;
  --surface-2: #f7f1e8;
  --ink: #1c1816;
  --muted: #5e574c;
  --accent: #c24a1f;
  --accent-strong: #943714;
  --specimen: #145c4f;
  --specimen-mid: #1a7565;
  --highlight: #e8dd6e;
  --highlight-edge: #d4c84a;
  --surface-glow: rgba(20, 92, 79, 0.09);
  --border: rgba(28, 24, 22, 0.14);
  --border-strong: rgba(194, 74, 31, 0.42);
  --shadow: 0 1px 0 rgba(28, 24, 22, 0.06), 0 18px 50px rgba(62, 48, 34, 0.12);
  --shadow-stamp: 4px 4px 0 rgba(28, 24, 22, 0.07);
  --heat: var(--accent);
  --heat-soft: rgba(194, 74, 31, 0.12);
  --bg-deep: var(--ink);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Literata", "Georgia", serif;
  --radius-lg: 6px;
  --radius-pill: 999px;
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  color-scheme: light;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 31px,
      rgba(28, 24, 22, 0.04) 31px,
      rgba(28, 24, 22, 0.04) 32px
    ),
    repeating-linear-gradient(
      72deg,
      transparent,
      transparent 31px,
      rgba(28, 24, 22, 0.035) 31px,
      rgba(28, 24, 22, 0.035) 32px
    ),
    radial-gradient(ellipse 90% 55% at 100% 0%, rgba(194, 74, 31, 0.09), transparent 58%),
    radial-gradient(ellipse 70% 45% at 0% 100%, rgba(20, 92, 79, 0.11), transparent 55%),
    linear-gradient(168deg, #f0e9de 0%, var(--paper) 42%, var(--paper-deep) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: var(--noise);
  background-repeat: repeat;
  background-size: 200px 200px;
}

#app,
#root {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fffdf8;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: var(--radius-pill);
  z-index: 100;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-stamp);
}

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

#app,
#root,
.app-shell {
  min-height: 100vh;
}

.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--shadow-stamp);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-left: 8px;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 2px 2px 0 rgba(28, 24, 22, 0.06);
}

.header-accent {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--specimen-mid) 100%);
  opacity: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.brand-text {
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-stamp);
  transform: rotate(-2deg);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover .brand-mark {
  transform: rotate(0deg) scale(1.02);
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 3vw, 1.12rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand span,
.meta-line {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.meta-line {
  color: var(--specimen);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 4px 4px 2px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 30%, transparent) transparent;
}

.top-nav::-webkit-scrollbar {
  height: 4px;
}

.top-nav::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 4px;
}

.top-nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.top-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0.85;
  border-radius: 1px;
}

.top-nav a:hover {
  color: var(--ink);
  border-color: var(--border);
  background: var(--surface-2);
}

.top-nav a:hover::after {
  transform: scaleX(1);
}

.top-nav a.is-active {
  color: var(--ink);
  background: linear-gradient(180deg, #f2e978 0%, var(--highlight) 100%);
  border: 1px solid color-mix(in srgb, var(--highlight-edge) 70%, var(--border));
  box-shadow: 2px 3px 0 rgba(28, 24, 22, 0.08);
}

.top-nav a.is-active::after {
  transform: scaleX(0);
}

.page {
  display: grid;
  gap: 28px;
  margin: 28px 0 40px;
}

@media (prefers-reduced-motion: no-preference) {
  .stagger > * {
    animation: rise-in 0.78s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .stagger > *:nth-child(1) {
    animation-delay: 0.04s;
  }
  .stagger > *:nth-child(2) {
    animation-delay: 0.1s;
  }
  .stagger > *:nth-child(3) {
    animation-delay: 0.16s;
  }
  .stagger > *:nth-child(4) {
    animation-delay: 0.22s;
  }
  .stagger > *:nth-child(5) {
    animation-delay: 0.28s;
  }
  .stagger > *:nth-child(6) {
    animation-delay: 0.34s;
  }
  .stagger > *:nth-child(7) {
    animation-delay: 0.4s;
  }
  .stagger > *:nth-child(8) {
    animation-delay: 0.46s;
  }
  .stagger > *:nth-child(9) {
    animation-delay: 0.52s;
  }
  .stagger > *:nth-child(10) {
    animation-delay: 0.58s;
  }
  .stagger > *:nth-child(11) {
    animation-delay: 0.64s;
  }
  .stagger > *:nth-child(12) {
    animation-delay: 0.7s;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.page-header {
  position: relative;
  padding: 32px 32px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), var(--shadow-stamp);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  right: -8%;
  top: -35%;
  width: 52%;
  height: 130%;
  background: radial-gradient(circle, var(--surface-glow), transparent 68%);
  pointer-events: none;
}

.page-header h1 {
  position: relative;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 20ch;
}

.page-header--hero h1 {
  max-width: 24ch;
}

.page-header-kicker {
  position: relative;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-header-intro,
.page-header p {
  position: relative;
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.06rem;
  white-space: pre-line;
}

.page-header--hero {
  padding: 38px 34px 42px;
  border-color: color-mix(in srgb, var(--border-strong) 35%, var(--border));
  transform: rotate(-0.4deg);
}

.page-header--hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 6%;
  right: 10%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--specimen-mid), transparent);
  opacity: 0.65;
}

.section-card h2,
.page-header h1 {
  font-family: var(--font-display);
}

.content-grid,
.button-row,
.tag-grid,
.stack,
.two-up,
.three-up {
  display: grid;
  gap: 20px;
}

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

.content-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.feature-grid--stem .stem-details {
  order: 2;
}

.feature-grid--stem .image-frame--photo {
  order: 1;
}

.stem-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
}

.stem-details--feature {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(247, 241, 232, 0.95)),
    var(--surface);
}

.stem-photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 110px;
  grid-auto-flow: dense;
  gap: 14px;
}

.stem-photo-card {
  grid-column: span 3;
  grid-row: span 2;
  margin: 0;
}

.stem-photo-card--poster {
  grid-column: span 2;
}

.stem-photo-card--feature {
  grid-column: span 4;
}

.image-frame--stem-gallery {
  height: 100%;
  min-height: 0;
}

.stem-photo-card--poster .image-frame--stem-gallery {
  height: 100%;
}

.stem-activity-section {
  overflow: hidden;
}

.stem-activity-section::before {
  content: "";
  position: absolute;
  inset: auto -8% -30% 45%;
  height: 220px;
  background: radial-gradient(circle, rgba(20, 92, 79, 0.12), transparent 68%);
  pointer-events: none;
}

.stem-activity-section > * {
  position: relative;
}

.stem-activity-card {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(240, 233, 222, 0.96)),
    var(--surface);
}

.stem-activity-card h2 {
  font-size: 1.02rem;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-card {
  position: relative;
  padding: 22px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 rgba(28, 24, 22, 0.05), 0 14px 36px rgba(62, 48, 34, 0.08);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.join-card {
  padding: 24px 24px 26px;
}

.section-card:hover {
  border-color: color-mix(in srgb, var(--specimen) 22%, var(--border));
  box-shadow: 0 1px 0 rgba(28, 24, 22, 0.05), 0 18px 44px rgba(62, 48, 34, 0.11);
}

.section-card h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 25%, var(--border));
}

.section-card p:first-of-type {
  margin-top: 0;
}

.section-card p:last-of-type {
  margin-bottom: 0;
}

.section-card p {
  white-space: pre-line;
}

.image-frame {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-stamp), 0 12px 32px rgba(62, 48, 34, 0.1);
  padding: 0;
  min-height: 0;
}

.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 2px rgba(255, 253, 248, 0.65),
    inset 0 0 0 3px rgba(28, 24, 22, 0.07);
  border-radius: inherit;
}

.image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-frame--photo {
  aspect-ratio: 4 / 3;
  max-height: min(380px, 72vw);
  width: 100%;
}

.image-frame--photo img {
  max-height: min(380px, 72vw);
  object-fit: cover;
  object-position: center;
}

.button-row {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  margin-top: 18px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fffdf8;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--accent-strong) 60%, #000);
  box-shadow: 0 3px 0 rgba(148, 55, 20, 0.35), 0 10px 24px rgba(194, 74, 31, 0.18);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.button-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 4px 0 rgba(148, 55, 20, 0.4), 0 14px 28px rgba(194, 74, 31, 0.22);
}

.button-link.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-stamp);
  text-transform: uppercase;
  font-size: 0.76rem;
}

.button-link.secondary:hover {
  border-color: var(--specimen);
  color: var(--specimen);
  box-shadow: 3px 3px 0 rgba(20, 92, 79, 0.12);
}

.steps-list {
  margin: 20px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.steps-list li {
  margin-bottom: 10px;
}

.steps-list li::marker {
  color: var(--accent);
}

.tag-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}

.tag {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-2) 85%, var(--highlight) 15%);
  border: 1px dashed color-mix(in srgb, var(--specimen) 35%, var(--border));
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.pdf-frame {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  padding: 28px 28px 32px;
  margin-top: 8px;
  background: color-mix(in srgb, var(--paper-deep) 55%, var(--surface) 45%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-stamp);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, var(--surface-glow) 100%);
  pointer-events: none;
}

.site-footer > div {
  position: relative;
}

.site-footer-credit {
  align-self: flex-end;
  text-align: right;
}

.site-footer strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  display: block;
  margin-bottom: 8px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
  white-space: pre-line;
}

.site-footer a {
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer a:hover {
  color: var(--specimen);
}

@media (max-width: 960px) {
  .content-grid,
  .content-grid--two,
  .feature-grid,
  .two-up,
  .three-up,
  .stem-showcase {
    grid-template-columns: 1fr;
  }

  .feature-grid--stem .stem-details,
  .feature-grid--stem .image-frame--photo {
    order: unset;
  }

  .image-frame--photo {
    max-height: none;
    aspect-ratio: 16 / 10;
    max-width: 100%;
  }

  .image-frame--photo img {
    max-height: none;
    min-height: 200px;
  }

  .stem-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 160px;
  }

  .stem-photo-card,
  .stem-photo-card--poster,
  .stem-photo-card--feature {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .top-nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 10px 4px 6px;
    gap: 6px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
  }

  .top-nav.is-open {
    display: flex;
  }

  .top-nav a {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    font-size: 0.72rem;
  }

  .top-nav a::after {
    display: none;
  }
}

@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px 12px 32px;
  }

  .site-header {
    top: 8px;
    padding: 12px 14px 14px;
  }

  .header-bar {
    padding-left: 4px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .page-header,
  .section-card {
    padding: 18px 16px;
  }

  .page-header--hero {
    transform: none;
    padding: 22px 18px;
  }

  .page-header h1 {
    max-width: none;
  }

  .site-footer {
    flex-direction: column;
    padding: 20px 16px;
  }

  .site-footer-credit {
    align-self: flex-start;
    text-align: left;
  }

  .button-row {
    grid-template-columns: 1fr;
  }

  .button-link {
    width: 100%;
  }

  .pdf-frame {
    min-height: 280px;
  }

  .stem-photo-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .image-frame--stem-gallery,
  .stem-photo-card--poster .image-frame--stem-gallery {
    aspect-ratio: 16 / 11;
    height: auto;
  }

  .stem-photo-card--feature .image-frame--stem-gallery {
    aspect-ratio: 16 / 11;
  }

  .stem-photo-card,
  .stem-photo-card--poster,
  .stem-photo-card--feature {
    grid-row: span 1;
  }
}
