/* ==========================================================================
   Certify — Official AI Academy Bangladesh Workshop Certificate Portal
   Modern, Ultra-Responsive, Zero-Framework Vanilla CSS Design System
   WCAG 2.1 AA Compliant • Mobile-First Responsive Architecture
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Brand Colors (Modern Royal Purple Palette) */
  --primary: #6546b3;
  --primary-hover: #5435a2;
  --primary-active: #45268f;
  --primary-gradient: linear-gradient(135deg, #6546b3 0%, #7a58cb 100%);
  --primary-glow: rgba(101, 70, 179, 0.25);
  --primary-container: #ede7f8;
  --on-primary: #ffffff;
  --on-container: #220e54;

  /* Accent & Verification (Emerald Green) */
  --success: #15803d;
  --success-hover: #166534;
  --success-surface: #f0fdf4;
  --success-border: #bbf7d0;
  --success-glow: rgba(22, 163, 74, 0.2);

  /* WhatsApp Brand Colors */
  --whatsapp: #25d366;
  --whatsapp-hover: #1ebd5b;
  --whatsapp-surface: #ecfdf3;
  --whatsapp-border: #a7f3d0;
  --whatsapp-text: #065f46;

  /* Feedback Colors (Warning & Error) */
  --error: #dc2626;
  --error-surface: #fef2f2;
  --error-border: #fecaca;

  --warning: #b45309;
  --warning-surface: #fffbeb;
  --warning-border: #fde68a;

  /* Surface & Neutral Colors */
  --bg-gradient: radial-gradient(ellipse 90% 60% at 50% -15%, rgba(101, 70, 179, 0.08) 0%, rgba(244, 241, 250, 0.4) 60%, #faf8fc 100%);
  --surface: #ffffff;
  --surface-low: #f8f6fc;
  --surface-high: #f0eaf7;
  --surface-glass: rgba(255, 255, 255, 0.88);

  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --outline-soft: #f1edf7;
  --outline-subtle: #e2d9ee;
  --outline: #94a3b8;
  --outline-focus: #8b5cf6;

  /* Layered Drop Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px -2px rgba(33, 16, 60, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 24px -4px rgba(33, 16, 60, 0.08), 0 3px 8px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 40px -8px rgba(33, 16, 60, 0.12), 0 6px 16px -4px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 24px 64px -12px rgba(33, 16, 60, 0.09), 0 0 0 1px rgba(101, 70, 179, 0.06);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Foundation Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-gradient);
  background-color: #faf8fc;
  color: var(--ink);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background Subtle Dot Pattern Overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(101, 70, 179, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   3. Accessible Focus & Skip Link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 1000;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

button, input {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

svg {
  display: block;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   4. Application Header (Sticky Frosted Navbar)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--surface-glass);
  border-bottom: 1px solid var(--outline-soft);
  transition: background 0.2s, box-shadow 0.2s;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 36px);
  height: clamp(68px, 9vw, 84px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: opacity var(--transition-fast);
  min-width: 0;
}

.brand:hover {
  opacity: 0.88;
}

.brand-name {
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.25;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: break-word;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 211, 102, 0.1);
  color: #065f46;
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--whatsapp);
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: pulseGreen 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* WhatsApp Support Button */
.help-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid var(--whatsapp-border);
  color: var(--whatsapp-text);
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.help-button .whatsapp-icon {
  width: 18px;
  height: 18px;
  fill: var(--whatsapp);
  stroke: none;
  color: var(--whatsapp);
  transition: transform var(--transition-bounce);
}

.help-button:hover {
  background: var(--whatsapp-surface);
  border-color: var(--whatsapp);
  color: #047857;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.22);
  transform: translateY(-1px);
}

.help-button:hover .whatsapp-icon {
  transform: scale(1.15);
}

.help-button:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   5. Main Content Wrapper & Hero Section
   -------------------------------------------------------------------------- */
main {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 3.5vw, 36px) clamp(48px, 6vw, 72px);
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Intro / Hero */
.intro {
  text-align: center;
  margin: 0 auto clamp(28px, 4vw, 42px);
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  background: var(--primary-container);
  border: 1px solid rgba(101, 70, 179, 0.16);
  border-radius: 24px;
  padding: 6px 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(101, 70, 179, 0.08);
  margin-bottom: 8px;
}

.eyebrow .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

h1 {
  font-weight: 800;
  font-size: clamp(28px, 4.2vw + 4px, 44px);
  letter-spacing: -1.2px;
  line-height: 1.18;
  margin: 14px 0 12px;
  color: var(--ink);
}

.intro p {
  font-size: clamp(14px, 1.8vw, 15.5px);
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   6. Workspace Card (Interactive 2-Column Grid)
   -------------------------------------------------------------------------- */
.workspace {
  background: var(--surface);
  border: 1px solid rgba(101, 70, 179, 0.1);
  border-radius: 28px;
  display: grid;
  grid-template-columns: 46% 54%;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-normal);
}

.workspace:hover {
  box-shadow: 0 28px 72px -12px rgba(33, 16, 60, 0.12), 0 0 0 1px rgba(101, 70, 179, 0.1);
}

/* Left Visual Column */
.visual {
  background: radial-gradient(circle at 50% 38%, rgba(234, 221, 255, 0.6) 0%, rgba(243, 235, 255, 0.45) 55%, #f6f0fb 100%);
  position: relative;
  padding: clamp(32px, 4vw, 48px) clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid rgba(101, 70, 179, 0.08);
}

/* Ambient glow accent behind certificate */
.visual::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, transparent 70%);
  top: 15%;
  pointer-events: none;
  filter: blur(20px);
}

.art {
  width: 100%;
  max-width: 320px;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 24px rgba(84, 53, 162, 0.12));
  transition: transform var(--transition-bounce);
}

