/* =========================================================
   SoftBlock – "Discuss your goals" page
   Everything is scoped under .dg  (no clash with header/footer).
   Class names avoid the words card / panel / tile / box on purpose,
   because the shared dark theme restyles those globally.
   ========================================================= */
.dg {
  --ink: #15182d;
  --muted: #69708a;
  --line: rgba(35, 39, 77, 0.12);
  --violet: #5142f5;
  --pink: #e52e9a;
  --grad: linear-gradient(115deg, #493bfa, #9b28e0 60%, #e52e9a);
  --grad-text: linear-gradient(100deg, #4c40f6 0%, #a52cda 54%, #e52e9a 100%);
  --surface: #ffffff;
  --field: #ffffff;
  --ok: #12805c;
  --bad: #d92d20;
  --font: "DM Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Manrope", "DM Sans", "Segoe UI", system-ui, sans-serif;

  position: relative;
  overflow-x: clip;
  padding-bottom: 96px;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #f4f3ff 0%, #ffffff 520px);
  -webkit-font-smoothing: antialiased;
}
.dg *,
.dg *::before,
.dg *::after {
  box-sizing: border-box;
}
/* :where() keeps the reset at zero specificity so the margins below still win */
.dg :where(h1, h2, h3, p, ul, ol) {
  margin: 0;
  padding: 0;
}
.dg :where(ul, ol) {
  list-style: none;
}
.dg :where(a) {
  color: inherit;
  text-decoration: none;
}
.dg-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

/* ---------- decorative glows ---------- */
.dg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.dg-glow-a {
  width: 460px;
  height: 460px;
  top: -140px;
  left: -120px;
  background: rgba(115, 98, 255, 0.28);
}
.dg-glow-b {
  width: 420px;
  height: 420px;
  top: 40px;
  right: -140px;
  background: rgba(229, 46, 154, 0.2);
}

/* ---------- hero ---------- */
.dg-hero {
  padding: 56px 0 48px;
}
.dg-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.dg-crumb a:hover {
  color: var(--violet);
}
.dg-crumb i {
  font-size: 10px;
  opacity: 0.7;
}
.dg-crumb span {
  color: var(--ink);
  font-weight: 600;
}
.dg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 12px var(--font);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet);
}
.dg-eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}
.dg h1 {
  max-width: 860px;
  margin-top: 16px;
  font: 800 clamp(34px, 5vw, 58px) / 1.08 var(--display);
  letter-spacing: -0.035em;
  color: var(--ink);
}
.dg-grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dg-lead {
  max-width: 640px;
  margin-top: 20px;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
  color: var(--muted);
}
.dg-assure {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
}
.dg-assure li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.dg-assure i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(81, 66, 245, 0.1);
  color: var(--violet);
  font-size: 16px;
}

/* ---------- body layout ---------- */
.dg-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
}
.dg-aside {
  position: sticky;
  top: 110px;
}
.dg-h2 {
  font: 800 24px / 1.25 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.dg-h2-sm {
  margin-top: 40px;
  font-size: 18px;
}
.dg-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* steps */
.dg-steps {
  position: relative;
  margin-top: 24px;
  display: grid;
  gap: 26px;
}
.dg-steps::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(81, 66, 245, 0.35), rgba(229, 46, 154, 0.25));
}
.dg-steps li {
  position: relative;
  display: flex;
  gap: 18px;
}
.dg-num {
  flex: none;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font: 800 14px var(--display);
  box-shadow: 0 8px 18px -6px rgba(81, 66, 245, 0.6);
}
.dg-steps h3 {
  font: 700 16px / 1.3 var(--display);
  color: var(--ink);
}
.dg-steps p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* chips */
.dg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.dg-chips button {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: 600 13px var(--font);
  color: var(--ink);
  cursor: pointer;
  transition: 0.2s ease;
}
.dg-chips button:hover {
  border-color: rgba(81, 66, 245, 0.5);
  color: var(--violet);
  transform: translateY(-1px);
}
.dg-chips button.is-active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}
.dg-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.dg-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.dg-points i {
  color: var(--violet);
}

