/* ============================================================================
   Scene: FINALE — "Your idea is next." and the contact form.
   ----------------------------------------------------------------------------
   Default (no JS / reduced motion): a normal two-column contact section.
   With motion, js/scenes/finale.js adds .is-traced and scrubs the reveal:
   two points of light trace the form card's outline from the top edge, meet at
   the bottom, then the card fills and its fields arrive. Not pinned, by design:
   anchor jumps to #contact must always land on a usable form.
   ========================================================================== */

.finale {
  position: relative;
  isolation: isolate;
  padding-block: clamp(110px, 16vh, 190px) var(--sec-pad);
  --card: 1;
}
.finale-glow {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 52% at 72% 52%, var(--accent-glow), transparent 70%),
    radial-gradient(30% 40% at 14% 30%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
  opacity: 0.55;
}

.finale-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.finale-copy { display: grid; gap: 22px; align-content: center; }
.finale-title { max-width: 9ch; }
.finale-sub { color: var(--ink-2); max-width: 40ch; font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.6; }
.finale .contact-direct { margin-top: 18px; }

.form-wrap { position: relative; }
.finale .form {
  position: relative;
  background: color-mix(in srgb, var(--surface) calc(var(--card) * 100%), transparent);
  border-color: color-mix(in srgb, var(--line) calc(var(--card) * 100%), transparent);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, calc(var(--card) * 0.8));
}
.form-trace,
.trace-pt { display: none; }

/* ---------------------------------------------------- motion (JS-enabled) */
.finale.is-traced .form-trace {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.form-trace path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.finale.is-traced .trace-pt {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 26%, var(--accent) 58%, transparent 72%);
  box-shadow: 0 0 18px 5px var(--accent-glow), 0 0 60px 16px color-mix(in srgb, var(--accent) 20%, transparent);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}

@media (max-width: 1100px) {
  .finale-inner { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .finale-title { max-width: 12ch; }
}
