/* Starta ett projekt — builds on the tokens and header in styles.css */

.inquiry {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
}

/* slow-moving brand glow behind everything */
.glow {
  position: fixed;
  inset: -20%;
  z-index: -3;
  background:
    radial-gradient(40% 45% at 75% 35%, rgba(6,139,255,.28), transparent 70%),
    radial-gradient(35% 40% at 20% 85%, rgba(168,212,255,.10), transparent 70%),
    linear-gradient(180deg, #1a1230 0%, var(--ink) 70%);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  to { transform: translate(-4%, 3%) scale(1.05); }
}

.grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
}

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

.flow {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 120px var(--gutter) 64px;
}

.steps,
.done {
  width: 100%;
  max-width: 1040px;
}

.progress-label {
  margin: 0 0 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ice);
}

.step {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.js .step { display: none; }
.js .step.is-active { display: block; }

.question {
  display: block;
  padding: 0;
  margin: 0 0 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(44px, 8.5vw, 136px);
  line-height: .92;
  letter-spacing: -0.055em;
}

.hint {
  margin: 0 0 40px;
  max-width: 520px;
  font-size: 17px;
  color: rgba(247,245,255,.72);
}

/* letters slide up into place when a step opens */
.question .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.45em);
  transition:
    opacity .5s var(--ease) calc(var(--i) * 18ms),
    transform .8s var(--ease) calc(var(--i) * 18ms);
}

.question .word { display: inline-block; white-space: nowrap; }
.is-shown .question .char { opacity: 1; transform: none; }

.step .hint,
.step .chips,
.step .field,
.step .fields {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease) .25s, transform .7s var(--ease) .25s;
}

.step.is-shown .hint,
.step.is-shown .chips,
.step.is-shown .field,
.step.is-shown .fields { opacity: 1; transform: none; }

.step.is-leaving {
  opacity: 0;
  transform: translateY(-24px);
  transition: opacity .35s ease, transform .35s ease;
}

/* ---------- choice chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip { position: relative; cursor: pointer; }

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border: 1.5px solid rgba(247,245,255,.35);
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  transition: border-color .2s, background .25s, color .25s, transform .25s var(--ease);
}

/* check mark that grows in when picked */
.chip span::before {
  content: "";
  width: 0;
  height: 10px;
  margin-right: -10px;
  border-radius: 2px;
  background: currentColor;
  transition: width .25s var(--ease), margin .25s var(--ease);
}

.chip:hover span { border-color: var(--pixel); transform: translateY(-2px); }

.chip input:checked + span {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.chip input:checked + span::before { width: 10px; margin-right: 0; }

.chip input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

/* ---------- text fields ---------- */

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 40px;
}

.field { display: block; position: relative; }
.field--wide { grid-column: 1 / -1; }

.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ice);
}

.field__label em { font-style: normal; opacity: .7; text-transform: none; letter-spacing: 0; }

.field input,
.field textarea {
  width: 100%;
  padding: 8px 0 12px;
  border: 0;
  border-bottom: 1.5px solid rgba(247,245,255,.3);
  border-radius: 0;
  background: transparent;
  color: var(--pixel);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
  outline: none;
  transition: border-color .2s;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
}

.field input::placeholder,
.field textarea::placeholder { color: rgba(247,245,255,.3); }

/* blue line that draws across on focus */
.field::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}

.field:focus-within::after { transform: scaleX(1); }
.field.is-invalid input { border-bottom-color: #ff8a8a; }

.error {
  min-height: 1.5em;
  margin: 20px 0 0;
  font-size: 15px;
  color: #ff9c9c;
}

/* ---------- controls ---------- */

.controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.controls .pill { font-size: 16px; padding: 16px 28px; cursor: pointer; font-family: var(--body); }
.pill--ghost { background: transparent; color: var(--pixel); }
.pill--ghost::after { display: none; }
.controls [data-back][hidden] { display: none; }

.enter-hint {
  font-size: 14px;
  color: rgba(247,245,255,.45);
}

.pill.is-busy { opacity: .7; pointer-events: none; }

/* ---------- done ---------- */

.done .question { margin-bottom: 24px; }

.done__text {
  max-width: 560px;
  margin: 0 0 40px;
  font-size: 19px;
  color: rgba(247,245,255,.85);
}

.done .pill { font-family: var(--body); font-size: 16px; padding: 16px 28px; cursor: pointer; }

.done__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* white card so phone cameras read the code easily */
.qr {
  display: inline-block;
  margin: 0 0 32px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(6, 139, 255, .25);
}

.qr canvas { display: block; image-rendering: pixelated; border-radius: 8px; }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .flow { align-items: start; padding-top: 112px; }
  .fields { grid-template-columns: 1fr; gap: 28px; }
  .chip span { padding: 13px 18px; font-size: 16px; }
  .enter-hint { display: none; }
  .controls { position: sticky; bottom: 16px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
  .question .char,
  .step .hint, .step .chips, .step .field, .step .fields,
  .step.is-leaving {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