.art:hover {
  transform: translateY(-4px) scale(1.02);
}

.visual h2 {
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: -0.4px;
  font-weight: 700;
  margin: 22px 0 8px;
  text-align: center;
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.visual p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 290px;
  text-align: center;
  margin: 0;
  position: relative;
  z-index: 1;
}

.visual-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.v-feat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(101, 70, 179, 0.12);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.v-feat .icon {
  width: 13px;
  height: 13px;
  color: var(--success);
  stroke-width: 2.2;
}

/* Right Form Column */
.form-panel {
  padding: clamp(32px, 4.5vw, 48px) clamp(24px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 480px;
  background: #ffffff;
}

.step {
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.form-panel h2 {
  font-size: clamp(22px, 3vw, 27px);
  letter-spacing: -0.6px;
  font-weight: 700;
  margin: 8px 0 8px;
  color: var(--ink);
}

.description {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Form Field Styling */
.field {
  border: 1.5px solid var(--outline-subtle);
  border-radius: 14px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 60px;
  background: #ffffff;
  transition: all var(--transition-fast);
}

.field:hover {
  border-color: var(--primary);
}

.field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.field.has-error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15) !important;
}

.field label {
  position: absolute;
  top: -9px;
  left: 14px;
  background: #ffffff;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color var(--transition-fast);
  pointer-events: none;
}

.field:focus-within label {
  color: var(--primary);
}

.field.has-error label {
  color: var(--error) !important;
}

.field .icon {
  color: var(--muted);
  width: 20px;
  height: 20px;
  transition: color var(--transition-fast);
}

.field:focus-within .icon {
  color: var(--primary);
}

.field.has-error .icon {
  color: var(--error);
}

.field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 20px;
  padding-left: 4px;
}

