/* ============================================================
   AegisX Intake Form — Design System & Styles
   Premium dark-mode tech agency aesthetic
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Palette */
  --c-bg:          #0a0e17;
  --c-surface:     #111827;
  --c-surface-alt: #1a2236;
  --c-border:      rgba(255, 255, 255, 0.06);
  --c-border-focus:rgba(99, 179, 237, 0.45);
  --c-text:        #e2e8f0;
  --c-text-muted:  #8892a4;
  --c-text-dim:    #4a5568;
  --c-accent:      #60a5fa;
  --c-accent-2:    #a78bfa;
  --c-accent-glow: rgba(96, 165, 250, 0.15);
  --c-danger:      #f87171;
  --c-success:     #34d399;
  --c-success-bg:  rgba(52, 211, 153, 0.08);

  /* Gradients */
  --g-accent:      linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  --g-cyan:        linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  --g-surface:     linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);

  /* Shadows */
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15);
  --shadow-glow:   0 0 40px rgba(96, 165, 250, 0.08);

  /* Spacing */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2.5rem;
  --sp-2xl: 4rem;

  /* Radii */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Ambient Background Blobs ---------- */
.bg-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: blobFloat 18s ease-in-out infinite;
}

.blob--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.blob--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
  top: 40%;
  right: -8%;
  animation-delay: -6s;
}

.blob--3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #34d399 0%, transparent 70%);
  bottom: -5%;
  left: 30%;
  animation-delay: -12s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 15px) scale(0.95); }
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  padding: var(--sp-xl) var(--sp-lg);
  text-align: left;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.logo__img {
  height: 40px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.3));
}

.logo__text {
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--c-text);
}

.logo__text strong {
  font-weight: 800;
  background: var(--g-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-tagline {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* ---------- Language Toggle ---------- */
.lang-toggle {
  position: absolute;
  top: var(--sp-xl);
  right: var(--sp-lg);
  z-index: 20;
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-xl);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  background: var(--c-surface-alt);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--t-fast);
  outline: none;
}

.lang-toggle:hover {
  background: rgba(26, 34, 54, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

.lang-toggle__icon {
  width: 14px;
  height: 14px;
  stroke: var(--c-text-muted);
  transition: stroke var(--t-fast);
}

.lang-toggle:hover .lang-toggle__icon {
  stroke: var(--c-text);
}

/* ---------- Progress Bar ---------- */
.progress-bar-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 28px;
  background: var(--c-surface);
  backdrop-filter: blur(8px);
  padding-right: var(--sp-sm);
}

.progress-bar {
  height: 3px;
  width: 0%;
  background: var(--g-accent);
  border-radius: 0 2px 2px 0;
  transition: width var(--t-base);
}

.progress-pct {
  flex-shrink: 0;
  min-width: 38px;
  margin-left: var(--sp-sm);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: right;
  background: var(--g-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all var(--t-base);
}

/* ---------- Main Container ---------- */
.main-container {
  position: relative;
  z-index: 5;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-lg) var(--sp-lg) var(--sp-2xl);
}

/* ---------- Info Tip Card ---------- */
.info-tip-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--sp-xl) var(--sp-lg) var(--sp-lg);
  margin-bottom: var(--sp-xl);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(167, 139, 250, 0.10) 50%, rgba(56, 189, 248, 0.06) 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-12px);
  animation: tipReveal 0.5s 0.15s ease-out forwards;
}

/* Glowing gradient border via pseudo-element */
.info-tip-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(135deg, #38bdf8 0%, #a78bfa 40%, #60a5fa 70%, #818cf8 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: borderPulse 4s ease-in-out infinite alternate;
}

/* Animated shimmer sweep */
.info-tip-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(56, 189, 248, 0.06) 46%,
    rgba(167, 139, 250, 0.08) 50%,
    rgba(56, 189, 248, 0.06) 54%,
    transparent 58%
  );
  animation: tipShimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tipReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes borderPulse {
  0%   { opacity: 0.6; }
  50%  { opacity: 1; }
  100% { opacity: 0.7; }
}

@keyframes tipShimmer {
  0%, 100% { transform: translateX(-80%) rotate(0deg); }
  50%      { transform: translateX(80%) rotate(0deg); }
}

.info-tip-card__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(167, 139, 250, 0.15) 100%);
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
  animation: iconGlow 3s ease-in-out infinite alternate;
}

@keyframes iconGlow {
  0%   { box-shadow: 0 0 8px rgba(56, 189, 248, 0.15); }
  100% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.35), 0 0 40px rgba(167, 139, 250, 0.1); }
}

