/* Tokens: one black, the logo's mint bar and its yellow/blue edges. */
:root {
  --black: #000;
  --mint: #f5fff8;
  --edge-yellow: #f2f24a;
  --edge-blue: #2b2bd6;
  --text: #fff;
  --muted: #8c8c8c;
  --line: #262626;
  --error: #ff6b5e;
  --header: 70px;
  --column: 620px;
  --gutter-right: 80px;
}

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

html {
  background: var(--black);
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16.2px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

/* Header: 70px bar with a thin divider, mark at top left, contact link at top right. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header);
  border-bottom: 1px solid var(--line);
  background: var(--black);
  z-index: 2;
}

.mark {
  position: absolute;
  top: 15px;
  left: 18px;
  display: block;
  width: 32px;
  height: 40px;
  color: #e6e6e6;
}

.mark svg {
  display: block;
}

.nav {
  position: absolute;
  top: 0;
  right: 24px;
  height: var(--header);
  display: flex;
  align-items: center;
}

.nav a,
.nav a:visited {
  color: #e6e6e6;
  text-decoration: none;
}

.nav a:hover {
  color: #fff;
}

.mark:focus-visible,
.nav a:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 4px;
}

/* Panels: each one fills the browser window and is a scroll stop. */
.panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header) + 30px) var(--gutter-right) var(--header) 16px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Hero: logo and tagline, right-aligned. */
.hero-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  width: 100%;
  min-width: 0;
}

.logo {
  margin: 0;
  width: var(--column);
  max-width: 100%;
  line-height: 0;
}

.logo svg {
  display: block;
  width: 100%;
  height: auto;
  shape-rendering: crispEdges;
}

.logo .f { fill: var(--mint); }
.logo .l { fill: var(--edge-yellow); }
.logo .r { fill: var(--edge-blue); }

.tagline {
  margin: 14px 0 0;
  font-weight: 400;
}

/* Contact: centered on the screen, its fields drawn as logo bars.
   Name and email split one row, like the split bars of the B. */
.contact {
  justify-content: center;
  padding-left: 24px;
  padding-right: 24px;
}

.contact-block {
  width: var(--column);
  max-width: 100%;
}

.contact-title {
  margin: 0 0 28px;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
}

.row {
  min-width: 0;
}

.row-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.bar {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 9px 16px;
  border: 0;
  border-radius: 0;
  background: var(--mint);
  box-shadow: inset 2px 0 0 var(--edge-yellow), inset -2px 0 0 var(--edge-blue);
  color: #000;
  font: inherit;
  caret-color: var(--edge-blue);
  -webkit-appearance: none;
  appearance: none;
}

.bar-tall {
  height: auto;
  min-height: 142px;
  resize: none;
}

.bar:focus {
  outline: 1px solid var(--mint);
  outline-offset: 3px;
  box-shadow: inset 5px 0 0 var(--edge-yellow), inset -5px 0 0 var(--edge-blue);
}

.bar[aria-invalid="true"] {
  outline: 1px solid var(--error);
  outline-offset: 3px;
}

.row-send {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* The send button is the one bar that is not filled: it fills when you point at it. */
.send {
  width: 249px;
  max-width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--mint);
  border-radius: 0;
  background: transparent;
  color: var(--mint);
  font: inherit;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.send:hover,
.send:focus-visible {
  background: var(--mint);
  color: #000;
  box-shadow: inset 2px 0 0 var(--edge-yellow), inset -2px 0 0 var(--edge-blue);
}

.send:focus-visible {
  outline: 1px solid var(--mint);
  outline-offset: 3px;
}

.send:disabled {
  opacity: 0.5;
  cursor: default;
}

.form-status {
  min-height: 26px;
  margin: 4px 0 0;
  text-align: center;
  color: var(--muted);
}

.form-status:empty {
  display: none;
}

.form-status[data-state="ok"] { color: var(--mint); }
.form-status[data-state="error"] { color: var(--error); }

.contact-note {
  margin: 28px 0 0;
  text-align: center;
  color: var(--muted);
}

/* Honeypot field, hidden from people. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Narrow screens: one field per row, snapping relaxes for the keyboard. */
@media (max-width: 720px) {
  .row-split {
    grid-template-columns: 1fr;
  }

  html {
    scroll-snap-type: y proximity;
  }

  .panel {
    padding: calc(var(--header) + 24px) 16px 48px;
  }

  .nav {
    right: 16px;
  }

  .tagline {
    font-size: 14px;
    line-height: 22px;
  }
}

@media (max-height: 640px) {
  html {
    scroll-snap-type: y proximity;
  }
}

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

  .send {
    transition: none;
  }
}
