/* Production UX layer — intentionally small and reversible. */

:root {
  --focus-ring: 0 0 0 3px rgba(22,119,238,.28);
}

html { scroll-padding-top: 86px; }

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a, button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #49bfff;
  outline-offset: 3px;
}

section[id] {
  scroll-margin-top: 86px;
}

.projectCard,
.capabilityCard,
.problem,
.build,
.compareBox {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

@media (hover:hover) and (pointer:fine) {
  .projectCard:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(14,42,78,.10);
  }
  .capabilityCard:hover,
  .problem:hover,
  .compareBox:hover {
    transform: translateY(-2px);
  }
}

.cinematicLinks a[aria-current="true"] {
  color: #fff;
}
.cinematicNav.is-scrolled .cinematicLinks a[aria-current="true"] {
  color: #1677ee;
}

.skipLink {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  transform: translateY(-150%);
  background: #fff;
  color: #09182a;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  font-weight: 800;
}
.skipLink:focus {
  transform: translateY(0);
}

@media (max-width: 850px) {
  .cinematicLinks a,
  .primaryHeroAction,
  .secondaryHeroAction,
  .projectLink,
  .opsButton,
  .ctaBtn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

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


/* ===== Contact conversation flow ===== */
button.navContact,
button.ctaBtn {
  font: inherit;
  cursor: pointer;
}

button.navContact {
  border: 0;
}

.contactModal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.contactModal.is-open {
  display: flex;
}

.contactModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 31, .76);
  backdrop-filter: blur(9px);
}

.contactModalPanel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(90vh, 860px);
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  color: #09182a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34);
  padding: clamp(26px, 4vw, 46px);
}

.contactClose {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid #dce7f2;
  border-radius: 50%;
  background: #f7faff;
  color: #10223b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.contactKicker {
  font: 850 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
  color: #1677ee;
  margin-bottom: 14px;
}

.contactModalHeader h2 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -.045em;
  margin: 0 52px 16px 0;
}

.contactModalHeader p {
  margin: 0;
  max-width: 620px;
  color: #61738a;
  font-size: 17px;
  line-height: 1.7;
}

.contactForm {
  margin-top: 30px;
}

.contactFormGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contactForm label {
  display: grid;
  gap: 8px;
  font-weight: 750;
  font-size: 14px;
}

.contactForm .contactFull {
  grid-column: 1 / -1;
}

.contactForm input,
.contactForm textarea {
  width: 100%;
  border: 1px solid #cfdcea;
  border-radius: 10px;
  background: #fbfdff;
  color: #09182a;
  padding: 14px 15px;
  font: inherit;
  font-size: 16px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.contactForm textarea {
  resize: vertical;
  min-height: 150px;
}

.contactForm input:focus,
.contactForm textarea:focus {
  outline: 0;
  border-color: #1677ee;
  box-shadow: 0 0 0 4px rgba(22, 119, 238, .12);
  background: #fff;
}

.contactForm input[aria-invalid="true"],
.contactForm textarea[aria-invalid="true"] {
  border-color: #d64848;
  box-shadow: 0 0 0 3px rgba(214, 72, 72, .10);
}

.contactFormFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
}

.contactPrivacy {
  margin: 0;
  color: #7a889b;
  font-size: 12px;
  line-height: 1.55;
}

.contactSubmit,
.contactDone {
  border: 0;
  border-radius: 9px;
  background: #0a1b34;
  color: #fff;
  font-weight: 850;
  font-size: 14px;
  padding: 14px 18px;
  cursor: pointer;
}

.contactSubmit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 220px;
}

.contactSubmit:hover,
.contactDone:hover {
  background: #1677ee;
}

.contactSubmit[disabled] {
  opacity: .6;
  cursor: wait;
}

.contactStatus {
  min-height: 24px;
  margin-top: 14px;
  color: #b23a3a;
  font-size: 13px;
  font-weight: 650;
}

.contactSuccess {
  padding: 18px 0 4px;
  text-align: center;
}

.contactSuccessIcon {
  width: 64px;
  height: 64px;
  margin: 6px auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f6ef;
  color: #16835c;
  font-size: 30px;
  font-weight: 900;
}

.contactSuccess h3 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -.035em;
}

.contactSuccess p {
  margin: 0 0 22px;
  color: #61738a;
  font-size: 16px;
}

body.contact-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .contactModal {
    padding: 10px;
    align-items: flex-end;
  }

  .contactModalPanel {
    width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
    padding: 26px 20px 24px;
  }

  .contactFormGrid {
    grid-template-columns: 1fr;
  }

  .contactForm .contactFull {
    grid-column: auto;
  }

  .contactFormFooter {
    align-items: stretch;
    flex-direction: column;
  }

  .contactSubmit {
    width: 100%;
  }

  .contactModalHeader h2 {
    margin-right: 42px;
  }
}