.info-tip-card__content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.info-tip-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-tip-card__text {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--c-text-muted);
}

.info-tip-card__accent {
  color: #60a5fa;
  font-weight: 700;
}

.info-tip-card__close {
  position: absolute;
  top: var(--sp-sm);
  right: var(--sp-sm);
  z-index: 2;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--c-text-dim);
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--t-fast);
}

.info-tip-card__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--c-text);
}

.info-tip-card--hidden {
  display: none !important;
}

/* ---------- Form Sections ---------- */
.form-section {
  background: var(--c-surface);
  background-image: var(--g-surface);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-xl);
  box-shadow: var(--shadow-card), 0 0 15px rgba(96, 165, 250, 0.25);
  opacity: 0;
  transform: translateY(24px);
  animation: sectionReveal 0.6s ease-out forwards;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes sectionReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--c-border);
}

.section-number {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--g-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--sp-xs);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  margin-top: var(--sp-xs);
}

/* ---------- Fields Grid ---------- */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
}

.field--full {
  grid-column: 1 / -1;
}

/* ---------- Field Styles ---------- */
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-sm);
  letter-spacing: 0.02em;
}

.req {
  color: var(--c-accent);
}

/* Inputs & Textareas */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--c-text-dim);
}

input:hover,
textarea:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

input:focus,
textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-glow);
  background: rgba(26, 34, 54, 0.8);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Date inputs colour-scheme fix for dark mode */
input[type="date"] {
  color-scheme: dark;
}

/* Field validation states */
.field--error input,
.field--error textarea {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.field-error {
  display: none;
  font-size: 0.78rem;
  color: var(--c-danger);
  margin-top: var(--sp-xs);
}

.field--error .field-error {
  display: block;
}

/* ---------- Radio & Checkbox Cards ---------- */
.radio-group,
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}

.radio-group--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Hide native inputs */
.radio-card input,
.checkbox-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-card,
.checkbox-card {
  cursor: pointer;
  display: block;
}

.radio-card__body,
.checkbox-card__body {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.75rem 1rem;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}

.radio-card__body:hover,
.checkbox-card__body:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(26, 34, 54, 0.9);
}

.radio-card input:checked + .radio-card__body,
.checkbox-card input:checked + .checkbox-card__body {
  border-color: var(--c-accent);
  background: var(--c-accent-glow);
  box-shadow: 0 0 0 1px var(--c-accent);
}

.radio-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.radio-card__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--c-text-muted);
  transition: stroke var(--t-fast);
}

.radio-card input:checked + .radio-card__body .radio-card__icon svg {
  stroke: var(--c-accent);
}

.radio-card__label,
.checkbox-card__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text);
}

/* Checkbox custom check */
.checkbox-card__check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--c-text-dim);
  border-radius: 4px;
  position: relative;
  transition: all var(--t-fast);
}

.checkbox-card input:checked + .checkbox-card__body .checkbox-card__check {
  background: var(--c-accent);
  border-color: var(--c-accent);
}

.checkbox-card input:checked + .checkbox-card__body .checkbox-card__check::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- Consent ---------- */
.consent-label {
  display: flex !important;
  align-items: flex-start;
  gap: var(--sp-md);
  cursor: pointer;
  padding: var(--sp-lg);
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast);
}

.consent-label:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.consent-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--c-accent);
}

.consent-text {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}

.consent-text strong {
  color: var(--c-text);
}

/* ---------- Signature Canvas ---------- */
.signature-wrapper {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
}

#signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
  touch-action: none;
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
  padding: var(--sp-sm) var(--sp-md);
  border-top: 1px solid var(--c-border);
}

.signature-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.82rem;
  color: var(--c-text-dim);
  pointer-events: none;
  transition: opacity var(--t-fast);
}

.signature-wrapper.has-signature .signature-hint {
  opacity: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  outline: none;
  text-decoration: none;
}

.btn--primary {
  padding: 0.85rem 2rem;
  background: var(--g-accent);
  color: #0a0e17;
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 6px 25px rgba(96, 165, 250, 0.35);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(96, 165, 250, 0.2);
}

.btn--ghost {
  background: transparent;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
}

.btn--ghost:hover {
  color: var(--c-text);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.btn--sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

.btn__icon {
  display: inline-flex;
  transition: transform var(--t-fast);
}

.btn__icon svg {
  width: 18px;
  height: 18px;
}

.btn--primary:hover .btn__icon {
  transform: translateX(3px);
}

/* Loading state */
.btn--loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn--loading .btn__text::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: var(--sp-sm);
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Form Footer ---------- */
.form-footer {
  text-align: center;
  padding: var(--sp-lg) 0;
}

/* ---------- Success State ---------- */
.success-state {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  animation: sectionReveal 0.5s ease-out;
}

.success-state[hidden] {
  display: none !important;
}

.success-card {
  text-align: center;
  max-width: 480px;
  padding: var(--sp-2xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--sp-lg);
  background: var(--c-success-bg);
  border: 2px solid var(--c-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--c-success);
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.success-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--sp-md);
  color: var(--c-text);
}

