@font-face {
  font-family: "BudMax";
  src: url('./assets/budmax.woff2?v=0.5.7') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

:root {
  --ink: #111111;
  --paper: #f3f1eb;
  --edge: clamp(28px, 4.6vw, 82px);
  --safe-top: max(22px, env(safe-area-inset-top));
  --safe-bottom: max(22px, env(safe-area-inset-bottom));
  --action-bottom: 12svh;
}

* { box-sizing: border-box; }
html {
  touch-action: pan-y pinch-zoom;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}
body {
  min-height: 100%;
  margin: 0;
  background: inherit;
  color: var(--ink);
  font-family: "BudMax", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
button,
input,
textarea { font: inherit; }
button,
input,
textarea,
a { color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.intake-shell {
  position: relative;
  /* Match the homepage's image-backed paint without tinting Brave's top bar. */
  background-image: linear-gradient(var(--paper), var(--paper));
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--safe-top) var(--edge) var(--safe-bottom);
}

.brand {
  display: block;
  width: min(45vw, 720px);
  height: auto;
}

.brand > img { display: block; width: 100%; height: auto; }

.back {
  position: absolute;
  top: var(--safe-top);
  right: var(--edge);
  min-width: 44px;
  min-height: 44px;
  padding: 3px 0 5px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.back:hover,
.back:focus-visible { border-bottom-color: currentColor; }

.intake-form {
  width: min(66vw, 880px);
  margin: clamp(76px, 12svh, 150px) 0 0 auto;
}

.field {
  position: relative;
  border-bottom: 1px solid rgba(17, 17, 17, .28);
}
.field:focus-within { border-bottom-color: rgba(17, 17, 17, .78); }

input,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 20px 2px 16px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
  opacity: 1;
  appearance: none;
  -webkit-appearance: none;
  caret-color: var(--ink);
}
textarea {
  min-height: 142px;
  padding-top: 24px;
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: var(--ink);
  opacity: .60;
}
input:disabled,
textarea:disabled { opacity: .58; }

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.turnstile-slot {
  min-height: 0;
  margin-top: 0;
}

.form-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  min-height: 0;
  padding-top: 16px;
}
.send {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 0 50px 16px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.send-copy { display: block; width: 77%; height: auto; overflow: visible; }
.send:disabled {
  cursor: default;
  opacity: .34;
}
.send-rule {
  position: absolute;
  left: 0;
  right: 35px;
  bottom: 0;
  height: 1px;
  background: currentColor;
}
.send-arrow {
  position: absolute;
  right: 17px;
  bottom: 7px;
  width: 12px;
  height: 12px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transition: transform 150ms linear;
}
@media (hover: hover) and (pointer: fine) {
  .send:not(:disabled):hover .send-arrow { transform: translate(3px, -3px); }
}
.send:not(:disabled):focus-visible .send-arrow { transform: translate(3px, -3px); }

.form-status {
  min-height: 1.4em;
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.4;
  opacity: .62;
}
.form-status:empty { display: none; }
.form-status[data-state="success"] { opacity: 1; }
.form-status[data-state="error"] { opacity: .78; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(68px, 12svh, 130px);
  font-size: clamp(10px, .68vw, 12px);
  line-height: 1.25;
  text-transform: lowercase;
  letter-spacing: .02em;
  white-space: nowrap;
  color: rgba(17,17,17,.68);
}
.legal-links { display: flex; gap: 18px; }
.legal-links a {
  border-bottom: 1px solid transparent;
  text-decoration: none;
}
.legal-links a:hover,
.legal-links a:focus-visible { border-bottom-color: currentColor; }

@media (max-width: 700px) {
  :root { --edge: 24px; }
  .intake-shell {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    padding-top: max(20px, env(safe-area-inset-top));
  }
  .brand {
    width: min(33vw, 136px);
    margin-top: 2px;
  }
  .back {
    top: max(23px, env(safe-area-inset-top));
    font-size: 18px;
  }
  .intake-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    margin-top: 24px;
  }
  .field-movement {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
  }
  .field-movement textarea { flex: 1 1 auto; }
  input,
  textarea {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 20px;
  }
  textarea {
    min-height: 96px;
    height: 96px;
    padding-top: 14px;
  }
  .turnstile-slot { margin-top: 0; }
  .form-end {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    padding-top: 12px;
    align-items: flex-start;
  }
  .send { width: min(77vw, 350px); font-size: 24px; white-space: nowrap; }
  .send-rule { right: auto; width: calc(77% - 20px); }
  .send-arrow { right: auto; left: calc(77% - 13px); }
  .form-status {
    min-height: 0;
    margin: 10px 0 0;
    font-size: 14px;
  }
  .form-status:empty { margin: 0; }
  .site-footer {
    display: grid;
    justify-content: stretch;
    white-space: normal;
    gap: 6px;
    margin-top: max(0px, calc(var(--action-bottom) - var(--safe-bottom) - 2.5em - 7px));
    font-size: 10px;
  }
  .legal-links { gap: 15px; }
}

@media (min-width: 701px) {
  .send { width: clamp(280px, 31vw, 500px); }
  .form-end { justify-items: end; }
  .send-rule { right: auto; width: calc(77% - 20px); }
  .send-arrow { right: auto; left: calc(77% - 13px); }
}

@media (min-width: 701px) and (max-width: 1024px) and (orientation: portrait) {
  :root { --edge: 4vw; --action-bottom: 13svh; }
  .send { width: 48vw; }
}

@media (min-width: 701px) and (max-height: 600px) {
  :root { --action-bottom: 11svh; }
  .intake-shell {
    display: grid;
    grid-template-columns: minmax(120px, 140px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(28px, 6vw, 72px);
    align-items: start;
  }
  .brand {
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: min(22vw, 140px);
  }
  .back { top: var(--safe-top); right: var(--edge); }
  .intake-form {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    margin: 16px 0 0;
    padding-right: 70px;
  }
  .intake-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(76px, 1fr) auto auto;
    gap: 0 22px;
    min-height: calc(100svh - var(--safe-top) - 16px - var(--action-bottom));
  }
  .intake-form > .field:nth-of-type(1),
  .intake-form > .field:nth-of-type(2) { grid-row: 1; }
  .intake-form > .field:nth-of-type(3),
  .intake-form > .field:nth-of-type(4) { grid-row: 2; }
  .field-movement,
  .turnstile-slot,
  .form-end { grid-column: 1 / -1; }
  .field-movement { grid-row: 3; }
  .field-movement { display: flex; flex-direction: column; min-height: 0; }
  .field-movement textarea { flex: 1 1 0; height: 0; min-height: 76px; }
  .turnstile-slot { grid-row: 4; }
  .form-end { grid-row: 5; }
  input,
  textarea { min-height: 44px; padding: 8px 2px; }
  textarea { min-height: 76px; height: 100%; padding-top: 12px; }
  .turnstile-slot { margin-top: 0; }
  .form-end { min-height: 0; padding-top: 8px; margin: 0 -70px 0 0; width: calc(100% + 70px); }
  .form-end { grid-template-columns: minmax(0, 1fr); }
  .form-end { justify-items: end; }
  .site-footer {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    display: flex;
    width: 100%;
    margin-top: 16px;
    font-size: 10px;
  }
  .legal-links { flex-wrap: wrap; }
}

@media (min-width: 701px) and (max-width: 1024px) and (orientation: portrait) {
  .intake-shell {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
  }
  .intake-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }
  .field-movement {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
  }
  .field-movement textarea { flex: 1 1 auto; }
  .form-end { grid-template-columns: minmax(0, 1fr); }
  .form-end { margin-top: 0; }
  .site-footer { margin-top: max(0px, calc(var(--action-bottom) - var(--safe-bottom) - 1.25em - 1px)); font-size: 11px; }
}

