/* ==========================================================================
   iSocial24 — form.css
   Styles for start-project.html. Tokens come from style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page shell
   -------------------------------------------------------------------------- */
.brief {
  padding-top: 118px;
  padding-bottom: clamp(4rem, 8vw, 7rem);
  background:
    linear-gradient(180deg, var(--sky-soft) 0, rgba(228,243,255,0) 520px),
    var(--white);
}

.brief__grid {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* --------------------------------------------------------------------------
   2. Aside — the pitch
   -------------------------------------------------------------------------- */
.brief__aside { position: sticky; top: 108px; }

.brief__title {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.brief__lede {
  font-size: var(--fs-lede);
  color: var(--navy-60);
  max-width: 44ch;
}

.brief__values { margin: 2rem 0 0; }
.brief__values > div {
  padding: .9rem 0;
  border-top: 1px solid var(--marble);
}
.brief__values > div:last-child { border-bottom: 1px solid var(--marble); }
.brief__values dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .15rem;
}
.brief__values dd { margin: 0; font-size: .9rem; color: var(--navy-60); }

.brief__alt { margin-top: 1.75rem; font-size: .9rem; color: var(--navy-60); }
.brief__alt a { font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sky); text-decoration-thickness: 2px; }
.brief__alt a:hover { text-decoration-color: var(--yellow); }

/* --------------------------------------------------------------------------
   3. Form card
   -------------------------------------------------------------------------- */
.brief__form {
  background: var(--white);
  border: 1px solid var(--marble);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.75rem);
  box-shadow: var(--shadow-card);
}

/* --------------------------------------------------------------------------
   4. Step indicator
   -------------------------------------------------------------------------- */
.steps {
  display: flex; flex-wrap: wrap; gap: .35rem 1.5rem;
  list-style: none; margin: 0 0 2rem; padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--marble);
}
.step {
  display: flex; align-items: center; gap: .55rem;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy-40);
  transition: color .3s var(--ease);
}
.step__dot {
  width: 18px; height: 9px;
  border-radius: var(--arch);
  background: var(--marble);
  flex: none;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.step.is-active { color: var(--navy); }
.step.is-active .step__dot { background: var(--sky); }
.step.is-done { color: var(--navy); }
.step.is-done .step__dot { background: var(--yellow); }

/* --------------------------------------------------------------------------
   5. Panels
   -------------------------------------------------------------------------- */
.panel {
  border: 0; margin: 0; padding: 0;
  display: none;
}
.panel.is-active { display: block; animation: panelIn .4s var(--ease); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.panel__legend { padding: 0; margin-bottom: 1.75rem; }
.panel__count {
  display: block;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy-40);
  margin-bottom: .35rem;
}
.panel__title {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.panel__actions {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--marble);
}

/* --------------------------------------------------------------------------
   6. Fields
   -------------------------------------------------------------------------- */
.field { margin-bottom: 1.35rem; }

.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}

.field label,
.field__label {
  display: block;
  font-weight: 700;
  font-size: .93rem;
  margin-bottom: .5rem;
  color: var(--navy);
}

.req { color: var(--sky); }
.opt { font-weight: 400; color: var(--navy-40); font-size: .85rem; }

.field__hint {
  display: block;
  font-weight: 400;
  font-size: .82rem;
  color: var(--navy-40);
  margin: .4rem 0 0;
}
.field__label .field__hint { margin-top: .2rem; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.select select {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--marble);
  border-radius: var(--r-sm);
  padding: .85rem 1rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: var(--navy-40); }

.field input:hover,
.field textarea:hover,
.select select:hover { border-color: var(--sky); }

.field input:focus,
.field textarea:focus,
.select select:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(84,188,255,.22);
}

/* Invalid state is set by JS on submit, not while typing */
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #C2263F;
  background: #FEF6F7;
}

/* Custom select chevron */
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer; }
.select::after {
  content: "";
  position: absolute; right: 1.1rem; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. Chips (service multi-select)
   -------------------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.chip { position: relative; margin: 0; }
.chip input {
  position: absolute; opacity: 0;
  width: 100%; height: 100%; margin: 0;
  cursor: pointer;
}
.chip span {
  display: block;
  padding: .6rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--navy-60);
  box-shadow: inset 0 0 0 1px var(--marble);
  transition: all .25s var(--ease);
}
.chip:hover span { color: var(--navy); box-shadow: inset 0 0 0 1px var(--sky); }
.chip input:checked + span {
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--navy);
}
.chip input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   8. Consent checkbox
   -------------------------------------------------------------------------- */
.check {
  display: grid; grid-template-columns: auto 1fr; gap: .75rem;
  align-items: start;
  font-weight: 400 !important;
  font-size: .93rem;
  color: var(--navy-60) !important;
  cursor: pointer;
}
.check input {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; margin: 0;
  border: 1px solid var(--marble);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  transition: all .2s var(--ease);
  flex: none;
}
.check input:checked {
  background: var(--navy);
  border-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12.5 5.5 5.5L20 6.5'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.check input[aria-invalid="true"] { border-color: #C2263F; }

/* --------------------------------------------------------------------------
   9. Errors
   -------------------------------------------------------------------------- */
.err {
  margin: .45rem 0 0;
  font-size: .85rem;
  font-weight: 500;
  color: #C2263F;
}
.err::before { content: "↑ "; }

.form-error {
  margin: 1.25rem 0 0;
  padding: .9rem 1.1rem;
  border-radius: var(--r-sm);
  background: #FEF6F7;
  border: 1px solid #F3C9D1;
  color: #8E1B2E;
  font-size: .9rem;
}

/* Honeypot — off-screen, never focusable */
.hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   10. Submitting / success
   -------------------------------------------------------------------------- */
.btn.is-busy { pointer-events: none; opacity: .7; }
.btn.is-busy::after {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.done { text-align: center; padding: clamp(1.5rem, 4vw, 3rem) 0; }
.done__mark {
  width: 68px; height: 68px;
  margin: 0 auto 1.5rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  animation: pop .5s var(--ease);
}
.done__mark svg { width: 30px; height: 30px; }
@keyframes pop {
  from { transform: scale(.7); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.done h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 800;
  margin-bottom: .75rem;
}
.done p { color: var(--navy-60); max-width: 44ch; margin-inline: auto; }
.done__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2rem; }

/* --------------------------------------------------------------------------
   11. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .panel.is-active, .done__mark { animation: none; }
}
