:root {
  --type-label: .72rem;
  --type-small: .78rem;
  --type-body: 1rem;
  --type-lead: 1.12rem;
  --type-card: 1.35rem;
  --type-section: clamp(1.9rem, 3.5vw, 2.35rem);
  --type-page: clamp(2.25rem, 4.8vw, 3.15rem);
  --type-hero: clamp(2.8rem, 6.5vw, 4.25rem);
  --muted: #969087;
  --gold-dim: #a88635;
}

html {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-size: var(--type-body) !important;
}

.skip-link {
  position: fixed;
  top: .6rem;
  left: .6rem;
  z-index: 10000;
  transform: translateY(-180%);
  padding: .65rem .85rem;
  background: #f0ece3;
  color: #080806;
  font: 500 var(--type-small)/1 'Inconsolata', monospace;
  text-decoration: none;
}

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

a:focus-visible,
button:focus-visible,
[role='button']:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold, #b8963e);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Display hierarchy */
h1,
.page-title,
.page-header h1 {
  font-size: var(--type-page) !important;
  line-height: 1.08 !important;
}

body > .hero h1,
.hero-title {
  font-size: var(--type-hero) !important;
  line-height: 1 !important;
}

h2,
.section-title,
.project h2 {
  font-size: var(--type-section) !important;
  line-height: 1.12 !important;
}

h3,
.work-title,
.track-title,
.project-title,
.tool h3,
.modal h2 {
  font-size: var(--type-card) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

/* Reading text */
.lead,
.hero-sub,
.work-type {
  font-size: var(--type-lead) !important;
  line-height: 1.7 !important;
}

.page-sub,
.section-desc,
.project-copy,
.project-copy p,
.synopsis-text p,
.spoiler-block p,
.work-hook,
.project-desc,
.statement p,
.projects-intro p,
.sample-note p {
  font-size: var(--type-body) !important;
  line-height: 1.78 !important;
}

/* Functional text */
.nav-logo,
.footer-logo {
  font-size: 1.05rem !important;
}

.nav-links a,
.nav-back,
.button,
.action,
.btn-dl,
.btn-req,
.btn-submit,
.btn-cancel,
.contact,
.project-inquiry {
  font-size: var(--type-small) !important;
}

.page-label,
.section-label,
.section-heading,
.access-badge,
.label,
.eyebrow,
.work-number,
.work-meta,
.work-links a,
.track-num,
.tag,
.project-status,
.project-medium,
.sample-count,
.process-note,
.tool-num,
.architecture h3,
.book-connection span,
.status strong,
.meta-row,
.synopsis-label,
.toggle-label,
.toggle-btn,
.modal-label,
.form-field label,
.credit,
.lb-caption,
.lb-close,
.lb-arrow,
.cell-text {
  font-size: var(--type-label) !important;
}

.footer-links a {
  font-family: 'Inconsolata', monospace;
  font-size: var(--type-label) !important;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold);
}

.footer-links {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem 1.25rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.footer-copy {
  font-size: .7rem !important;
}

body > footer {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: center !important;
  gap: 1rem 2rem !important;
  padding: 2rem 2.5rem !important;
}

body > footer .footer-copy {
  grid-column: 1 / -1;
  width: auto !important;
  margin: 0 !important;
}

@media (max-width: 760px) {
  :root {
    --type-page: clamp(2.1rem, 11vw, 2.75rem);
    --type-hero: clamp(2.5rem, 13vw, 3.4rem);
    --type-section: clamp(1.75rem, 8vw, 2.15rem);
  }

  html {
    font-size: 16px !important;
  }

  body > footer {
    grid-template-columns: 1fr;
    justify-content: center;
    text-align: center;
  }

  .hero-sub {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    font-size: .78rem !important;
    letter-spacing: .16em !important;
  }

  .footer-links {
    width: 100%;
    justify-content: center;
    gap: .8rem 1.2rem !important;
  }

  body > footer .footer-copy {
    grid-column: 1;
  }
}
