@font-face {
  font-family: "General Sans";
  src: url("fonts/GeneralSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("fonts/GeneralSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("fonts/GeneralSans-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafaf8;
  --surface: #f1f1ed;
  --card: #ffffff;
  --border: #e4e4de;
  --text: #1c1e1d;
  --muted: #5f655f;
  --accent: #526b00;
  --accent-hover: #405400;
  --accent-soft: rgba(82, 107, 0, 0.1);
  --accent-wash: #f4f6e3;
  --on-accent: #ffffff;
  --danger: #a8432f;
  --shadow: 0 1px 2px rgba(20, 24, 22, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --max: 68rem;
  --font-body: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Satoshi", "General Sans", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17191b;
    --surface: #1d2023;
    --card: #1e2124;
    --border: #2f3438;
    --text: #e9ebe8;
    --muted: #a2a8a1;
    --accent: #c7e700;
    --accent-hover: #d6ef4c;
    --accent-soft: rgba(199, 231, 0, 0.14);
    --accent-wash: #2b3300;
    --on-accent: #1c1e1d;
    --danger: #e08a76;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(100% - 3rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(100% - 3rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.875rem;
}

.wordmark {
  display: block;
  flex: none;
  line-height: 0;
}
.wordmark img {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.site-nav a:hover {
  color: var(--text);
}
.site-nav a[aria-current] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

#view {
  flex: 1;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.875rem, 1.3rem + 2.6vw, 2.75rem);
}

h2 {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

p {
  max-width: 68ch;
}

a {
  color: var(--accent);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.lede {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--text);
  /* font-weight: 500; */
  /* max-width: 34ch; */
  text-wrap: balance;
}

.intro {
  padding-block: clamp(3.5rem, 4vw + 2rem, 6rem) clamp(2.5rem, 3vw + 1rem, 4rem);
}
.intro h1 {
  margin-bottom: 1.25rem;
  /* max-width: 16ch; */
}
.intro .lede {
  margin-bottom: 1rem;
}
.intro p:not(.eyebrow):not(.lede) {
  color: var(--muted);
}

section.container {
  padding-block: clamp(2.25rem, 3vw + 1rem, 3.75rem);
}
section.container h2 {
  margin-bottom: 1.5rem;
}

.founder-letter {
  font-size: 1.125rem;
  line-height: 1.65;
  display: grid;
  gap: 1.125rem;
}
.founder-letter p {
  max-width: 38rem;
  color: var(--muted);
}
.intro.founder-letter {
  padding-bottom: clamp(3.5rem, 4vw + 1.5rem, 5rem);
}
.founder-letter .letter-signature {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-head h2 {
  margin-bottom: 0;
}

.text-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.principle-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.principle-grid .card {
  padding: 1.5rem;
}
.principle-grid h3 {
  margin-bottom: 0.5rem;
}
.principle-grid p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 18rem) 1fr;
  gap: 1.75rem;
  padding: 1.5rem;
  align-items: center;
}

.project-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card h3 {
  margin-bottom: 0.375rem;
}

.project-meta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--muted);
  margin-bottom: 0.875rem;
}

.contact-cta {
  background: var(--accent-wash);
  border-block: 1px solid var(--border);
  margin-top: clamp(2.25rem, 3vw + 1rem, 3.75rem);
}

.cta-inner {
  padding-block: clamp(2.5rem, 3vw + 1.5rem, 4rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}
.cta-inner p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.button,
button.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}
.button:hover {
  background: var(--accent-hover);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.button-secondary:hover {
  background: var(--surface);
}

.page-head {
  padding-block: clamp(3rem, 4vw + 1.5rem, 5rem)
    clamp(1.75rem, 2vw + 1rem, 2.75rem);
}
.page-head h1 {
  margin-bottom: 0.75rem;
}
.page-head p {
  color: var(--muted);
  font-size: 1.0625rem;
}

.projects-list {
  display: grid;
  gap: 1.25rem;
  padding-bottom: clamp(2.5rem, 3vw + 1rem, 4rem);
}

.contact-layout {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 3vw + 1rem, 4rem);
}

.contact-form {
  display: grid;
  gap: 1.125rem;
  max-width: 80ch;
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field-label {
  font-weight: 500;
  font-size: 0.9375rem;
}

.field input,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  width: 100%;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
}

button[disabled],
.htmx-request button[type="submit"] {
  opacity: 0.6;
  cursor: progress;
}

#contact-status {
  min-height: 1.5rem;
  font-weight: 500;
}
#contact-status .ok {
  color: var(--accent);
}
#contact-status .err {
  color: var(--danger);
}

.contact-aside h2 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.socials {
  list-style: none;
  display: grid;
  gap: 0.25rem;
  max-width: 10rem;
}
.socials a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: background 0.15s ease;
}
.socials a:hover {
  background: var(--surface);
}
.socials a::after {
  content: "\2197";
  color: var(--muted);
  font-size: 0.875rem;
}

.legal {
  padding-bottom: clamp(2.5rem, 3vw + 1rem, 4rem);
}
.legal h2 {
  font-size: 1.125rem;
  margin-top: 2.25rem;
  margin-bottom: 0.625rem;
}
.legal p,
.legal li {
  color: var(--muted);
}
.legal ul {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.375rem;
  margin-block: 0.5rem;
}
.legal .updated {
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  position: relative;
  padding-block: 2.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 2rem;
  padding-right: 20rem;
}

.footer-logo {
  position: absolute;
  right: 0;
  top: 1.5rem;
  line-height: 0;
  opacity: 0.12;
}
.footer-logo img {
  width: clamp(6rem, 12vw, 9rem);
  height: auto;
}

.footer-inner h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.footer-inner ul {
  list-style: none;
  display: grid;
  gap: 0.375rem;
}
.footer-inner ul a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
}
.footer-inner ul a:hover {
  color: var(--accent);
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

::selection {
  background: var(--accent-soft);
}

@media (max-width: 52rem) {
  .principle-grid {
    grid-template-columns: 1fr;
  }
  .project-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .project-card-media {
    max-width: 24rem;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 34rem) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
