:root {
  --paper: #F5F5F2;
  --card: #fbfbf8;
  --ink: #262323;
  --ink-strong: rgba(38, 35, 35, 0.88);
  --ink-muted: rgba(38, 35, 35, 0.64);
  --ink-faint: rgba(38, 35, 35, 0.43);
  --rule: rgba(38, 35, 35, 0.12);
  --blue: #3198e2;
  --green: #3c9467;
  --amber: #b8782b;
  --sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
img { max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }

.contact-page {
  min-height: 100svh;
  padding-top: 76px;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(38, 35, 35, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 35, 35, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
}

/* Navigation */
.contact-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(22px, 3.4vw, 60px);
  border-bottom: 1px solid rgba(52, 52, 52, 0.115);
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}
.contact-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #343434;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  transform: translate(-50%, -50%);
}
.contact-nav-left,
.contact-nav-right { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.contact-nav-left { justify-content: flex-start; }
.contact-nav-right { justify-content: flex-end; }
.contact-nav a {
  color: #3f3f3c;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.contact-nav a:hover { color: #111; }
.contact-nav-right a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #272727;
  border-radius: 8px;
  background: linear-gradient(#555, #333);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  color: #fff !important;
}
.contact-menu-toggle,
.contact-mobile-menu { display: none; }

/* Intro */
.contact-hero {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: 72px 24px 54px;
  text-align: center;
}
.contact-hero h1 {
  max-width: 760px;
  margin: 0 auto;
  color: #343434;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.02;
  text-wrap: balance;
}
.contact-hero p {
  max-width: 670px;
  margin: 18px auto 0;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  text-wrap: balance;
}
.contact-hero p strong { color: var(--ink-strong); font-weight: 600; }
/* Deployment brief */
.contact-stage {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 38px;
  align-items: stretch;
  margin: 0 auto;
  padding: 0 24px 140px;
}
.contact-image-frame,
.contact-form-frame {
  padding: 10px;
  border: 1.5px solid #e8e7e5;
  border-radius: 14px;
  background: rgba(242, 242, 237, 0.5);
  box-shadow:
    1px 2px 2px #fff,
    1px 4px 5px #fff,
    2px 3px 4px rgba(152, 146, 140, 0.16) inset,
    0 18px 38px rgba(38, 35, 35, 0.06);
}
.contact-brief,
.contact-image-frame,
.contact-form-frame { height: 100%; }
.contact-image {
  position: relative;
  height: 100%;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #2d8fcf;
}
.contact-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 67% center;
  filter: saturate(0.86) contrast(0.96);
  transform: scale(1.012);
}
.contact-image-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 54, 75, 0.04), transparent 42%, rgba(17, 37, 30, 0.22)),
    linear-gradient(90deg, rgba(13, 65, 89, 0.08), transparent 55%);
}
.contact-signals {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 22px;
  display: grid;
  width: min(290px, calc(100% - 44px));
  gap: 7px;
}
.contact-signals > span {
  display: grid;
  min-height: 42px;
  grid-template-columns: 6px auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(18, 58, 52, 0.72);
  box-shadow: 0 11px 25px rgba(0, 0, 0, 0.12);
  color: #fff;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.contact-signals i { width: 6px; height: 6px; border-radius: 50%; background: #79d39c; box-shadow: 0 0 8px rgba(121, 211, 156, 0.7); }
.contact-signals span:last-child i { background: #e2b66f; box-shadow: 0 0 8px rgba(226, 182, 111, 0.66); }
.contact-signals small { color: rgba(255, 255, 255, 0.58); font-size: 9px; }
.contact-signals b { overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.contact-image-card {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 27px;
  left: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 10px;
  background: rgba(249, 249, 245, 0.88);
  box-shadow: 0 16px 34px rgba(18, 43, 34, 0.15);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.contact-image-card h2 { margin: 0; color: var(--ink-strong); font-size: 26px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.08; }
.contact-image-card p { margin: 14px 0 0; color: var(--ink-muted); font-size: 13px; font-weight: 500; line-height: 1.5; }
.contact-pixel-edge {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 10px;
  background: rgba(249, 249, 245, 0.84);
  clip-path: polygon(0 64%, 3% 42%, 6% 74%, 9% 39%, 13% 65%, 17% 44%, 21% 72%, 25% 38%, 30% 67%, 35% 45%, 40% 71%, 45% 41%, 50% 66%, 56% 38%, 61% 73%, 66% 43%, 72% 69%, 78% 39%, 84% 72%, 90% 43%, 95% 67%, 100% 38%, 100% 100%, 0 100%);
}
/* Blueprint form */
.contact-form-card {
  min-height: 650px;
  height: 100%;
  padding: 30px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
}
.contact-form-card [hidden] { display: none !important; }
.form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.form-heading > div > span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-heading h2 {
  margin: 9px 0 0;
  outline: 0;
  color: var(--ink-strong);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.form-heading small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}
.form-heading small i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.form-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 24px 0 26px;
}
.form-progress i { height: 2px; border-radius: 999px; background: rgba(38, 35, 35, 0.1); transition: background 220ms ease; }
.form-progress i.is-active { background: var(--green); }
#contact-form { display: flex; min-height: 480px; flex-direction: column; }
.form-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 14px; }
.form-grid--final { grid-template-columns: 1fr; }
.field { display: grid; min-width: 0; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
}
.field > span i { color: var(--ink-faint); font-family: var(--mono); font-size: 7px; font-style: normal; font-weight: 400; text-transform: uppercase; }
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 8px;
  outline: 0;
  background-color: #fff;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
input,
select { height: 46px; padding: 0 12px; }
textarea { min-height: 88px; padding: 12px; line-height: 1.5; resize: vertical; }
.textarea--compact { min-height: 64px; }
input::placeholder,
textarea::placeholder,
select.is-placeholder { color: var(--ink-faint); }
input:hover,
select:hover,
textarea:hover { border-color: rgba(38, 35, 35, 0.22); }
input:focus,
select:focus,
textarea:focus { border-color: rgba(49, 152, 226, 0.65); box-shadow: 0 0 0 3px rgba(49, 152, 226, 0.1); background-color: #fff; }
select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%),
    linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  cursor: pointer;
}
.function-field { gap: 10px; }
.form-step[data-step="1"] { display: grid; gap: 14px; }
.form-step[data-step="1"] textarea { min-height: 74px; }
.form-step[data-step="1"] .textarea--compact { min-height: 52px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice-grid label { min-width: 0; }
.choice-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice-grid span {
  display: flex;
  min-height: 35px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.choice-grid input:hover + span { border-color: rgba(38, 35, 35, 0.22); }
.choice-grid input:focus-visible + span { border-color: rgba(49, 152, 226, 0.65); box-shadow: 0 0 0 3px rgba(49, 152, 226, 0.1); }
.choice-grid input:checked + span { border-color: rgba(60, 148, 103, 0.42); background: rgba(231, 243, 235, 0.72); color: #28734e; }
.field-error { min-height: 14px; color: #a14d49; font-size: 10px; font-weight: 500; }
.conditional-field { margin: 0; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: auto; padding-top: 22px; }
.form-footer > p { display: flex; max-width: 270px; align-items: flex-start; gap: 8px; margin: 0; color: var(--ink-faint); font-size: 9px; font-weight: 500; line-height: 1.45; }
.form-footer > p > i { display: grid; width: 15px; height: 15px; flex: 0 0 auto; place-items: center; border: 1px solid var(--rule); border-radius: 50%; font-family: var(--mono); font-size: 8px; font-style: normal; }
.form-actions { display: flex; align-items: center; gap: 9px; }
.form-back,
.contact-submit {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 17px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.form-back { padding: 0 14px; border: 1px solid var(--rule); background: transparent; color: var(--ink-muted); }
.form-back:hover { background: rgba(38, 35, 35, 0.035); }
.contact-submit {
  padding: 0 17px;
  border: 1px solid #343431;
  background: linear-gradient(#565653, #393936);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  color: #fff;
}
.contact-submit:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.25) inset; }
.contact-submit:disabled { cursor: wait; opacity: 0.65; transform: none; }
.form-status { min-height: 14px; margin: 8px 0 0; color: #a14d49; font-size: 10px; }
.success-view { min-height: 588px; align-content: center; padding: 34px; outline: 0; }
.success-view:not([hidden]) { display: grid; }
.success-badge { display: inline-flex; width: fit-content; min-height: 28px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid rgba(60, 148, 103, 0.22); border-radius: 999px; background: rgba(231, 243, 235, 0.72); color: var(--green); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.success-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.success-view h2 { max-width: 390px; margin: 25px 0 0; color: var(--ink-strong); font-size: 42px; font-weight: 400; letter-spacing: -0.05em; line-height: 1.04; }
.success-view p { max-width: 400px; margin: 20px 0 0; color: var(--ink-muted); font-size: 15px; font-weight: 500; line-height: 1.55; }
.success-view a { display: inline-flex; width: fit-content; gap: 18px; margin-top: 32px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); color: var(--ink-strong); font-size: 13px; font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.form-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.contact-footer {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(22px, 3.4vw, 60px);
  border-top: 1px solid var(--rule);
  background: rgba(245, 245, 242, 0.76);
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 500;
}
.contact-footer nav { display: flex; gap: 22px; }
.contact-footer a { transition: color 180ms ease; }
.contact-footer a:hover { color: var(--ink); }
.footer-location { margin-left: 10px; opacity: 0.58; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 680ms cubic-bezier(0.23, 1, 0.32, 1), transform 680ms cubic-bezier(0.23, 1, 0.32, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 761px) {
  .contact-form-card { height: 712px; min-height: 712px; }
  #contact-form { height: 552px; min-height: 552px; }
  .success-view { height: 650px; min-height: 0; }
  .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 981px) {
  .contact-page {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .contact-page > main { min-height: 0; }
  .contact-hero {
    padding: clamp(20px, 3vh, 28px) 24px clamp(16px, 2vh, 22px);
  }
  .contact-hero h1 { max-width: 1000px; font-size: 26px; }
  .contact-hero p { max-width: 960px; margin-top: 12px; }
  .contact-stage { padding-bottom: clamp(14px, 2vh, 24px); }
  .contact-image,
  .contact-form-card { min-height: 712px; }
  .contact-footer { min-height: 60px; }
}

@media (min-width: 981px) and (max-height: 820px) {
  .contact-hero { padding: 12px 24px 10px; }
  .contact-hero h1 { max-width: 1000px; font-size: 26px; }
  .contact-hero p { max-width: 960px; margin-top: 7px; font-size: 13px; }
  .contact-stage { padding-bottom: 6px; }
  .contact-image-frame,
  .contact-form-frame { padding: 6px; }
  .contact-footer { min-height: 46px; }
}

@media (max-width: 980px) {
  .contact-stage { width: min(100%, 760px); grid-template-columns: 1fr; gap: 44px; }
  .contact-image { height: 580px; }
  .contact-form-card { min-height: 712px; }
}

@media (max-width: 760px) {
  .contact-page { padding-top: 72px; }
  .contact-nav { height: 72px; padding: 0 18px; }
  .contact-nav-left,
  .contact-nav-right { display: none; }
  .contact-menu-toggle { position: relative; display: block; width: 30px; height: 24px; margin-left: auto; padding: 0; border: 0; background: transparent; cursor: pointer; }
  .contact-menu-toggle span { position: absolute; right: 4px; left: 4px; height: 1.5px; background: var(--ink); transition: top 180ms ease, transform 180ms ease; }
  .contact-menu-toggle span:first-child { top: 9px; }
  .contact-menu-toggle span:last-child { top: 15px; }
  .contact-nav.menu-open .contact-menu-toggle span:first-child { top: 12px; transform: rotate(45deg); }
  .contact-nav.menu-open .contact-menu-toggle span:last-child { top: 12px; transform: rotate(-45deg); }
  .contact-mobile-menu { position: fixed; z-index: 90; top: 72px; right: 0; left: 0; display: grid; padding: 16px 22px 24px; border-bottom: 1px solid var(--rule); background: rgba(245, 245, 242, 0.97); box-shadow: 0 15px 30px rgba(38, 35, 35, 0.08); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-10px); transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease; }
  .contact-mobile-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .contact-mobile-menu a { padding: 12px 0; border-bottom: 1px solid var(--rule); color: #3f3f3c; font-size: 15px; text-align: center; }
  .contact-mobile-menu a:last-child { border-bottom: 0; }
  .contact-hero { padding: 60px 18px 46px; text-align: center; }
  .contact-hero h1 { margin-inline: auto; font-size: 23px; }
  .contact-hero p { font-size: 14px; }
  .contact-stage { gap: 34px; padding: 0 18px 56px; }
  .contact-image-frame,
  .contact-form-frame { padding: 7px; }
  .contact-image { height: 540px; }
  .contact-image-card { right: 16px; bottom: 20px; left: 16px; padding: 20px; }
  .contact-image-card h2 { font-size: 23px; }
  .contact-form-frame { height: auto; }
  .contact-form-card { height: auto; min-height: 0; padding: 24px 18px; }
  #contact-form { height: auto; min-height: 0; }
  .form-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .form-heading h2 { font-size: 26px; }
  .form-progress { margin: 20px 0 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: 1; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer > p { max-width: none; }
  .form-actions { width: 100%; justify-content: flex-end; }
  .contact-submit { flex: 1; }
  .success-view { min-height: 520px; padding: 20px; }
  .success-view h2 { font-size: 36px; }
  .contact-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 22px; }
}

@media (max-width: 430px) {
  .contact-hero h1 { font-size: 23px; }
  .contact-image { height: 510px; }
  .contact-signals { top: 17px; right: 14px; width: calc(100% - 28px); }
  .contact-signals > span { min-height: 39px; }
  .contact-image-card p { font-size: 12px; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-back,
  .contact-submit { width: 100%; }
  .contact-footer nav { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