.success-card p {
  color: var(--c-text-muted);
  font-size: 0.92rem;
  margin-bottom: var(--sp-xl);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
  color: var(--c-text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--c-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .main-container {
    padding: var(--sp-md) var(--sp-md) var(--sp-2xl);
  }

  .site-header {
    padding: var(--sp-lg) var(--sp-md);
  }

  .lang-toggle {
    top: var(--sp-lg);
    right: var(--sp-md);
  }

  .form-section {
    padding: var(--sp-lg);
  }

  .fields-grid {
    grid-template-columns: 1fr;
  }

  .radio-group,
  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .radio-group--3 {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .btn--lg {
    width: 100%;
    justify-content: center;
  }

  .success-card {
    padding: var(--sp-xl);
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: var(--sp-md);
  }

  .lang-toggle {
    top: var(--sp-md);
    right: var(--sp-md);
  }

  .logo__text {
    font-size: 1.4rem;
  }

  .header-tagline {
    font-size: 0.85rem;
  }

  .form-section {
    padding: var(--sp-md);
    border-radius: var(--r-md);
  }

  .consent-label {
    flex-direction: column;
    gap: var(--sp-sm);
  }

  #signature-canvas {
    height: 140px;
  }

  .success-card {
    padding: var(--sp-lg);
  }
}

/* ---------- Focus-visible for accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--c-surface-alt);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c-text-dim);
}

/* ---------- Glowing Icons ---------- */
.glowing-icon {
  stroke: var(--icon-color, var(--c-text-muted));
  animation: iconBreath 3s infinite alternate ease-in-out;
}

.radio-card input:checked + .radio-card__body .glowing-icon {
  stroke: var(--c-accent) !important;
  filter: drop-shadow(0 0 10px var(--c-accent)) !important;
  animation: none;
}

@keyframes iconBreath {
  0% {
    filter: drop-shadow(0 0 0px var(--icon-color, transparent)) opacity(0.75);
  }
  100% {
    filter: drop-shadow(0 0 10px var(--icon-color, transparent)) opacity(1);
  }
}

/* ---------- Glowing Elements ---------- */
.glowing-element {
  animation: elementBreath 4s infinite alternate ease-in-out;
}

.radio-card input:checked + .radio-card__body.glowing-element,
.checkbox-card input:checked + .checkbox-card__body.glowing-element,
.consent-label.glowing-element:has(input:checked) {
  border-color: var(--elem-color) !important;
  background: color-mix(in srgb, var(--elem-color) 12%, transparent) !important;
  box-shadow: 0 0 0 1px var(--elem-color), 0 0 12px color-mix(in srgb, var(--elem-color) 60%, transparent) !important;
  animation: none;
}

input.glowing-element:focus,
textarea.glowing-element:focus,
.signature-wrapper.glowing-element:focus-within {
  border-color: var(--elem-color) !important;
  background: color-mix(in srgb, var(--elem-color) 10%, #1a2236) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--elem-color) 25%, transparent), 0 0 12px color-mix(in srgb, var(--elem-color) 50%, transparent) !important;
  animation: none;
}

@keyframes elementBreath {
  0% {
    box-shadow: 0 0 0px transparent;
    border-color: var(--c-border);
  }
  100% {
    box-shadow: 0 0 8px color-mix(in srgb, var(--elem-color) 30%, transparent);
    border-color: color-mix(in srgb, var(--elem-color) 45%, var(--c-border));
  }
}

/* ---------- Glowing Text (Footer Link) ---------- */
.glowing-text {
  color: var(--elem-color, var(--c-text-muted));
  text-decoration: none;
  animation: textBreath 4s infinite alternate ease-in-out;
  transition: all var(--t-fast);
}

.glowing-text:hover, .glowing-text:focus {
  color: var(--c-accent);
  text-shadow: 0 0 12px var(--c-accent);
  animation: none;
}

@keyframes textBreath {
  0% {
    text-shadow: 0 0 0px transparent;
    opacity: 0.8;
  }
  100% {
    text-shadow: 0 0 8px color-mix(in srgb, var(--elem-color) 60%, transparent);
    opacity: 1;
  }
}
