:root {
  --midnight-primary: #2B4FC4;
  --midnight-deep: #1E3A8A;
  --ink: #0B1220;
  --electric-blue: #5B8DEF;
  --electric-tertiary: #7FB2FF;
  --paper-bg: #F4F1EA;
  --paper-card: #E8E3D6;
  --paper-secondary: #8A8578;
  --paper-divider: #D4CFC0;

  --font-sans: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --content-max: 720px;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 6rem;

  --radius-md: 12px;
  --radius-lg: 20px;

  --focus-ring: 0 0 0 3px rgba(91, 141, 239, 0.55);
}

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

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper-bg);
  z-index: 1000;
  border-radius: 6px;
}

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

/* =========================
   Hero
   ========================= */

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  background: var(--midnight-deep);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
  isolation: isolate;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

.hero__content {
  position: relative;
  max-width: var(--content-max);
  width: 100%;
  text-align: center;
  z-index: 1;
}

.hero__wordmark {
  font-weight: 800;
  font-size: clamp(3.5rem, 14vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md);
  color: #ffffff;
}

.hero__tagline {
  font-weight: 600;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  line-height: 1.35;
  margin: 0 0 var(--space-xl);
  color: #ffffff;
  opacity: 0.92;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  transition: border-color 0.3s ease;
}

.hero__scroll:hover,
.hero__scroll:focus-visible {
  border-color: rgba(255, 255, 255, 0.9);
}

.hero__scroll-dot {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.85);
  animation: scroll-hint 1.8s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-dot { animation: none; }
}

/* =========================
   Button
   ========================= */

.button {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
  text-align: center;
}

.button--primary {
  background: var(--electric-blue);
  color: #0B1220;
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--electric-tertiary);
  transform: translateY(-1px);
}

.button--primary:active {
  transform: translateY(0);
}

/* =========================
   Statement
   ========================= */

.statement {
  background: var(--paper-bg);
  color: var(--ink);
  padding: var(--space-2xl) var(--space-md);
  display: flex;
  justify-content: center;
}

.statement__inner {
  max-width: var(--content-max);
  text-align: center;
}

.statement__body {
  font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.55;
  margin: 0 0 var(--space-lg);
  letter-spacing: -0.005em;
}

.statement__kicker {
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.4;
  margin: 0;
  color: var(--ink);
}

/* =========================
   Contact form
   ========================= */

.contact {
  background: var(--paper-bg);
  padding: 0 var(--space-md) var(--space-2xl);
  display: flex;
  justify-content: center;
  scroll-margin-top: var(--space-lg);
}

.contact__card {
  width: 100%;
  max-width: var(--content-max);
  background: var(--paper-card);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-lg), 5vw, 3rem);
}

.contact__heading {
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-xs);
}

.contact__sub {
  font-weight: 400;
  font-size: 1rem;
  color: var(--paper-secondary);
  margin: 0 0 var(--space-lg);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  border: none;
  padding: 0;
  margin: 0;
}

.field__legend {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--paper-secondary);
  margin-bottom: var(--space-sm);
  padding: 0;
}

.field__label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--paper-secondary);
}

.field__hint {
  font-family: var(--font-sans);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.8rem;
  color: var(--paper-secondary);
  margin-left: 0.4em;
}

.field__input {
  font: inherit;
  width: 100%;
  background: var(--paper-bg);
  color: var(--ink);
  border: 1.5px solid var(--paper-divider);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input--textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.5;
}

.field__input:focus {
  outline: none;
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.25);
}

.field__input:invalid:not(:placeholder-shown) {
  border-color: #8B6A3E;
}

.field__counter {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--paper-secondary);
  text-align: right;
}

.field--radio {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--paper-bg);
  border: 1.5px solid var(--paper-divider);
  transition: border-color 0.15s ease, background-color 0.15s ease;
  min-height: 48px;
}

.radio:hover {
  border-color: var(--paper-secondary);
}

.radio input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--paper-secondary);
  margin: 0;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  flex-shrink: 0;
  background: transparent;
}

.radio input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.12s ease-in-out;
  background: var(--electric-blue);
}

.radio input[type="radio"]:checked {
  border-color: var(--electric-blue);
}

.radio input[type="radio"]:checked::before {
  transform: scale(1);
}

.radio input[type="radio"]:focus-visible {
  box-shadow: var(--focus-ring);
}

.radio:has(input:checked) {
  border-color: var(--electric-blue);
  background: #ECE6D4;
}

.radio__label {
  font-weight: 400;
  font-size: 1rem;
}

.contact-form__actions {
  display: flex;
  justify-content: flex-start;
}

.contact-form__submit {
  min-width: 9rem;
}

.contact-form__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.contact-form__status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: #8B3A3A;
}

.contact-form__status[data-status="idle"],
.contact-form__status:empty {
  display: none;
}

.contact-form__success {
  text-align: left;
  padding: 1.5rem 0 0;
}

.contact-form__success p {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

.contact__card[data-submitted="true"] .contact-form {
  display: none;
}

/* =========================
   Footer
   ========================= */

.footer {
  background: var(--ink);
  color: var(--paper-bg);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.footer__tagline {
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--electric-blue);
  margin: 0;
  letter-spacing: -0.005em;
}

.footer__legal {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0;
  color: var(--paper-bg);
  opacity: 0.7;
}

/* =========================
   Small screens
   ========================= */

@media (max-width: 600px) {
  :root {
    --space-2xl: 4.5rem;
    --space-xl: 2.5rem;
  }
}

@media (max-width: 420px) {
  .contact__card {
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
  }
}
