/* ===================================================
   process.css — "Scrolling Codex" Creative Layout
   =================================================== */

/* ---- Hero ---- */
.process-hero {
  padding: 9rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.process-hero::before {
  content: 'UX';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(120px, 20vw, 260px);
  font-weight: 900;
  letter-spacing: -0.06em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.06;
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

.process-hero-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.process-hero-tagline::before,
.process-hero-tagline::after {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent-gradient);
}

.process-hero h1 {
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.process-hero p {
  max-width: 680px;
  margin: 0 auto 3rem;
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Stats strip */
.process-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.process-stat {
  text-align: center;
}

.process-stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.process-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
}

/* ---- Sticky Phase Navigation ---- */
.phase-tabs-container {
  position: sticky;
  top: var(--current-header-height, var(--header-height));
  z-index: 100;
  background: rgba(11, 7, 32, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--surface-border);
  padding: 0;
  transition: top 0.3s ease;
}

.phase-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 2rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.phase-tabs-scroll::-webkit-scrollbar { display: none; }

.phase-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.25s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.phase-tab:hover {
  color: var(--text-primary);
  border-bottom-color: rgba(255, 158, 121, 0.3);
}

.phase-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.phase-tab-num {
  font-size: 0.7rem;
  opacity: 0.5;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ---- Main Process Content ---- */
.process-body {
  position: relative;
}

/* Vertical connector line */
.process-connector {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--surface-border) 5%, var(--surface-border) 95%, transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .process-connector { display: none; }
}

/* ---- Phase Section ---- */
.phase-section {
  padding: 8rem 0;
  position: relative;
  scroll-margin-top: calc(var(--header-height) + 56px);
}

.phase-split {
  display: flex;
  flex-direction: row;
  gap: 5rem;
  align-items: flex-start;
  position: relative;
}

/* Even phases flip the layout */
.phase-section.phase-alt .phase-split {
  flex-direction: row-reverse;
}

/* Even phases flip the watermark position */
.phase-section.phase-alt .phase-watermark-num {
  right: auto;
  left: -1rem;
}

@media (max-width: 900px) {
  .phase-split {
    flex-direction: column !important;
    gap: 3rem;
  }
}

/* Left/Right image panel */
.phase-image-col {
  flex: 0 0 48%;
  max-width: 48%;
  position: sticky;
  top: calc(var(--header-height) + 80px);
}

@media (max-width: 900px) {
  .phase-image-col {
    flex: none;
    max-width: 100%;
    position: relative;
    top: auto;
  }
}

.phase-main-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--surface-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

.phase-image-overlay {
  margin-top: -3rem;
  margin-left: 2rem;
  margin-right: -1rem;
  position: relative;
  z-index: 2;
  background: var(--surface-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.phase-image-overlay-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.phase-image-overlay-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-display);
}

/* Right content column */
.phase-content-col {
  flex: 1;
  padding-top: 1rem;
  position: relative;
}

/* Huge watermark number */
.phase-watermark-num {
  position: absolute;
  top: -3rem;
  right: -1rem;
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 160px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.phase-section:nth-child(even) .phase-watermark-num {
  right: auto;
  left: -1rem;
}

/* Phase badge */
.phase-badge-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.phase-badge {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  background: var(--accent-gradient);
  color: #0b0720;
  flex-shrink: 0;
}

.phase-badge-divider {
  flex: 1;
  height: 1px;
  background: var(--surface-border);
}

.phase-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-hover);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Phase title */
.phase-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.phase-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

/* ---- Method Chips ---- */
.methods-section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.methods-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.method-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  cursor: default;
}

.method-chip:hover {
  background: var(--surface-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.method-chip i {
  font-size: 0.75rem;
  color: var(--accent-primary);
  opacity: 0.8;
}

/* ---- Method Detail Cards (expandable) ---- */
.methods-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.method-acc-item {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.method-acc-item:hover {
  border-color: rgba(255, 158, 121, 0.25);
  background: var(--surface-hover);
}

.method-acc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
}

.method-acc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 158, 121, 0.1);
  border: 1px solid rgba(255, 158, 121, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.method-acc-name {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.method-acc-toggle {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.method-acc-item.open .method-acc-toggle {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.method-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
}

.method-acc-item.open .method-acc-body {
  max-height: 500px;
}

.method-acc-inner {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.method-acc-image {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--surface-border);
  flex-shrink: 0;
}

.method-acc-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 480px) {
  .method-acc-inner {
    flex-direction: column;
  }
  .method-acc-image {
    width: 100%;
    height: 120px;
  }
}

/* ---- Phase divider dot ---- */
.phase-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.phase-divider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 20px var(--accent-glow);
  position: relative;
  z-index: 2;
}

.phase-divider-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--surface-border);
}

/* ---- CTA Section ---- */
.process-cta {
  padding: 8rem 0;
  text-align: center;
}

.process-cta-box {
  background: var(--surface-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 32px;
  padding: 5rem 3rem;
  position: relative;
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
}

.process-cta-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--accent-gradient);
  opacity: 0.6;
}

.process-cta-title {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.process-cta-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* ---- Scroll reveal states ---- */
/* Override animations.css — phase SECTIONS must never be opacity:0
   (causes document height collapse). Only the inner columns animate. */
.phase-section.reveal {
  opacity: 1 !important;
  transform: none !important;
}

.phase-section .phase-content-col {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.phase-section .phase-image-col {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease 0s, transform 0.7s ease 0s;
}

/* When section is triggered by IntersectionObserver (.active added by animations.js) */
.phase-section.active .phase-content-col,
.phase-section.active .phase-image-col {
  opacity: 1;
  transform: translateY(0);
}
