/* ==========================================================================
   Account Opening Process - 2x2 Bento Grid Layout (Design Reference Match)
   ========================================================================== */

.process {
  --navy-900: #1e2a6e;
  --navy-700: #243475;
  --blue-500: #3b66cf;
  --bg-base: #ffffff;
  --bg-subtle: #f8f9fc;
  --border: #eceef4;
  --border-hover: #d8dce8;
  --text-900: #0f172a;
  --text-600: #475569;
  --text-400: #94a3b8;
  --container-max: 1200px;
  --container-padding: 24px;
  --section-pad-y: clamp(72px, 8vw, 104px);

  background-color: var(--bg-subtle);
  padding: var(--section-pad-y) 0;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--navy-900);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow-x: clip;
}

.process * {
  box-sizing: border-box;
}

.process-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-padding);
}

/* ==========================================================================
   1. Section Header Pattern
   ========================================================================== */

.process-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 56px;
}

.process-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-400);
  margin-bottom: 12px;
}

.process-title {
  font-family: var(--font-sans, inherit);
  font-size: clamp(1.875rem, 3.5vw, 2.375rem);
  font-weight: 600;
  color: var(--navy-900) !important;
  line-height: 1.25;
  margin: 0 0 14px 0;
  letter-spacing: -0.02em;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

.process-title .highlight-blue {
  color: var(--blue-500) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  font-weight: inherit;
}

.process-subtitle {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-600);
  max-width: 560px;
  margin: 0 auto;
}

/* ==========================================================================
   2. 2x2 Bento Box Grid (Two in a Row with 1px Hairline Dividers)
   ========================================================================== */

.process-grid-container {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(30, 42, 110, 0.02);
}

.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.process-step {
  display: flex;
  flex-direction: column;
  padding: 40px 36px;
  background: var(--bg-base);
  transition: background-color 200ms ease;
  position: relative;
}

/* 1px Hairline Dividers: Vertical between cols, Horizontal between rows */
.process-step:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.process-step:nth-child(1),
.process-step:nth-child(2) {
  border-bottom: 1px solid var(--border);
}

/* Box Header: Icon on Left, Clean Step Pill on Right */
.process-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.process-icon {
  width: 24px;
  height: 24px;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: transform 250ms ease, color 250ms ease;
}

.process-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.process-circle {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy-900);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* Title & Description */
.process-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.35;
  margin: 0 0 10px 0;
  transition: color 250ms ease;
}

.process-card-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-600);
  margin: 0;
}

/* Inline Links */
.process-link {
  color: var(--navy-900);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(30, 42, 110, 0.35);
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.process-link:hover {
  color: var(--blue-500);
  text-decoration-color: var(--blue-500);
}

.process-link:focus-visible {
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
  border-radius: 2px;
}

.process-phone {
  white-space: nowrap;
}

/* Hover effect on box */
@media (hover: hover) and (pointer: fine) {
  .process-step:hover {
    background-color: #fafbfd;
  }

  .process-step:hover .process-icon {
    color: var(--blue-500);
    transform: translateY(-2px);
  }

  .process-step:hover .process-card-title {
    color: var(--blue-500);
  }
}

/* ==========================================================================
   3. Unified Help Bar
   ========================================================================== */

.process-footer {
  margin-top: 40px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 1px 3px rgba(30, 42, 110, 0.02);
}

.process-support {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9375rem;
  color: var(--text-600);
  line-height: 1.5;
}

.process-support-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--navy-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.process-support-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--navy-700);
  stroke-width: 2;
  fill: none;
}

.process-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--navy-900);
  color: #ffffff !important;
  border: 1px solid var(--navy-900);
  padding: 0 24px;
  height: 44px;
  line-height: 42px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.process-btn:hover {
  background-color: var(--navy-700);
  border-color: var(--navy-700);
  color: #ffffff !important;
  box-shadow: none;
}

.process-btn svg {
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.process-btn:hover svg {
  transform: translateY(2px);
}

.process-btn:focus-visible {
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
}

/* ==========================================================================
   4. Market Summaries Row
   ========================================================================== */

.process-reports {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.process-reports-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-400);
  white-space: nowrap;
}

.process-reports-pills {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.process-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-600);
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 200ms ease;
}

.process-pill-btn svg {
  color: var(--navy-700);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: color 200ms ease;
}

.process-pill-btn i {
  font-size: 11px;
  color: var(--text-400);
  transition: transform 200ms ease, color 200ms ease;
}

.process-report-text {
  transition: color 200ms ease;
}

.process-pill-btn:hover {
  border-color: var(--navy-900);
  color: var(--navy-900) !important;
  background: var(--bg-base);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(30, 42, 110, 0.05);
}

.process-pill-btn:hover svg {
  color: var(--navy-900);
}

.process-pill-btn:hover i {
  transform: translate(2px, -2px);
  color: var(--navy-900);
}

.process-pill-btn:focus-visible {
  outline: 2px solid var(--navy-900);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ==========================================================================
   5. Motion: Smooth Orchestrated Fade-Up Reveal
   ========================================================================== */

/* Initial hidden state only when <html> has .js */
html.js .process-header {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .process-grid-container {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms ease, transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .process-footer {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .process-reports {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Revealed States */
.process.is-revealed .process-header,
.process.is-visible .process-header {
  opacity: 1;
  transform: translateY(0);
}

.process.is-revealed .process-grid-container,
.process.is-visible .process-grid-container {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 100ms;
}

.process.is-revealed .process-footer,
.process.is-visible .process-footer {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 250ms;
}

.process.is-revealed .process-reports,
.process.is-visible .process-reports {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 350ms;
}

/* Fallback when JS is disabled */
html:not(.js) .process-header,
html:not(.js) .process-grid-container,
html:not(.js) .process-footer,
html:not(.js) .process-reports {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   6. Responsive Adaptations
   ========================================================================== */

/* Tablet & Mobile: 1 column when below 768px */
@media (max-width: 767px) {
  .process {
    padding: clamp(48px, 10vw, 64px) 0;
  }

  .process-header {
    margin-bottom: 40px;
  }

  .process-grid-container {
    border-radius: 16px;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .process-step {
    padding: 28px 20px;
  }

  .process-step:nth-child(odd) {
    border-right: none;
  }

  .process-step:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }

  .process-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 20px;
    padding: 20px;
    margin-top: 32px;
  }

  .process-support {
    align-items: flex-start;
  }

  .process-btn {
    width: 100%;
  }

  .process-reports {
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .process-reports-pills {
    gap: 10px;
    width: 100%;
  }

  .process-pill-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
}

/* ==========================================================================
   7. Accessibility: Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html.js .process-header,
  html.js .process-grid-container,
  html.js .process-footer,
  html.js .process-reports,
  .process-step,
  .process-icon,
  .process-card-title,
  .process-btn,
  .process-btn svg,
  .process-pill-btn,
  .process-pill-btn i,
  .process-link {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0ms !important;
  }
}
