/* Latin subsets from Google Fonts, SIL Open Font License 1.1 */
@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody.woff2") format("woff2");
  font-weight: 500 900;
  font-stretch: 50% 150%;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --cobalt: #1b2fe3;
  --ink: #0d1138;
  --ink-soft: #474c75;
  --paper: #f2f3f8;
  --white: #fff;
  --accent: #ffe14a;
  --accent-hover: #fff09a;
  --accent-press: #f5d21f;
  --mist: #cdd3ff;
  --display: "Anybody", "Arial Black", sans-serif;
  --text: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --d-shape: 0 999px 999px 0;
  --d-soft: 0 16px 16px 0;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--text);
}

h1, h2, h3, p { margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 0.2em; }
a, button, label { touch-action: manipulation; }
p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.sprite { display: none; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

.skip-link:focus { top: 16px; }
.skip-link:focus-visible { outline-color: var(--white); }

.wrap {
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 36px 0 28px;
  border: 0;
  border-radius: var(--d-shape);
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn:hover { background: var(--accent-hover); }

.btn:active {
  background: var(--accent-press);
  transform: scale(0.98);
}

.btn:focus-visible { outline-color: var(--white); }

.masthead,
.hero {
  background: var(--cobalt);
  color: var(--white);
}

.hero { padding: clamp(20px, 2.4vw, 36px) 0 clamp(48px, 6vw, 88px); }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 24px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.brand:hover span { text-decoration: underline; }

.brand svg {
  width: 80px;
  height: 24px;
}

.site-nav {
  display: flex;
  gap: 32px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  text-decoration: none;
}

.site-nav a:hover { text-decoration: underline; }
.site-nav a:active { color: var(--mist); }

.headline {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.1rem, 9.3vw, 10rem);
  font-stretch: 100%;
  line-height: 0.98;
  letter-spacing: -0.005em;
}

.js .headline:not(.is-ready) {
  visibility: hidden;
  animation: reveal-headline 0s 2.5s forwards;
}

@keyframes reveal-headline {
  to { visibility: visible; }
}

.headline.is-arriving { transition: font-stretch 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }

.line {
  display: block;
  width: fit-content;
}

.headline.is-fitted .line { white-space: nowrap; }

.intro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: clamp(24px, 3vw, 40px);
}

.lede {
  max-width: 48ch;
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.4;
}

.section { padding-block: clamp(64px, 8vw, 120px); }

.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-stretch: 105%;
  line-height: 1;
  text-wrap: balance;
}

.projects {
  display: grid;
  gap: clamp(56px, 7vw, 112px);
  margin-top: clamp(40px, 5vw, 80px);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 32px clamp(24px, 4vw, 64px);
}

.project h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-stretch: 90%;
  line-height: 1.05;
}

.project-type {
  margin: 8px 0 16px;
  color: var(--ink-soft);
}

.project-text p { max-width: 46ch; }

.project-link { margin-top: 24px; }
.project-link:focus-visible { outline-color: var(--ink); }

.project-text .project-note {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.project-media {
  position: relative;
  padding-bottom: clamp(16px, 2.4vw, 32px);
}

.shot-desktop {
  display: block;
  width: 88%;
  height: auto;
  border-radius: 12px;
  outline: 1px solid rgb(13 17 56 / 0.16);
  background: var(--mist);
}

.shot-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18%;
  height: auto;
  border: clamp(4px, 0.6vw, 8px) solid var(--ink);
  border-radius: clamp(16px, 2.4vw, 32px);
  outline: 4px solid var(--paper);
  background: var(--mist);
}

.section-contact {
  background: var(--cobalt);
  color: var(--white);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 6vw, 96px);
}

.contact-intro p {
  max-width: 42ch;
  margin-top: 20px;
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
}

.contact-intro a { font-weight: 600; }

.contact-form {
  display: grid;
  gap: 24px;
  justify-items: start;
}

html:not(.js) .contact-form { display: none; }

.form-intro { color: var(--mist); }

.field { width: 100%; }

label {
  display: block;
  font-weight: 600;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  padding: 12px 24px 12px 16px;
  border: 2px solid var(--white);
  border-radius: var(--d-soft);
  background: var(--white);
  color: var(--ink);
}

.field textarea { resize: vertical; }

.field input:focus-visible,
.field textarea:focus-visible { outline-color: var(--accent); }

.field [aria-invalid="true"] { border-color: var(--accent); }

.field-error {
  margin-top: 8px;
  color: var(--accent);
  font-weight: 600;
}

.form-note {
  margin-top: -12px;
  color: var(--mist);
  font-size: 1rem;
}

.form-status:empty { display: none; }
.form-status { font-weight: 600; }

.site-footer {
  background: var(--cobalt);
  color: var(--white);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 28px;
  font-size: 1rem;
}

.footer-about { color: var(--mist); }
.footer-meta { text-align: right; }

.footer-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.footer-email:active { color: var(--mist); }

@media (max-width: 860px) {
  .project,
  .contact { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .site-header {
    padding-block: 16px 4px;
    column-gap: 12px;
  }

  .site-nav { gap: 16px; }
  .site-nav a { font-size: 0.9375rem; }

  .brand { gap: 8px; }

  .brand svg {
    width: 60px;
    height: 18px;
  }

  .brand span { font-size: 0.875rem; }

  .footer-meta { text-align: left; }
}

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