/* ============================================================
   Vaultwave — Contact.
   Header and footer inherit styles.css untouched.

   The panel has two modes and they are not variations of one form:
   a brief and an application share almost no fields. So the mode owns
   its accent, its copy, its fields and the desk it reaches, and the
   switch between them is a real transition rather than a toggle.
   ============================================================ */

.scroll-rail {
  position: fixed;
  z-index: 60;
  inset: 0 0 auto 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
}
.scroll-rail i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .1s linear }

/* ---------- hero ---------- */

.ct-hero {
  position: relative;
  padding: 154px var(--pad) clamp(26px, 3.4vw, 44px);
  overflow: hidden;
  isolation: isolate;
}
/* Canvas is a replaced element: `inset` alone leaves it at 300x150. */
.ct-field {
  position: absolute;
  z-index: -1;
  display: block;
  top: 0; left: 0;
  width: 100%; height: 100%;
  mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 55%, transparent 100%);
}
.ct-hero-inner { position: relative; max-width: var(--max); margin-inline: auto }

.ct-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--accent-ink);
  font: 600 12px/1 "Manrope", Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .6s;
}
.ct-eyebrow::before { content: ""; width: 40px; height: 2px; background: currentColor }

.ct-hero h1 {
  margin: 0;
  max-width: 16ch;
  font: 600 clamp(38px, 5.4vw, 78px)/1 "Manrope", Arial, sans-serif;
  letter-spacing: -.06em;
  text-wrap: balance;
}
.ct-hero h1 em { font-weight: 400; color: var(--accent-ink); transition: color .6s }
.ct-lead { margin: 24px 0 0; max-width: 60ch; color: var(--muted); font-size: clamp(15px, 1.25vw, 18px); line-height: 1.7 }

/* The headline and sub swap with the mode, so they animate rather than
   blink from one sentence to another. */
[data-headline], [data-sub] { transition: opacity .3s, transform .3s cubic-bezier(.16, 1, .3, 1) }
.swapping [data-headline], .swapping [data-sub] { opacity: 0; transform: translateY(8px) }

/* ============================================================
   Mode theming. One pair of tokens drives the whole panel, so the
   accent moves in a single transition rather than a dozen.
   ============================================================ */

/* Three roles, not one colour. --accent tints borders and glows (3:1 is
   enough). --accent-ink is text on the page ground. --accent-pill is the
   fill behind white label text, which needs 4.5 on its own: white on the
   brand green is only 3.07, so the filled pill runs a deeper shade. It is
   theme-independent because an opaque fill supplies its own ground. */
:root, .ct-panel { --accent: #075cff; --accent-ink: #075cff; --accent-soft: #075cff14; --accent-pill: #075cff }
.ct-panel.is-apply { --accent: #2fa84f; --accent-ink: #237e3b; --accent-soft: #2fa84f16; --accent-pill: #25863f }
html[data-theme="dark"] .ct-panel { --accent: #58b8ff; --accent-ink: #58b8ff; --accent-soft: #58b8ff1f; --accent-pill: #075cff }
html[data-theme="dark"] .ct-panel.is-apply { --accent: #3fc46a; --accent-ink: #3fc46a; --accent-soft: #3fc46a1f; --accent-pill: #25863f }
/* The hero picks the mode up too, so the whole page shifts, not just the box. */
body { --accent-ink: #075cff }
body.is-apply { --accent-ink: #237e3b }
html[data-theme="dark"] body { --accent-ink: #58b8ff }
html[data-theme="dark"] body.is-apply { --accent-ink: #3fc46a }

/* ---------- layout ---------- */

.ct-main { padding: 0 var(--pad) clamp(70px, 8vw, 110px) }
.ct-grid {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .58fr);
  gap: clamp(24px, 3.4vw, 60px);
  align-items: start;
}

.ct-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow: hidden;
  transition: border-color .6s;
}
.ct-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 190px;
  background: radial-gradient(80% 100% at 20% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
  transition: background .6s;
}

/* ---------- the switch ---------- */

.mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: clamp(20px, 2.4vw, 28px) clamp(20px, 2.6vw, 34px) 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
}
/* One pill that slides, rather than two that light up. */
.mode-glide {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 100px;
  background: var(--accent-pill);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 34%, transparent);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), background .6s, box-shadow .6s;
}
.ct-panel.is-apply .mode-glide { transform: translateX(100%) }

.mode-tab {
  position: relative;
  padding: 12px 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 14px "Manrope", Arial, sans-serif;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: color .35s;
}
.mode-tab.is-on { color: #fff }
.mode-tab:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; border-radius: 100px }

/* ---------- completion meter ---------- */

.meter {
  height: 2px;
  margin: clamp(18px, 2.2vw, 26px) clamp(20px, 2.6vw, 34px) 0;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: calc(var(--done, 0) * 100%);
  background: var(--accent);
  transition: width .45s cubic-bezier(.16, 1, .3, 1), background .6s;
}

/* ---------- form ---------- */

.ct-form { position: relative; padding: clamp(20px, 2.6vw, 34px) }

/* Fields deal themselves in when a mode is entered. */
.pane .field, .pane .field-row {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s, transform .45s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(var(--i, 0) * 55ms + 60ms);
}
.pane.in .field, .pane.in .field-row { opacity: 1; transform: none }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; --i: 2 }
.field-row .field { opacity: 1; transform: none; transition: none }
.field { margin-bottom: 18px }

.field label {
  display: block;
  margin-bottom: 8px;
  font: 600 13px "Manrope", Arial, sans-serif;
}
.field label i { color: var(--accent-ink); font-style: normal; transition: color .6s }
.field label .opt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 5px }

.field input:not(.file-input),
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/1.5 "Manrope", Arial, sans-serif;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 110px }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7 }

