:root {
  --navy: #091528;
  --ink: #f4f7fb;
  --blue: #1b7afd;
  --muted: #b7c3d4;
  --line: rgba(244, 247, 251, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 55% at 88% 12%, rgba(27, 122, 253, 0.28), transparent 58%),
    radial-gradient(ellipse 42% 36% at 0% 100%, rgba(27, 122, 253, 0.14), transparent 55%),
    var(--navy);
  color: var(--ink);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  right: -4vw;
  top: 16vh;
  width: min(560px, 64vw);
  aspect-ratio: 212 / 333;
  background: url("/ribbon.png") center / contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

.top, footer, main {
  width: min(720px, calc(100% - 48px));
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.16em;
  font-weight: 600;
  font-size: 15px;
}

.mark { width: 28px; height: auto; display: block; }

.status {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main { padding: 12vh 0 8vh; flex: 1; }

.eyebrow {
  margin: 0 0 12px;
  color: #8ec0ff;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 22ch;
  font-family: Newsreader, Georgia, serif;
  font-weight: 450;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 42rem;
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 18px;
}

.cta {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cta:focus-visible,
input:focus-visible,
textarea:focus-visible,
.close:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

footer {
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 13px;
}

dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: #f7f9fc;
  color: #091528;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

dialog::backdrop { background: rgba(4, 10, 20, 0.62); }

form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  padding: 0;
}

.dialog-body { overflow: auto; min-height: 0; flex: 1; padding: 0 22px 8px; }
.dialog-head { padding: 22px 22px 0; }
.dialog-foot { padding: 4px 22px 22px; }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h2 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-weight: 560;
  font-size: 28px;
}

.close {
  border: 0;
  background: transparent;
  color: #5c6b80;
  font: inherit;
  cursor: pointer;
}

.dialog-copy { margin: 8px 0 16px; color: #5c6b80; }

label {
  display: block;
  margin: 12px 0 4px;
  font-size: 13px;
  font-weight: 600;
}

label span { font-weight: 400; color: #5c6b80; }

input, textarea {
  width: 100%;
  border: 1px solid #d5deea;
  border-radius: 8px;
  background: white;
  color: #091528;
  font: inherit;
  padding: 10px 12px;
}

textarea { resize: vertical; }

.form-status { min-height: 1.4em; margin: 12px 0; font-size: 14px; }
.form-status[data-kind="error"] { color: #8a2b22; }
.form-status[data-kind="ok"] { color: #0b6b63; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .top, footer, main { width: min(720px, calc(100% - 32px)); }
  main { padding-top: 8vh; }
  body::before {
    right: -36vw;
    top: 28vh;
    width: 88vw;
    opacity: 0.16;
  }
}
