/* 5. Contact: the lit city behind the form, then the footer.
   Not a scene: a normal section on navy (the business scene above ends in a honeycomb wipe to
   navy, so the top edge must stay exactly navy). contact.js draws the map and the hexagons and
   moves the layers at different rates as the section scrolls by. */

.s-contact {
  --navy-rgb: 11, 37, 69;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + clamp(56px, 9vh, 110px)) var(--gut) clamp(80px, 12vh, 140px);
  background: var(--navy); color: #fff;
}

/* ---------- the backdrop ---------- */
.c-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.c-map { position: absolute; z-index: 0; left: 0; top: 0; opacity: 0.85; will-change: transform; }
.c-map svg { display: block; }
.c-layer { position: absolute; z-index: 2; inset: 0; will-change: transform; }
.c-pin { position: absolute; width: 0; height: 0; }
.c-pin svg { position: absolute; }
.c-pin .ring { position: absolute; opacity: 0; }
/* Navy over the map (and under the hexagons, which stay pure yellow): solid at the top edge, where
   the wipe hands over, and at the bottom; deeper behind the copy, which the hexagons keep out of. */
.c-veil {
  position: absolute; z-index: 1; inset: 0;
  background:
    linear-gradient(180deg, rgb(var(--navy-rgb)) 0, rgba(var(--navy-rgb), 0) clamp(140px, 24vh, 260px)),
    linear-gradient(0deg, rgb(var(--navy-rgb)) 0, rgba(var(--navy-rgb), 0) clamp(100px, 16vh, 180px)),
    radial-gradient(ellipse 52% 64% at 24% 54%, rgba(var(--navy-rgb), 0.9) 0, rgba(var(--navy-rgb), 0.72) 48%, rgba(var(--navy-rgb), 0.18) 100%);
}

/* ---------- layout ---------- */
.contact-in {
  position: relative; width: 100%; max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); align-items: center;
  gap: clamp(48px, 7vw, 120px);
}
.c-copy, .c-side { will-change: transform; }

