/* Start Your Project: two-step enquiry form on a dark canvas that flows into the footer. */

.start { background: var(--navy); color: var(--white); }
.start__section { padding: clamp(112px, 9vw, 172px) 0 clamp(40px, 4vw, 80px); }
.start__grid {
  display: grid;
  grid-template-columns: minmax(0, 701px) minmax(0, 645px);
  justify-content: space-between;
  gap: 48px;
  align-items: start;
}
.start__intro { display: grid; gap: 20px; padding-top: clamp(0px, 2.5vw, 48px); }
.start__intro .eyebrow--rule { margin-bottom: -4px; }
.start__intro h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; }
.start__lead { font-size: var(--fs-lead); line-height: 1.4; }
/* Contact methods under the intro (48px below the lead, 24px between items) */
.start-contact { display: grid; gap: 24px; margin-top: clamp(12px, 1.5vw, 28px); }
.start-contact__item { display: flex; gap: 16px; align-items: flex-start; }
.start-contact__icon {
  width: 24px;
  height: 24px;
  margin-top: 4px;
  flex: none;
  fill: none;
  stroke: var(--text-on-dark-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.start-contact__body { display: grid; gap: 12px; min-width: 0; }
.start-contact__title { font-size: var(--fs-h3); line-height: 1.33; font-weight: 600; color: var(--white); }
.start-contact__link {
  justify-self: start;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.5;
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  transition: color var(--t-fast) var(--ease);
}
.start-contact__link:hover { color: var(--teal-200); text-decoration-thickness: 2px; }
.start [data-hero-step] { animation: rise 800ms var(--ease) both; animation-delay: calc(var(--i, 0) * 120ms + 100ms); }

/* ---------- Card ---------- */
.start__card {
  padding: clamp(24px, 2.5vw, 48px);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--navy);
}
.start-form__progress {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.js .start-form__progress { display: block; }
.start-form__progress[hidden] { display: none; }

.start-step { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 24px; }
/* Without JS both steps are visible one after another */
html:not(.js) .start-step + .start-step { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border); }
.js .start-step[hidden] { display: none; }
.start-step__head { display: grid; gap: 8px; padding: 0; margin: 0 0 24px; width: 100%; }  /* 24px head -> fields (Figma) */
.start-step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.33;
  text-transform: uppercase;
}
.start-step__sub { font-size: var(--fs-lead); line-height: 1.4; }

/* ---------- Project type choices ---------- */
.choices { display: grid; gap: 13px; }
.choices__label {
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.45;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 17px 24px 17px 25px;
  border: 1px solid rgba(12, 20, 29, 0.15);   /* light outline, as in Figma */
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.choice:hover { border-color: var(--teal); }
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(12, 20, 29, 0.15);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--white);
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.choice__box .icon { width: 20px; height: 20px; stroke-width: 1.75; opacity: 0; }
.choice__text { display: grid; gap: 4px; min-width: 0; }
.choice__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  line-height: 1.4;
  letter-spacing: -0.03em;
}
.choice__desc { font-size: var(--fs-body); line-height: 1.45; color: var(--text-muted); }

/* Selected: a 2px teal ring drawn over the 1px border (so the content never shifts).
   --ring is the half-sweep angle: the ring grows from the checkbox (left) up and down
   at once and closes on the right. Registered with @property so it can transition;
   browsers without it simply show the ring instantly. */
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.choice::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from 270deg, var(--teal) 0deg var(--ring), transparent var(--ring) calc(360deg - var(--ring)), var(--teal) calc(360deg - var(--ring)));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  --ring: 0deg;
  transition: --ring 260ms cubic-bezier(0.55, 0, 0.45, 1);
}
.choice:has(input:checked)::before { --ring: 180.5deg; transition: --ring 560ms cubic-bezier(0.65, 0, 0.35, 1); }
.choice input:checked + .choice__box { background: var(--teal); border-color: var(--teal); }
.choice input:checked + .choice__box .icon { opacity: 1; }
.choice:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 3px; }

/* ---------- Choice interaction (motion only; the static design is unchanged) ----------
   Press-in, a teal ripple from the pointer (js sets --rx/--ry + .is-rippling), a springy
   checkbox pop (.is-popping) and a tick that draws itself in. */
