@font-face {
  font-family: "Inter";
  src: url("/assets/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #FBFAF7;
  --text: #1D1D1D;
  --secondary: #60605F;
  --rule: rgba(29, 29, 29, 0.14);
  --field: #FFFFFF;
  --scrim: rgba(20, 22, 28, 0.42);
  --red: #FF4644;
  --error: #C4051B;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1B1D23;
    --text: #FFFFFF;
    --secondary: #B8B9BA;
    --rule: rgba(255, 255, 255, 0.16);
    --field: #14161C;
    --scrim: rgba(8, 9, 12, 0.66);
    --error: #FF4644;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

body.has-panel { overflow: hidden; }

.card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.logo { margin: 0; line-height: 0; }

.logo img {
  display: inline-block;
  width: clamp(220px, 60vw, 320px);
  height: auto;
}

.tagline {
  margin: 28px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--secondary);
}

.open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  padding: 13px 20px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.open::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--red);
  border-right: 2px solid var(--red);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.open:hover { border-color: var(--text); }
.open:hover::after { transform: translateX(2px) rotate(45deg); }

.panel {
  position: fixed;
  inset: 0;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  height: fit-content;
  margin: auto;
  padding: 36px 32px 28px;
  overflow: auto;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.panel[popover]:not(:popover-open) { display: none; }
.panel::backdrop { background: var(--scrim); }

.backdrop {
  position: fixed;
  inset: 0;
  background: var(--scrim);
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.close::before, .close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: var(--secondary);
  transform: translate(-50%, -50%) rotate(45deg);
}

.close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.close:hover::before, .close:hover::after { background: var(--text); }

.panel-title {
  margin: 0 0 24px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stop { color: var(--red); }

.field + .field { margin-top: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

input, select, textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}

select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--secondary) 50%), linear-gradient(135deg, var(--secondary) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

textarea { resize: vertical; min-height: 110px; }

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--text);
  outline-offset: -1px;
}

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

.optional {
  margin-left: 6px;
  font-weight: 400;
  color: var(--secondary);
}

.field-error, .alert {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--error);
}

.alert { margin: 0 0 20px; }

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

.send {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: var(--text);
  color: var(--paper);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.send:hover { background: var(--red); color: #FFFFFF; }

button:focus-visible, .close:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  color: var(--secondary);
}

.sent { margin: 0; color: var(--secondary); }

footer { padding: 0 24px 32px; text-align: center; }

footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.32;
  color: var(--secondary);
}
