:root {
  color-scheme: dark;
  --ink: #152129;
  --paper: #ffffff;
  --blue: #1b80ae;
  --muted: #667077;
  --line: #d9dde0;
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  background: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  overflow: hidden;
  background: var(--ink);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.site-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
}

.brand-panel {
  position: absolute;
  inset: 0 auto 0 0;
  display: grid;
  width: 100%;
  min-width: 0;
  padding: clamp(24px, 4vw, 56px);
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  transition: width 900ms var(--ease), transform 900ms var(--ease);
}

.logo {
  display: block;
  width: min(72vw, 520px);
  max-width: 82%;
  max-height: 72svh;
  height: auto;
  object-fit: contain;
  transition: width 900ms var(--ease), transform 900ms var(--ease);
}

.contact-trigger {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 18px;
  padding: 0 7px 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    color 250ms ease,
    background-color 250ms ease,
    border-color 250ms ease,
    opacity 300ms ease,
    transform 300ms ease;
}

.contact-trigger:hover,
.contact-trigger:focus-visible {
  border-color: #ffffff;
  color: var(--ink);
  outline: none;
  background: #ffffff;
}

.trigger-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--blue);
  font-size: 1rem;
  line-height: 1;
}

.contact-panel {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 2;
  width: 50%;
  min-height: 100%;
  overflow: auto;
  visibility: hidden;
  color: var(--ink);
  color-scheme: light;
  background: var(--paper);
  transform: translateX(100%);
  transition:
    transform 900ms var(--ease),
    visibility 0s linear 900ms;
}

.form-container {
  width: min(100%, 680px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(96px, 13vh, 148px) clamp(40px, 7vw, 104px) clamp(56px, 8vh, 96px);
  opacity: 0;
  transform: translateX(42px);
  transition:
    opacity 450ms ease,
    transform 700ms var(--ease);
}

.close-button {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(21, 33, 41, 0.22);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 220ms ease, transform 300ms ease;
}

.close-button span {
  position: absolute;
  top: 23px;
  left: 14px;
  width: 19px;
  height: 1px;
  background: var(--ink);
}

.close-button span:first-child {
  transform: rotate(45deg);
}

.close-button span:last-child {
  transform: rotate(-45deg);
}

.close-button:hover,
.close-button:focus-visible {
  outline: none;
  background: rgba(21, 33, 41, 0.07);
  transform: rotate(90deg);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h2 {
  max-width: 520px;
  margin: 0 0 clamp(48px, 7vh, 76px);
  font-size: clamp(2.15rem, 4vw, 4.8rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.contact-form {
  display: grid;
  gap: 34px;
}

.field {
  position: relative;
  display: grid;
  gap: 10px;
}

.field label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: 5px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 1.05rem;
  line-height: 1.5;
  transition: border-color 220ms ease;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #b54747;
}

.submit-button {
  display: flex;
  width: fit-content;
  max-width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 40px;
  margin-top: 4px;
  padding: 0 22px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--ink);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background-color 220ms ease, transform 220ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  outline: none;
  background: var(--blue);
  transform: translateY(-2px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.form-status {
  min-height: 1.4em;
  margin: -14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.site-shell.is-contact-open .brand-panel {
  width: 50%;
}

.site-shell.is-contact-open .logo {
  width: min(70%, 430px);
  transform: translateX(-1vw);
}

.site-shell.is-contact-open .contact-trigger {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.site-shell.is-contact-open .contact-panel {
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.site-shell.is-contact-open .form-container {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 320ms;
}

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

@media (max-width: 800px) {
  .brand-panel {
    padding: 24px;
  }

  .logo {
    width: min(82vw, 440px);
    max-width: 90%;
  }

  .contact-panel {
    width: 100%;
  }

  .form-container {
    width: 100%;
    padding: 104px 28px 52px;
  }

  .site-shell.is-contact-open .brand-panel {
    width: 100%;
    transform: translateX(-18%);
  }

  .site-shell.is-contact-open .logo {
    width: min(82vw, 440px);
  }

  h2 {
    max-width: 360px;
    margin-bottom: 46px;
    font-size: clamp(2.15rem, 11vw, 3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