.choice {
  isolation: isolate;
  transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease), transform 180ms var(--ease);
}
.choice:hover .choice__box { border-color: var(--teal); }
.choice:active { transform: scale(0.99); }
/* Ripple: a growing radial gradient painted inside the card (no overflow clipping needed,
   so the selection ring and the focus outline are never cut off) */
@property --rip { syntax: "<length>"; inherits: false; initial-value: 0px; }
.choice::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), var(--teal) var(--rip), transparent calc(var(--rip) + 1px));
  opacity: 0;
  pointer-events: none;
}
.choice.is-rippling::after { animation: choice-ripple 700ms cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes choice-ripple {
  0%   { opacity: 0.16; --rip: 0px; }
  60%  { opacity: 0.08; }
  100% { opacity: 0;    --rip: 640px; }
}

.choice__box { transition: background-color 220ms var(--ease), border-color 220ms var(--ease), transform 220ms var(--ease); }
.choice.is-popping .choice__box { animation: choice-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes choice-pop {
  0%   { transform: scale(0.8); }
  55%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
/* The tick (m5 12.5 4.5 4.5L19 7.5, ~20 units long) draws in; unchecking erases it quickly */
.choice__box .icon {
  opacity: 1;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 140ms ease-in;
}
.choice input:checked + .choice__box .icon { stroke-dashoffset: 0; transition: stroke-dashoffset 320ms cubic-bezier(0.65, 0, 0.35, 1) 90ms; }

/* ---------- Price note beside Continue (step 1) ---------- */
.start-info {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  font-size: 0.875rem;
  line-height: 24px;
  color: var(--text-muted);
}
.start-info[hidden] { display: none; }
.start-info__icon { flex: none; width: 24px; height: 24px; color: var(--star); }
.start-info.is-changing .start-info__text { animation: info-in 360ms var(--ease); }
.start-info.is-changing .start-info__icon { animation: info-icon 480ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes info-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes info-icon { 0% { transform: scale(0.6) rotate(-20deg); } 60% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .choice:active { transform: none; }
  .choice.is-rippling::after, .choice.is-popping .choice__box,
  .start-info.is-changing .start-info__text, .start-info.is-changing .start-info__icon { animation: none; }
  .choice__box .icon, .choice input:checked + .choice__box .icon,
  .choice::before, .choice:has(input:checked)::before { transition: none; }
}

/* ---------- Fields ---------- */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.03em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--navy);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  font-size: 1rem;
  line-height: 24px;
  color: var(--navy);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { height: 78px; min-height: 78px; resize: vertical; }
.field ::placeholder { color: var(--text-muted); opacity: 0.7; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 142, 173, 0.3); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field select:required:invalid { color: rgba(77, 82, 102, 0.7); }
.select { position: relative; }
.select select { padding-right: 44px; cursor: pointer; text-overflow: ellipsis; }
.select .icon {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  pointer-events: none;
}
.field-error { font-size: 0.875rem; line-height: 1.4; color: #b3261e; }
.field-error[hidden] { display: none; }

/* ---------- Actions ---------- */
.start-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: 8px;
}
.start-form__actions--end { justify-content: flex-end; }
.back-link {
  padding: 12px 0;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 20px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.back-link:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 5px; }
/* Without JS both steps are visible, so "Back" is meaningless */
html:not(.js) .back-link,
html:not(.js) [data-next],
html:not(.js) .start-form__progress { display: none; }

.start-done { display: grid; gap: 20px; justify-items: start; padding-block: 24px; }
.start-done[hidden] { display: none; }
.start-done h2 { font-size: var(--fs-h3); font-weight: 600; }
.start-done p { font-size: var(--fs-lead); line-height: 1.4; }

/* ---------- Footer sits directly on the dark canvas ---------- */
.start ~ .site-footer { margin-top: 0; padding-top: clamp(48px, 5.2vw, 100px); }

@media (max-width: 1023px) {
  .start__grid { grid-template-columns: minmax(0, 1fr); }
  .start__intro { padding-top: 0; }
  .start__intro h1 { max-width: 14ch; }
}
@media (max-width: 559px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .choice { gap: 16px; padding-inline: 16px; }
  .start-form__actions { flex-direction: column-reverse; align-items: stretch; }
  .start-form__actions--end { align-items: stretch; }
  .start-form__actions .btn { width: 100%; }
  .start-info { order: 1; margin-right: 0; }   /* column-reverse: keeps the price note above Continue */
}