.field-error-text {
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  margin: 8px 0 20px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-error-text .icon {
  width: 15px;
  height: 15px;
  color: var(--error);
}

/* Primary CTA Button */
.primary {
  width: 100%;
  min-height: 52px;
  border-radius: 26px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -2px rgba(101, 70, 179, 0.35);
  transition: all var(--transition-normal);
  text-decoration: none;
  cursor: pointer;
}

.primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.primary:hover {
  background: linear-gradient(135deg, #593ba6 0%, #6f4dc0 100%);
  box-shadow: 0 12px 30px -2px rgba(101, 70, 179, 0.45);
  transform: translateY(-2px);
}

.primary:hover::after {
  left: 100%;
}

.primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px -2px rgba(101, 70, 179, 0.3);
}

.primary:disabled {
  opacity: 0.8;
  cursor: wait;
  transform: none !important;
}

.primary .icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

/* --------------------------------------------------------------------------
   7. Result / Certificate Feedback Cards
   -------------------------------------------------------------------------- */
.result {
  margin-top: 22px;
  border-radius: 20px;
  padding: clamp(18px, 3vw, 24px);
  background: var(--success-surface);
  border: 1.5px solid var(--success-border);
  box-shadow: 0 6px 20px -3px rgba(21, 128, 61, 0.08);
  animation: slideFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.result[hidden] {
  display: none !important;
}

.result.error {
  background: var(--error-surface);
  border-color: var(--error-border);
  box-shadow: 0 6px 20px -3px rgba(220, 38, 38, 0.08);
}

.result.warning {
  background: var(--warning-surface);
  border-color: var(--warning-border);
  box-shadow: 0 6px 20px -3px rgba(180, 83, 9, 0.08);
}

.result-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.result-head > .icon {
  color: var(--success);
  width: 24px;
  height: 24px;
  margin-top: 1px;
  flex-shrink: 0;
  stroke-width: 2.2;
}

.result.error .result-head > .icon {
  color: var(--error);
}

.result.warning .result-head > .icon {
  color: var(--warning);
}

.result h3 {
  font-size: 15.5px;
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--ink);
}

.result p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin: 0;
  overflow-wrap: anywhere;
}

