/* ---------- contact opener: the form on the first screen ---------- */
.copen { position: relative; padding: clamp(28px, 4vh, 48px) 0 clamp(48px, 6vh, 72px); background: var(--paper); overflow: clip; }
.copen__bg { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 39px, rgba(1, 47, 94, .05) 39px 40px); animation: rule 30s linear infinite; }
.copen__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.copen__panel { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: clamp(24px, 3vw, 40px); box-shadow: 0 40px 70px -56px rgba(7, 26, 51, .55); }
.copen__h1 { font-size: clamp(2.2rem, 3.6vw, 3.4rem); }
.copen__lede { margin: 14px 0 22px; font-size: 1.08rem; color: var(--muted); }
.copen__frame .frame__clip { aspect-ratio: 4 / 5; max-height: min(78vh, 720px); }
.copen__frame img { transform: scale(1.12); }

.cform { display: grid; gap: 16px; }
.cform__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: .95rem; font-weight: 700; color: var(--navy); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid #C7D0DC; border-radius: 0; background: #fff; color: var(--text); font: 400 1rem/1.4 var(--sans); transition: border-color .25s, box-shadow .25s; }
.field textarea { min-height: 112px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 48px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23012F5E' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 18px center / 18px; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(169, 220, 184, .55); }
.field.has-err input, .field.has-err textarea { border-color: #8A3B3B; }
.field__err { margin: 0; font-size: .92rem; font-weight: 600; color: #8A3B3B; }
.cform__alert { margin: 0; padding: 10px 14px; border-left: 3px solid #8A3B3B; background: #F3EEEE; color: #6E2E2E; font-weight: 600; }
.cform__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform__foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.cform__foot p { margin: 0; font-size: .93rem; color: var(--muted); }
.form-done { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px; background: var(--sage); color: var(--sage-ink); }
.form-done p { margin: 0; }
@media (max-width: 1000px) {
  .copen__grid { grid-template-columns: minmax(0, 1fr); }
  .copen__frame .frame__clip { aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) { .cform__row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- what happens next ---------- */
.next { overflow: clip; }
.next__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.next__head .lede { margin: 0; }
.next__track { --g: clamp(24px, 4vw, 56px); position: relative; }
.next__line { position: absolute; top: 21px; left: 22px; right: calc((100% - 2 * var(--g)) / 3 - 22px); height: 2px; background: var(--sage-2); transform-origin: 0 50%; }
.next__steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g); }
.next__steps b { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 22px; background: var(--navy); color: #fff; font: 500 1.2rem/1 var(--serif); }
.next__steps h3 { margin-bottom: 8px; }
.next__steps p { margin: 0; color: var(--muted); }
.next__steps li { position: relative; padding: 0 0 26px; }
.next__steps li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--line) 0 18px, transparent 18px 26px); animation: dash 6s linear infinite; }
@keyframes dash { to { background-position: 52px 0; } }
@media (max-width: 800px) {
  .next__head { grid-template-columns: minmax(0, 1fr); }
  .next__steps { grid-template-columns: minmax(0, 1fr); }
  .next__line { top: 22px; bottom: 22px; left: 21px; right: auto; width: 2px; height: auto; transform-origin: 50% 0; }
  .next__steps li { padding-left: 64px; }
  .next__steps b { position: absolute; left: 0; top: 0; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .copen__bg, .next__steps li::after { animation: none; } }
.copen__frame { position: relative; }
.copen__frame::before { content: ""; position: absolute; right: -14px; top: -14px; width: 52%; height: 46%; background: var(--sage); }
.copen__frame .frame__clip { z-index: 1; }
.copen__panel { position: relative; }
.copen__panel::after { content: ""; position: absolute; left: -1px; right: -1px; top: -4px; height: 4px; background: linear-gradient(90deg, transparent, var(--sage-2), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: panelSweep 5s ease-in-out infinite; }
@keyframes panelSweep { 0% { background-position: -60% 0; } 100% { background-position: 160% 0; } }
@media (max-width: 1000px) { .copen__frame { margin-right: 14px; } }
@media (prefers-reduced-motion: reduce) { .copen__panel::after { animation: none; } }

/* the route a message takes, drawn behind the steps */
.next__art { display: block; width: 100%; height: clamp(90px, 11vw, 160px); margin: -10px 0 24px; overflow: visible; }
.next__route { fill: none; stroke: var(--sage-2); stroke-width: 3; }
.next__trail { fill: none; stroke: var(--navy); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; opacity: .5; animation: trail 3s linear infinite; }
@keyframes trail { to { stroke-dashoffset: -64; } }
.next__plane path { fill: var(--navy); }
@media (prefers-reduced-motion: reduce) { .next__trail { animation: none; } }

@media (min-width: 1001px) and (max-height: 820px) {
  .copen { padding: 18px 0 40px; }
  .copen__panel { padding: 22px 30px 24px; }
  .copen__h1 { font-size: clamp(2rem, 2.9vw, 2.7rem); }
  .copen__lede { margin: 8px 0 14px; font-size: 1rem; }
  .cform { gap: 11px; }
  .field { gap: 5px; }
  .field input, .field select { min-height: 46px; padding-top: 9px; padding-bottom: 9px; }
  .field textarea { min-height: 76px; }
  .cform__foot .btn { min-height: 48px; }
  .copen__frame .frame__clip { max-height: calc(100svh - var(--hdr) - 70px); }
}
