:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #101010;
  --text: #101010;
  --muted: #6f6f6a;
  --line: #dededa;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --gutter: clamp(1.25rem, 2.5vw, 2.25rem);
  --ease: 220ms cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background: var(--paper);
}

button,
a,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

.site-shell {
  display: grid;
  min-height: 100svh;
  padding: clamp(2.25rem, 6.4vh, 3.625rem) var(--gutter) clamp(2.5rem, 6vh, 5rem);
  grid-template-rows: auto auto auto;
  align-content: start;
  align-content: start;
  background: var(--paper);
  transition:
    color var(--ease),
    background-color var(--ease);
}

.site-header {
  position: relative;
}

.wordmark {
  position: relative;
  display: block;
  width: 100%;
  color: var(--text);
  font-size: clamp(2rem, 2.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.84;
  transition: color var(--ease);
}

.wordmark-reveal {
  display: inline-block;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  color: var(--muted);
  filter: blur(0.8px);
  letter-spacing: -0.06em;
  transform: translateX(-0.08em);
  vertical-align: bottom;
  white-space: nowrap;
  transition:
    max-width 600ms cubic-bezier(0.45, 0, 0.15, 1),
    opacity 360ms cubic-bezier(0.45, 0, 0.15, 1),
    filter 600ms cubic-bezier(0.45, 0, 0.15, 1),
    letter-spacing 600ms cubic-bezier(0.45, 0, 0.15, 1),
    transform 600ms cubic-bezier(0.45, 0, 0.15, 1);
}

.wordmark:hover .wordmark-reveal,
.wordmark:focus-visible .wordmark-reveal {
  opacity: 1;
  filter: blur(0);
  letter-spacing: -0.035em;
  transform: translateX(0);
}

.wordmark:hover .wordmark-reveal-long,
.wordmark:focus-visible .wordmark-reveal-long {
  max-width: 10em;
}

.wordmark:hover .wordmark-reveal-short,
.wordmark:focus-visible .wordmark-reveal-short {
  max-width: 1em;
}

.manifesto {
  width: min(100%, 32rem);
  margin-top: clamp(1.25rem, 2.5vh, 2rem);
}

.hero-image {
  width: min(100%, 32rem);
  margin: clamp(1.75rem, 3.5vh, 2.5rem) 0 0;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

.manifesto p,
.contact-cta {
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.62;
  text-wrap: pretty;
  word-break: keep-all;
}

.manifesto p {
  margin: 0 0 1.25em;
}

.manifesto strong {
  font-weight: 600;
}

.contact-cta {
  width: min(100%, 32rem);
  margin-top: clamp(0.75rem, 2vh, 1.25rem);
}

.contact-statement {
  max-width: 32rem;
  margin: 0;
}

.contact-open {
  margin: 0 0 0 0.25em;
  padding: 0;
  cursor: pointer;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.signature {
  margin: clamp(1.5rem, 3vh, 2.5rem) 0 0;
}

.signature img {
  display: block;
  width: clamp(8rem, 14.4vw, 11.2rem);
  height: auto;
}

.signature a {
  display: inline-block;
}

.contact-dialog {
  width: min(calc(100% - 2rem), 32rem);
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--paper);
}

.contact-dialog:not([open]) {
  display: none;
}

.contact-dialog::backdrop {
  background: rgb(16 16 16 / 46%);
}

.contact-dialog__surface {
  padding: clamp(1.25rem, 3vw, 1.5rem);
}

.contact-dialog__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.contact-dialog__header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.62;
}

.contact-dialog__header button {
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contact-dialog__header button:hover {
  color: var(--ink);
}

.contact-dialog__intro {
  margin: 0.25rem 0 2rem;
}

.contact-dialog__intro p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
  word-break: keep-all;
}

.contact-form {
  display: grid;
  gap: 1.25rem;
}

.form-field {
  display: grid;
  gap: 0.55rem;
}

.form-field > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.02em;
}

.form-field em {
  font-style: normal;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: border-color var(--ease);
}

.form-field textarea {
  min-height: 6.5rem;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--ink);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #aaa9a3;
}

.privacy-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.5;
  word-break: keep-all;
}

.privacy-check input {
  width: 0.85rem;
  height: 0.85rem;
  margin: 0.14rem 0 0;
  accent-color: var(--ink);
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.contact-submit {
  justify-self: start;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.contact-submit:disabled {
  cursor: wait;
  opacity: 0.58;
}

.form-status {
  min-height: 1.1em;
  margin: -0.5rem 0 0;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.form-status[data-state="success"] {
  color: var(--ink);
}

body:has(.contact-dialog[open]) {
  overflow: hidden;
}

@media (min-width: 641px) {
  .manifesto p,
  .contact-cta {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding-top: 2rem;
  }

  .wordmark {
    font-size: 2rem;
  }

  .manifesto {
    margin-top: 1.75rem;
  }

  .manifesto p {
    line-height: 1.65;
  }

  .signature img {
    width: 8rem;
  }
}

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