:root {
  --bg: #0b0b0a;
  --fg: #f3efe6;
  --fg-soft: #a09a90;
  --fg-muted: #8a857d;
  --rule: rgba(243, 239, 230, 0.14);
  --focus: #f3efe6;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", Times, serif;
  --pad: clamp(1.35rem, 5.2vw, 4.25rem);
  --header-h: 4.35rem;
  --max: 66rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
p {
  margin: 0;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

.wrap {
  width: min(var(--max), calc(100% - (2 * var(--pad))));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--pad);
  top: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.8rem;
  background: var(--fg);
  color: var(--bg);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
  padding-top: env(safe-area-inset-top);
}

.wordmark,
.footer-mark,
.hero-wordmark,
.site-nav a,
.panel h2 {
  font-family: var(--font-sans);
  font-weight: 400;
  text-transform: uppercase;
}

.wordmark,
.footer-mark {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  white-space: nowrap;
}

.wordmark {
  transition: opacity 0.4s ease;
}

.wordmark:hover,
.wordmark:focus-visible {
  opacity: 0.55;
}

/* The header mark stands down while the hero wordmark is on screen, so the
 * identity is stated once. js/main.js adds .is-scrolled once the hero
 * wordmark scrolls away; <noscript> in the document restores it. */
.header-mark {
  opacity: 0;
  pointer-events: none;
}

.header-mark:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.site-header.is-scrolled .header-mark {
  opacity: 1;
  pointer-events: auto;
}

.site-header.is-scrolled .header-mark:hover,
.site-header.is-scrolled .header-mark:focus-visible {
  opacity: 0.55;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.35rem, 3vw, 2.4rem);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--fg-muted);
  transition: color 0.4s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--fg);
}

.hero {
  min-height: 88svh;
  margin-top: calc(0px - var(--header-h) - env(safe-area-inset-top));
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top));
  padding-bottom: clamp(4.25rem, 13vh, 7.25rem);
}

.hero-inner {
  display: grid;
  justify-items: start;
  gap: 1.35rem;
}

.hero-wordmark {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.32em;
  row-gap: 0.06em;
  font-size: clamp(2.35rem, 6.4vw, 5.65rem);
  letter-spacing: 0.12em;
  line-height: 0.96;
  max-width: 100%;
}

.hero-wordmark span {
  white-space: nowrap;
}

.hero-line {
  font-family: var(--font-serif);
  font-size: clamp(1.02rem, 1.55vw, 1.22rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--fg-soft);
}

.panel {
  border-top: 1px solid var(--rule);
  padding-block: clamp(4.5rem, 11vw, 8.25rem);
  scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top));
}

.panel-grid {
  display: grid;
  gap: 1.15rem 4.5rem;
}

.panel h2 {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--fg-muted);
}

.panel p,
.about-copy,
.contact-copy {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.55vw, 1.22rem);
  line-height: 1.7;
  max-width: 28em;
  text-wrap: pretty;
}

.about-copy,
.contact-copy {
  display: grid;
}

.contact-copy {
  gap: 1rem;
}

/* The byline is attribution, not prose: it sits apart from the paragraph. */
.about-copy {
  gap: 1.75rem;
}

/* Both of these are <p> inside .panel, so they must outrank `.panel p`. */
.panel .byline,
.panel .contact-email {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  max-width: none;
}

.panel .byline {
  color: var(--fg-muted);
}

.contact-email[hidden] {
  display: none;
}

.contact-email a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.12rem;
  transition: border-color 0.4s ease;
}

.contact-email a:hover,
.contact-email a:focus-visible {
  border-bottom-color: var(--fg);
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.65rem calc(1.65rem + env(safe-area-inset-bottom));
}

.footer-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.copyright {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  white-space: nowrap;
}

a:focus-visible,
.skip-link:focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: 4px;
}

@media (min-width: 720px) {
  .panel-grid {
    grid-template-columns: 8.75rem minmax(0, 1fr);
    align-items: start;
  }

  .panel h2 {
    padding-top: 0.4rem;
  }
}

@media (max-width: 719px) {
  .hero-wordmark {
    flex-direction: column;
    column-gap: 0;
    row-gap: 0.08em;
    font-size: clamp(2.2rem, 11vw, 3.05rem);
    letter-spacing: 0.14em;
    line-height: 1.02;
  }

  .hero-inner {
    gap: 1.35rem;
  }

  .hero {
    padding-bottom: clamp(3.75rem, 12vh, 5.5rem);
  }
}

@media (max-width: 480px) {
  .wordmark,
  .footer-mark {
    letter-spacing: 0.2em;
    font-size: 0.64rem;
  }

  .site-nav a {
    letter-spacing: 0.2em;
    font-size: 0.64rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .copyright {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-wordmark {
    animation: rise 1.2s ease both;
  }

  .hero-line {
    animation: rise 1.2s ease 0.16s both;
  }
}

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

  .wordmark,
  .site-nav a,
  .contact-email a,
  .hero-wordmark,
  .hero-line {
    animation: none;
    transition: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}
