:root {
  --bg: #061018;
  --text: #e8f4f8;
  --muted: #8ba3b5;
  --teal: #00d4aa;
  --aqua: #38bdf8;
  --line: rgba(255, 255, 255, 0.1);
  --font: 'Montserrat', sans-serif;
  --radius: 20px;
  --panel: rgba(12, 28, 42, 0.78);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(180deg, #0a3a52 0%, #061018 45%, #020810 100%);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.partner-shell {
  width: min(640px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.partner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.partner-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  color: #042018;
  background: linear-gradient(115deg, var(--teal), var(--aqua));
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 212, 170, 0.28);
}

.partner-back:hover {
  color: #042018;
  filter: brightness(1.06);
}

.partner-progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  max-width: 220px;
  margin-left: auto;
}

.partner-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  border-radius: inherit;
  transition: width 0.4s ease;
}

.partner-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 28px 24px 24px;
  overflow: hidden;
}

.partner-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

.partner-title {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.partner-lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
}

.wizard {
  position: relative;
  min-height: 260px;
}

.wizard-step {
  display: none;
  animation: step-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wizard-step.is-active {
  display: block;
}

.wizard-step.is-exit {
  display: block;
  animation: step-out 0.28s ease both;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes step-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

.step-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.field {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(6, 16, 24, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field:focus {
  border-color: rgba(0, 212, 170, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.field::placeholder {
  color: rgba(139, 163, 181, 0.7);
}

textarea.field {
  min-height: 140px;
  resize: vertical;
}

.field-error {
  color: #ff8f8f;
  font-size: 0.82rem;
  margin-top: 8px;
  min-height: 1.2em;
}

.project-picks {
  display: grid;
  gap: 10px;
}

.project-pick {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(6, 16, 24, 0.45);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.project-pick:hover {
  border-color: rgba(0, 212, 170, 0.35);
  transform: translateY(-1px);
}

.project-pick.is-checked {
  border-color: rgba(0, 212, 170, 0.65);
  background: rgba(0, 212, 170, 0.1);
}

.project-pick input {
  margin-top: 3px;
  accent-color: var(--teal);
}

.project-pick span {
  font-weight: 600;
  font-size: 0.95rem;
}

.voice-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* .btn { display } overrides HTML [hidden] unless we force hide */
.btn[hidden],
[hidden] {
  display: none !important;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  color: #061018;
  background: var(--teal);
  box-shadow: 0 10px 28px rgba(0, 212, 170, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #1de0b8;
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(0, 212, 170, 0.4);
  color: var(--teal);
}

.btn-voice.is-listening {
  background: rgba(255, 106, 26, 0.2);
  border-color: rgba(255, 106, 26, 0.55);
  color: #ffb087;
  animation: voice-pulse 1s ease-in-out infinite;
}

@keyframes voice-pulse {
  50% { box-shadow: 0 0 0 6px rgba(255, 106, 26, 0.12); }
}

.voice-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.contacts-grid {
  display: grid;
  gap: 14px;
}

.success-view {
  display: none;
  text-align: center;
  animation: step-in 0.45s ease both;
}

.success-view.is-active {
  display: block;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 212, 170, 0.15);
  color: var(--teal);
  font-size: 1.6rem;
}

.success-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.success-text {
  color: var(--muted);
  margin-bottom: 28px;
}

.contact-card {
  text-align: left;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(6, 16, 24, 0.5);
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.contact-card a {
  color: var(--aqua);
  text-decoration: none;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 16, 0.72);
  backdrop-filter: blur(6px);
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #0c1c2a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: step-in 0.35s ease both;
}

.modal-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.modal-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ===== On-screen keyboard (large touch monitors only) ===== */
.osk {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 12px 12px 18px;
  background: rgba(6, 16, 24, 0.96);
  border-top: 1px solid rgba(0, 212, 170, 0.35);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.45);
}

.osk-keys {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.osk-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.osk-key {
  min-width: 42px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(12, 28, 42, 0.95);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.osk-key:active {
  background: rgba(0, 212, 170, 0.25);
  border-color: var(--teal);
}

.osk-key--action {
  min-width: 64px;
  font-size: 0.9rem;
}

.osk-key--space {
  flex: 1;
  min-width: 160px;
}

.osk-key--done {
  background: linear-gradient(115deg, var(--teal), var(--aqua));
  color: #042018;
  border-color: transparent;
  min-width: 96px;
}

.osk-key--lang,
.osk-key--shift {
  min-width: 72px;
  color: var(--aqua);
}

body.osk-open .partner-shell {
  padding-bottom: 280px;
}

@media (max-width: 899px) {
  .osk {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .partner-panel {
    padding: 22px 16px 18px;
  }

  .wizard-nav {
    flex-direction: column-reverse;
  }

  .wizard-nav .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-step,
  .success-view,
  .modal-card,
  .btn-voice.is-listening {
    animation: none !important;
  }
}