/* ---------- the copy ---------- */
.c-eb { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--sun); margin-bottom: 26px; }
.c-ebx { width: 16px; height: 18px; background: var(--sun); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.s-contact h2.hl { font-size: clamp(46px, 5.7vw, 84px); }
.s-contact .c-copy .sub { margin-top: 26px; max-width: 22em; font-size: clamp(18px, 1.7vw, 26px); color: rgba(255, 255, 255, 0.84); }

.c-next { margin-top: clamp(40px, 6vh, 64px); }
.c-next .eyebrow { font-size: 13px; color: rgba(255, 255, 255, 0.5); margin-bottom: 20px; }
.c-steps { list-style: none; display: grid; gap: 14px; }
.c-steps li { position: relative; display: flex; align-items: center; gap: 18px; font-weight: 700; font-size: clamp(17px, 1.35vw, 19px); letter-spacing: -0.01em; color: #fff; }
/* the thread between the numbered hexagons */
.c-steps li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 46px; width: 2px; height: 12px; border-radius: 1px; background: rgba(255, 255, 255, 0.18); }
.c-n { width: 44px; height: 44px; }
.c-n svg { position: absolute; inset: 0; }
.c-n b { font-size: 18px; z-index: 1; }

/* ---------- the card ---------- */
.c-card {
  position: relative; overflow: hidden;
  border-radius: 36px; background: #fff; color: var(--ink);
  padding: clamp(28px, 2.9vw, 42px);
  box-shadow: 0 30px 70px rgba(3, 12, 26, 0.42), 0 3px 10px rgba(3, 12, 26, 0.18);
}
.c-head { margin-bottom: 24px; }
.c-head h3 { font-weight: 900; font-size: 30px; letter-spacing: -0.035em; line-height: 1.05; color: var(--navy); }
.c-head p { margin-top: 8px; font-weight: 500; font-size: 15px; color: var(--ink3); }
.c-req { color: var(--blue); font-weight: 800; }
.c-opt { margin-left: 4px; font-weight: 600; color: var(--ink3); }

.c-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.c-f { min-width: 0; }
.c-wide { grid-column: 1 / -1; }
.c-f label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 14px; line-height: 1.2; color: var(--ink2); }
.c-f input, .c-f select, .c-f textarea {
  display: block; width: 100%; height: 56px; padding: 0 17px;
  border: 2px solid var(--line); border-radius: 16px; background: var(--bg);
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--ink);
  outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s;
}
.c-f input, .c-f select, .c-f textarea, .c-done { scroll-margin: calc(var(--nav-h) + 48px) 0 140px; }
.c-f textarea { height: auto; min-height: 120px; padding: 15px 17px; line-height: 1.45; resize: vertical; }
.c-f select { padding-right: 46px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%234B5B6F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 22px; }
.c-f select:invalid, .c-f select.empty { color: var(--ink3); }
.c-f select option { color: var(--ink); }
.c-f ::placeholder { color: var(--ink3); font-weight: 500; opacity: 1; }
.c-f input:hover, .c-f select:hover, .c-f textarea:hover { border-color: #D3DBE5; }
.c-f input:focus, .c-f select:focus, .c-f textarea:focus { border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 4px rgba(45, 156, 235, 0.16); }
.c-f input:focus-visible, .c-f select:focus-visible, .c-f textarea:focus-visible { outline: none; }
.c-f input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #EAF5FD inset; -webkit-text-fill-color: var(--ink); }
.c-f input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 4px rgba(45, 156, 235, 0.16), 0 0 0 40px #fff inset; }
.c-f [aria-invalid='true'] { border-color: var(--red); background-color: #FFF6F6; }
.c-f [aria-invalid='true']:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.14); }
.c-err { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-weight: 600; font-size: 14px; line-height: 1.3; color: #C8282E; }
.c-err:empty { display: none; }
.c-err::before { content: ''; flex: none; width: 15px; height: 15px; margin-top: 1px; border-radius: 50%; background: currentColor url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4.2v4.6M8 11.6v.01' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 15px no-repeat; }

/* The honeypot: out of sight, out of the tab order, ignored by screen readers. */
.c-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.c-fail { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 13px 16px; border-radius: 16px; background: #FDECEC; color: #B42328; font-weight: 700; font-size: 15px; line-height: 1.3; }
.c-fail[hidden] { display: none; }
.c-fail svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.c-send { width: 100%; margin-top: 24px; height: 60px; border-radius: 30px; font-size: 18px; }
.c-send:hover { transform: scale(1.02); }
.c-send .c-spin { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(15, 29, 46, 0.22); border-top-color: var(--ink); animation: c-spin 0.7s linear infinite; }
.c-send.busy { cursor: progress; transform: none; }
.c-send.busy .c-spin { display: block; }
.c-send.busy .arrow { display: none; }
.c-send:disabled { pointer-events: none; }
@keyframes c-spin { to { transform: rotate(360deg); } }
.c-note { margin-top: 14px; text-align: center; font-weight: 500; font-size: 14px; color: var(--ink3); }

/* ---------- sent ---------- */
.c-done { min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 8px; outline: none; }
.c-done[hidden] { display: none; }
.c-okh { width: 104px; height: 104px; margin-bottom: 30px; }
.c-done .hl { font-size: clamp(38px, 3.6vw, 50px); color: var(--navy); }
.c-done .hl .ln-i { white-space: normal; overflow-wrap: anywhere; text-wrap: balance; }
.c-done .sub { margin-top: 12px; font-size: 20px; color: var(--ink2); }

/* ---------- footer ---------- */
.foot { background: #081C36; color: #fff; padding: clamp(56px, 8vw, 88px) var(--gut) 0; }
.foot-in { max-width: 1240px; margin: 0 auto; }
.foot-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; padding-bottom: clamp(40px, 6vw, 64px); }
.foot-lockup { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 800; font-size: 26px; letter-spacing: -0.03em; border-radius: 10px; }
.foot-mk { display: flex; }
.foot-mk svg { height: 38px; width: auto; }
.foot-tag { margin-top: 14px; font-weight: 600; font-size: 17px; color: rgba(255, 255, 255, 0.6); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-right: -14px; }
.foot-nav a { display: flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 22px; font-weight: 700; font-size: 16px; color: rgba(255, 255, 255, 0.78); text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.foot-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; padding: 26px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, 0.1); font-weight: 600; font-size: 14px; color: rgba(255, 255, 255, 0.5); }

/* ---------- narrow: stacked, the form full width ---------- */
@media (max-width: 899px) {
  /* A band of lit city above the headline, and some between the copy and the card. */
  .s-contact { display: block; padding: calc(var(--nav-h) + 150px) 18px 64px; }
  .contact-in { grid-template-columns: minmax(0, 1fr); gap: 104px; }
  .c-copy { padding: 0 6px; }
  .c-veil {
    background:
      linear-gradient(180deg, rgb(var(--navy-rgb)) 0, rgba(var(--navy-rgb), 0) 180px),
      linear-gradient(0deg, rgb(var(--navy-rgb)) 0, rgba(var(--navy-rgb), 0) 120px),
      rgba(var(--navy-rgb), 0.38);
  }
}
@media (max-width: 560px) {
  .c-card { border-radius: 30px; padding: 26px 20px 24px; }
  .c-head h3 { font-size: 27px; }
  .c-grid { grid-template-columns: minmax(0, 1fr); }
  .c-eb { margin-bottom: 20px; }
  .s-contact h2.hl { font-size: clamp(42px, 12.4vw, 56px); }
  .s-contact .c-copy .sub { margin-top: 20px; }
  .c-done { min-height: 340px; }
  .foot-top { flex-direction: column; gap: 28px; }
  .foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin: 0 0 0 -14px; }
  .foot-base { flex-direction: column; gap: 6px; }
}

/* ---------- without JavaScript, or with reduced motion ---------- */
html:not(.js) .c-done, html:not(.js) .c-map { display: none; }
@media (prefers-reduced-motion: reduce) {
  .c-f input, .c-f select, .c-f textarea, .foot-nav a { transition: none; }
  .c-send .c-spin { animation-duration: 1.6s; }
}