/* ---------- form surface ---------- */
.dg-surface {
  padding: 38px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 34px 70px -34px rgba(73, 59, 250, 0.35);
}
.dg-sub {
  margin: 6px 0 26px;
  font-size: 14px;
  color: var(--muted);
}
.dg-req {
  color: var(--pink);
  font-weight: 700;
}
.dg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
}
.dg-full {
  grid-column: 1 / -1;
}
.dg-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.dg-field input,
.dg-field select,
.dg-field textarea {
  width: 100%;
  padding: 0 16px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--field);
  font: 500 15px var(--font);
  color: var(--ink);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.dg-field textarea {
  height: auto;
  min-height: 140px;
  padding: 14px 16px;
  line-height: 1.6;
  resize: vertical;
}
.dg-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='%2369708a'%3E%3Cpath d='M1.6 5.3a1 1 0 0 1 1.4 0L8 10.3l5-5a1 1 0 1 1 1.4 1.4l-5.7 5.7a1 1 0 0 1-1.4 0L1.6 6.7a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.dg-field input::placeholder,
.dg-field textarea::placeholder {
  color: #a0a6bb;
}
.dg-field input:hover,
.dg-field select:hover,
.dg-field textarea:hover {
  border-color: rgba(81, 66, 245, 0.35);
}
.dg-field input:focus,
.dg-field select:focus,
.dg-field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(81, 66, 245, 0.15);
}
.dg-field .is-invalid {
  border-color: var(--bad);
}
.dg-field .is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.14);
}
.dg-err {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bad);
}
.dg-err:empty {
  display: none;
}
.dg-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dg-count {
  flex: none;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.dg-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* status + button */
.dg-status {
  min-height: 0;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}
.dg-status.is-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(217, 45, 32, 0.08);
  color: var(--bad);
}
.dg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font: 700 15px var(--font);
  cursor: pointer;
  box-shadow: 0 18px 32px -14px rgba(81, 66, 245, 0.7);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s;
}
#dgForm .dg-btn {
  width: 100%;
}
.dg-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px -14px rgba(81, 66, 245, 0.8);
}
.dg-btn:focus-visible {
  outline: 3px solid rgba(81, 66, 245, 0.45);
  outline-offset: 3px;
}
.dg-btn:disabled {
  opacity: 0.75;
  cursor: progress;
  transform: none;
}
.dg-btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.dg-btn-quiet:hover {
  box-shadow: none;
  border-color: rgba(81, 66, 245, 0.5);
}
.dg-spin {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dg-rot 0.7s linear infinite;
}
.dg-btn.is-loading .dg-spin {
  display: inline-block;
}
.dg-btn.is-loading i {
  display: none;
}
@keyframes dg-rot {
  to {
    transform: rotate(360deg);
  }
}
.dg-fine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* success */
.dg-done {
  padding: 28px 8px;
  text-align: center;
}
.dg-done[hidden] {
  display: none;
}
.dg-done:focus {
  outline: none;
}
.dg-done-icon {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: rgba(18, 128, 92, 0.12);
  color: var(--ok);
  font-size: 38px;
}
.dg-done p {
  max-width: 440px;
  margin: 12px auto 0;
  line-height: 1.7;
  color: var(--muted);
}
.dg-done-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.dg-done-actions .dg-btn {
  margin-top: 0;
  padding-inline: 26px;
}

/* ---------- entrance animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .dg-hero > *,
  .dg-aside,
  .dg-formwrap {
    opacity: 0;
    transform: translateY(18px);
    animation: dg-up 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .dg-hero > :nth-child(2) {
    animation-delay: 0.05s;
  }
  .dg-hero > :nth-child(3) {
    animation-delay: 0.12s;
  }
  .dg-hero > :nth-child(4) {
    animation-delay: 0.19s;
  }
  .dg-hero > :nth-child(5) {
    animation-delay: 0.26s;
  }
  .dg-aside {
    animation-delay: 0.3s;
  }
  .dg-formwrap {
    animation-delay: 0.38s;
  }
}
@keyframes dg-up {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- dark theme (html[data-theme="dark"], set by the header toggle) ---------- */
html[data-theme="dark"] .dg {
  --ink: #f1f2ff;
  --muted: #a9adc6;
  --line: rgba(255, 255, 255, 0.12);
  --surface: #1d1e3a;
  --field: #15162e;
}
html[data-theme="dark"] .dg {
  background: #15162e !important;
}
html[data-theme="dark"] .dg .dg-eyebrow,
html[data-theme="dark"] .dg .dg-assure i,
html[data-theme="dark"] .dg .dg-points i {
  color: #a79bff;
}
html[data-theme="dark"] .dg .dg-glow {
  opacity: 0.45;
}
html[data-theme="dark"] .dg h1,
html[data-theme="dark"] .dg .dg-h2,
html[data-theme="dark"] .dg .dg-steps h3 {
  color: #ffffff !important;
}
html[data-theme="dark"] .dg .dg-grad {
  color: transparent !important;
}
html[data-theme="dark"] .dg .dg-surface {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: none;
}
html[data-theme="dark"] .dg .dg-field input,
html[data-theme="dark"] .dg .dg-field select,
html[data-theme="dark"] .dg .dg-field textarea {
  background-color: var(--field) !important;
  color: #fff !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .dg .dg-field .is-invalid {
  border-color: var(--bad) !important;
}
html[data-theme="dark"] .dg .dg-chips button {
  background: transparent;
  color: #e6e8ff;
}
html[data-theme="dark"] .dg .dg-chips button.is-active {
  background: var(--grad);
  color: #fff;
}
html[data-theme="dark"] .dg .dg-err,
html[data-theme="dark"] .dg .dg-status.is-error {
  color: #ff7a70 !important;
}
html[data-theme="dark"] .dg .dg-btn {
  color: #fff !important;
}
html[data-theme="dark"] .dg .dg-btn-quiet {
  color: #fff !important;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .dg-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }
  .dg-aside {
    position: static;
    order: 2;
  }
  .dg-formwrap {
    order: 1;
  }
}
@media (max-width: 640px) {
  .dg-wrap {
    width: min(1180px, 100% - 32px);
  }
  .dg-hero {
    padding: 36px 0 32px;
  }
  .dg-surface {
    padding: 24px 18px;
    border-radius: 20px;
  }
  .dg-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dg-assure {
    flex-direction: column;
    gap: 12px;
  }
}