@media (min-width: 900px) and (min-height: 601px) {
  :root { --action-bottom: 13svh; }
  .intake-shell { display: flex; flex-direction: column; min-height: 100svh; }
  .brand {
    position: absolute;
    top: var(--safe-top);
    left: var(--edge);
    width: min(33vw, 520px);
  }
  .intake-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: min(55vw, 880px);
    margin-top: clamp(120px, 16svh, 150px);
  }
  .field-movement { display: flex; flex: 1 1 auto; flex-direction: column; }
  .field-movement textarea { flex: 1 1 auto; }
  .site-footer { margin-top: max(0px, calc(var(--action-bottom) - var(--safe-bottom) - 1.25em - 1px)); }
}

@media (prefers-reduced-motion: reduce) {
  .send-arrow { transition: none; }
}

@media (min-width: 900px) and (max-height: 600px) {
  .brand { position: static; width: min(22vw, 140px); }
  .intake-form { width: 100%; margin: 16px 0 0; }
}

@media (min-width: 701px) and (max-height: 700px) {
  :root { --action-bottom: 11svh; }
}

/* Match the homepage footer clearance, including when Safari hides its bar. */
@media (min-width: 701px) and (max-width: 1024px) and (max-height: 600px) and (orientation: landscape) {
  :root { --action-bottom: max(11svh, calc(var(--safe-bottom) + 32px)); }
  .intake-shell { min-height: 100dvh; }
  .intake-form {
    min-height: calc(100dvh - var(--safe-top) - 16px - var(--action-bottom));
    grid-template-rows: auto auto minmax(44px, 1fr) auto auto;
  }
  .field-movement textarea { min-height: 44px; }
  .site-footer { justify-content: flex-start; }
}
