/* Demo page — full dark-plum left / sticky light form right */

/* Minimal nav */
.demo-nav {
  position: relative;
  z-index: 10;
  padding: 22px 0;
  background: var(--brand-plum-deep);
}
.demo-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.demo-nav-logo img { height: 26px; display: block; filter: brightness(0) invert(1); }
.demo-nav-back {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 200ms ease;
}
.demo-nav-back:hover { color: #fff; }

/* Page-level: the form is sticky across hero + walkthrough.
   Plum bg is a full-bleed pseudo on .demo-page itself so it spans 100vw
   regardless of grid cell positioning. JS sets --plum-h to the hero height. */
.demo-page {
  background: var(--ink-1);
  position: relative;
}
.demo-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--plum-h, 720px);
  background: var(--brand-plum-deep);
  z-index: 0;
}
.demo-page::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--plum-h, 720px);
  background:
    radial-gradient(circle at 80% 20%, rgba(212,184,138,0.10), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(112,75,128,0.30), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.demo-page-grid {
  display: grid;
  grid-template-columns: 1fr minmax(380px, 460px);
  gap: 80px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

/* Left column wraps both hero block and walkthrough block */
.demo-left-col { display: flex; flex-direction: column; }

/* Full-width aurora + grid spanning the plum hero band.
   Positioned absolutely on .demo-page so it covers the full visual hero
   regardless of the two-column grid layout or mobile stacking. */
.demo-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--plum-h, 720px);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Hero block: plum bg comes from .demo-page::before */
.demo-hero-block {
  position: relative;
  padding: 80px 0 96px;
  color: #fff;
}
.demo-left-inner { position: relative; z-index: 3; max-width: 560px; padding-right: 32px; }

.demo-headline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #fff;
  margin: 0 0 24px;
  text-wrap: pretty;
}
.demo-headline em {
  font-style: italic;
  color: var(--brand-gold-soft);
  font-weight: 300;
}
.demo-subhead {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  margin: 0 0 40px;
}

/* Walkthrough block — light bg via parent .demo-page; just constrain content */
.demo-walkthrough-block {
  position: relative;
  padding: 96px 0 120px;
  max-width: 680px;
}
.demo-walkthrough-head { margin: 0 0 48px; }
.demo-walkthrough {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border-hair);
}
.demo-walkthrough li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-hair);
}
.demo-w-num {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--brand-plum);
  letter-spacing: 0.06em;
  font-weight: 600;
}
.demo-w-text {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink-9);
  letter-spacing: -0.01em;
}

/* Right column — itself sticky. We keep the grid cell tall via stretch,
   and stick the column inside the grid. */
.demo-right-col {
  position: sticky;
  top: 32px;
  align-self: start;
  padding: 80px 0 96px;
  z-index: 2;
}
.demo-form-card {
  width: 100%;
  background: var(--ink-0);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.05);
  border: 1px solid var(--border-hair);
}
.demo-form-head { margin-bottom: 28px; }
.demo-form-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-9);
  margin: 0 0 8px;
}
.demo-form-sub {
  font-size: 16px;
  color: var(--fg-secondary);
  margin: 0;
}
.demo-form { display: flex; flex-direction: column; gap: 16px; }
.demo-field { display: flex; flex-direction: column; gap: 6px; }
.demo-label {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-8);
  letter-spacing: -0.005em;
}
.demo-input {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink-9);
  padding: 12px 14px;
  border: 1px solid var(--border-hair);
  border-radius: 8px;
  background: var(--ink-0);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  outline: none;
}
.demo-input:focus {
  border-color: var(--brand-plum);
  box-shadow: 0 0 0 3px rgba(112, 75, 128, 0.12);
}
.demo-submit {
  margin-top: 8px;
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 14px 18px;
  font-size: 16px;
}
.demo-microcopy {
  font-size: 16px;
  color: var(--fg-secondary);
  margin: 8px 0 0;
  text-align: center;
  line-height: 1.45;
}

/* Success state */
.demo-success { text-align: center; padding: 24px 0; }
.demo-success-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brand-plum-tint);
  color: var(--brand-plum);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.demo-success-mark svg { width: 28px; height: 28px; }
.demo-success-h {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink-9);
}
.demo-success-p {
  font-size: 16px;
  color: var(--fg-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Stacked / mobile: kill stickiness, single column.
   At desktop the DOM order is hero/walkthrough then form. On mobile we want
   hero → form → walkthrough. We promote .demo-left-col children into the grid
   via display: contents and reorder via grid-row. */
@media (max-width: 980px) {
  .demo-page-grid { grid-template-columns: 1fr; gap: 0; }
  .demo-left-col { display: contents; }
  .demo-hero-block { grid-row: 1; padding: 60px 0 64px; }
  .demo-right-col { grid-row: 2; padding: 32px 0 56px; background: transparent; position: relative; top: auto; align-self: auto; }
  .demo-right-col::before { display: none; }
  .demo-walkthrough-block { grid-row: 3; padding: 64px 0 80px; max-width: none; }
  .demo-left-inner { padding-right: 0; max-width: none; }
  .demo-form-card { position: static; }
  .demo-walkthrough li { grid-template-columns: 48px 1fr; gap: 14px; padding: 20px 0; }
  .demo-w-text { font-size: 19px; }
}