.result-meta {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Download CTA Button */
.download {
  margin-top: 16px;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  border: none;
  border-radius: 26px;
  min-height: 48px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 6px 18px -2px rgba(22, 163, 74, 0.35);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.download:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
  box-shadow: 0 8px 24px -2px rgba(22, 163, 74, 0.45);
  transform: translateY(-2px);
}

.download:active {
  transform: translateY(0);
}

.download .icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.download-feedback {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
}

.download-feedback .icon {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   8. Steps Explanation Section (Modern Interactive Cards)
   -------------------------------------------------------------------------- */
.steps {
  margin: clamp(48px, 6vw, 68px) 0 0;
}

.steps-heading-group {
  margin-bottom: 24px;
  text-align: left;
}

.steps-heading {
  font-size: clamp(19px, 2.5vw, 23px);
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 0 0 6px;
}

.steps-subheading {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

.step-item {
  background: var(--surface);
  border: 1px solid var(--outline-soft);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.step-item:hover {
  border-color: rgba(101, 70, 179, 0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.step-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.number {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary-container);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.step-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-low);
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.step-item:hover .step-icon-wrap {
  color: var(--primary);
  background: var(--primary-container);
}

.step-icon-wrap .icon {
  width: 17px;
  height: 17px;
}

.step-content h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin: 0 0 6px;
}

.step-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
footer {
  max-width: 1200px;
  width: 100%;
  margin: auto auto 0;
  padding: 24px clamp(16px, 3.5vw, 36px);
  border-top: 1px solid var(--outline-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.footer-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.footer-note .icon {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   10. Native Accessible Dialog
   -------------------------------------------------------------------------- */
dialog {
  border: 1px solid rgba(101, 70, 179, 0.15);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 36px);
  max-width: 480px;
  width: calc(100% - 32px);
  color: var(--ink);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.28);
  background: #ffffff;
  margin: auto;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

dialog h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0 0 14px;
  color: var(--ink);
}

dialog p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 14px;
}

dialog ul {
  padding-left: 20px;
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

dialog li {
  margin-bottom: 8px;
}

dialog strong {
  color: var(--ink);
}

dialog .dialog-actions {
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   11. Micro-Animations & Keyframes
   -------------------------------------------------------------------------- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

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

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   12. Ultra-Responsive Layouts Across All Screen Sizes
   -------------------------------------------------------------------------- */

/* Large Tablets & Medium Laptops (max-width: 960px) */
@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .visual {
    padding: 36px 24px 28px;
    border-right: none;
    border-bottom: 1px solid rgba(101, 70, 179, 0.08);
  }

  .art {
    max-width: 250px;
  }

  .form-panel {
    padding: 36px 28px;
    min-height: auto;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* Small Tablets & Large Phones (max-width: 768px) */
@media (max-width: 768px) {
  .header-container {
    height: 72px;
  }

  .portal-badge {
    display: none; /* Conserve space on smaller screens */
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .step-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
  }

  .step-badge {
    flex-direction: column;
    gap: 10px;
  }

  .step-icon-wrap {
    display: none;
  }
}

/* Mobile Phones (max-width: 580px) */
@media (max-width: 580px) {
  .header-container {
    padding: 0 16px;
    height: 68px;
    gap: 10px;
  }

  .brand-name {
    font-size: 13.5px;
    line-height: 1.25;
  }

  .help-button {
    padding: 7px 12px;
    font-size: 12px;
    gap: 5px;
  }

  .help-button .whatsapp-icon {
    width: 16px;
    height: 16px;
  }

  main {
    padding: 20px 14px 40px;
  }

  .intro {
    margin-bottom: 24px;
  }

  h1 {
    font-size: 26px;
    letter-spacing: -0.8px;
    margin: 10px 0 8px;
  }

  .intro p {
    font-size: 13.5px;
  }

  .workspace {
    border-radius: 20px;
  }

  .visual {
    padding: 24px 16px 20px;
  }

  .art {
    max-width: 200px;
  }

  .visual h2 {
    font-size: 17px;
    margin-top: 14px;
  }

  .visual p {
    font-size: 12.5px;
  }

  .visual-features {
    gap: 6px;
  }

  .v-feat {
    padding: 4px 10px;
    font-size: 11px;
  }

  .form-panel {
    padding: 24px 16px;
  }

  .form-panel h2 {
    font-size: 21px;
  }

  .description {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .field {
    height: 56px;
    padding: 0 12px;
  }

  .field input {
    font-size: 14px;
  }

  .primary {
    min-height: 48px;
    font-size: 14px;
    padding: 12px 18px;
  }

  .download {
    min-height: 46px;
    font-size: 13.5px;
  }

  .step-item {
    padding: 16px;
  }

  .step-content h3 {
    font-size: 14px;
  }

  .step-content p {
    font-size: 12.5px;
  }

  footer {
    padding: 20px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
  }
}

/* Extra Small Mobile Devices (e.g., iPhone SE, Galaxy Fold 320px–360px) */
@media (max-width: 375px) {
  .header-container {
    padding: 0 12px;
    height: 64px;
  }

  .brand-name {
    font-size: 12.5px;
  }

  .help-button {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .art {
    max-width: 170px;
  }

  .form-panel {
    padding: 20px 12px;
  }

  .field {
    height: 52px;
    padding: 0 10px;
  }
}

/* High-Resolution Screens & Ultra-Wide Desktops (min-width: 1440px) */
@media (min-width: 1440px) {
  main {
    max-width: 1200px;
    padding-top: 52px;
  }

  .workspace {
    min-height: 540px;
  }
}

/* --------------------------------------------------------------------------
   13. Reduced Motion Support (Accessibility)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .pulse-indicator {
    animation: none;
  }

  .primary::after {
    display: none;
  }
}