.field input:not(.file-input):focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Invalid is announced on leaving a field or on submit, never mid-typing. */
.field.bad input, .field.bad select, .field.bad textarea { border-color: #c0392b }
html[data-theme="dark"] .field.bad input,
html[data-theme="dark"] .field.bad select,
html[data-theme="dark"] .field.bad textarea { border-color: #ff7b6b }

.err { margin: 7px 0 0; color: #97291c; font-size: 12.5px; line-height: 1.45 }
html[data-theme="dark"] .err { color: #ff9d90 }
.err:empty { display: none }

/* A gentle nudge, not an error: the address may well be right. */
.suggest {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.suggest:empty { display: none }
.suggest button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.suggest button:hover { opacity: .78 }

.counter { margin: 6px 0 0; color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; transition: color .25s }
.counter.over { color: #97291c; font-weight: 600 }
html[data-theme="dark"] .counter.over { color: #ff9d90 }

/* ---------- file drop ---------- */

/* Visually hidden but focusable and in the tab order: the drop zone is
   its label, so the keyboard reaches the real control. */
.file-input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.drop {
  display: grid;
  place-items: center;
  padding: clamp(22px, 3vw, 32px);
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: border-color .3s, background .3s, transform .3s cubic-bezier(.16, 1, .3, 1);
}
.drop:hover { border-color: var(--accent) }
.file-input:focus-visible + .drop { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px }
.drop.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01) }
.drop.has { border-style: solid; border-color: var(--accent) }

/* An author `display` beats the UA's `[hidden] { display: none }`, so the
   two states below would both paint at once — the file row and its clear
   button were showing over the empty prompt. State the reset explicitly. */
.drop-empty[hidden], .drop-has[hidden] { display: none }

.drop-empty { display: grid; justify-items: center; gap: 6px }
.drop-empty .ui-icon { width: 22px; height: 22px; color: var(--accent); transition: color .6s }
.drop-empty b { font: 600 14.5px "Manrope", Arial, sans-serif }
.drop-empty small { color: var(--muted); font-size: 12.5px }

.drop-has { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left }
.drop-has .ui-icon { flex: none; color: var(--accent) }
.drop-meta { flex: 1; min-width: 0 }
.drop-meta b { display: block; font: 600 14px "Manrope", Arial, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.drop-meta small { color: var(--muted); font-size: 12px }
.drop-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: color .25s, border-color .25s;
}
.drop-clear:hover { color: #c0392b; border-color: #c0392b }

/* ---------- honeypot ---------- */

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

/* ---------- send ---------- */

.ct-send {
  margin-top: 6px;
  background: var(--accent-pill);
  border-color: var(--accent-pill);
  transition: background .6s, border-color .6s, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.ct-send[disabled] { opacity: .6; pointer-events: none }
.ct-send:active { transform: translateY(1px) }

.form-status { margin: 16px 0 0; font-size: 14px; line-height: 1.6 }
.form-status:empty { display: none }
.form-status.ok { color: #14683a }
html[data-theme="dark"] .form-status.ok { color: #55d18c }
.form-status.bad { color: #97291c }
html[data-theme="dark"] .form-status.bad { color: #ff9d90 }

/* ---------- the side rail ---------- */

.ct-side { display: grid; gap: 14px }
.ct-block {
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.ct-k {
  margin: 0 0 6px;
  color: var(--blue);
  font: 600 11px/1 "Manrope", Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
html[data-theme="dark"] .ct-k { color: var(--sky) }

.ct-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: color .25s;
}
.ct-line:last-child { border-bottom: 0; padding-bottom: 0 }
a.ct-line:hover { color: var(--blue) }
html[data-theme="dark"] a.ct-line:hover { color: var(--sky) }
.ct-line-static { cursor: default }
.ct-line .ui-icon { flex: none; color: var(--blue) }
html[data-theme="dark"] .ct-line .ui-icon { color: var(--sky) }
.ct-line b { display: block; font: 600 14.5px "Manrope", Arial, sans-serif; overflow-wrap: anywhere }
.ct-line small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .ct-grid { grid-template-columns: 1fr; gap: 18px }
}
@media (max-width: 560px) {
  .ct-hero { padding-top: 116px }
  /* Two inputs side by side stop being usable at thumb width. */
  .field-row { grid-template-columns: 1fr; gap: 0 }
  .mode-tab { font-size: 13px; padding: 11px 6px }
}

@media (prefers-reduced-motion: reduce) {
  .mode-glide, .meter i, .drop, .ct-send,
  .field input, .field select, .field textarea,
  [data-headline], [data-sub] { transition: none }
  .pane .field, .pane .field-row { opacity: 1; transform: none; transition: none }
}
