/**
 * UX & UI Design Page Styles
 * Demonstrates UX/UI capabilities through the page itself
 */

/* ===== Feather Icons (inline SVG via CSS) ===== */
.feather-icon {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ===== Theme Toggle - Floating Bottom Left ===== */
.ux-theme-toggle {
  display: none; /* Hidden from content - created via JS */
}

.floating-theme-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--ux-surface, #1A1A24);
  border: 1px solid var(--ux-border, rgba(255,255,255,0.1));
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.floating-theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(133, 186, 73, 0.3);
}

.floating-theme-toggle .toggle-icon {
  font-size: 1.25rem;
  transition: transform 0.5s ease;
  color: var(--ux-text, #fff);
}

body.ux-light-mode .floating-theme-toggle {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.ux-light-mode .floating-theme-toggle .toggle-icon {
  transform: rotate(180deg);
  color: var(--ux-text);
}

/* ===== Hero Section ===== */
.ux-hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem !important;
}

.ux-hero .ux-headline {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-align: left;
}

.ux-hero .ux-subline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--ux-text-muted);
  margin-bottom: 2rem;
  text-align: left;
  max-width: 700px;
}

/* ===== CSS Variables for Theme ===== */
body:has(.ux-hero) {
  --ux-bg: #0A0A0F;
  --ux-surface: #1A1A24;
  --ux-text: #FFFFFF;
  --ux-text-muted: #94A3B8;
  --ux-border: rgba(255, 255, 255, 0.1);
  --ux-gradient-1: #85ba49;
  --ux-gradient-2: #00D4AA;
  --ux-gradient-3: #7C3AED;
}

/* Light Mode - softer contrast with light gray background */
body.ux-light-mode:has(.ux-hero) {
  --ux-bg: #F5F5F7;
  --ux-surface: #FFFFFF;
  --ux-text: #1E293B;
  --ux-text-muted: #64748B;
  --ux-border: rgba(0, 0, 0, 0.08);
}

body:has(.ux-hero) {
  background: var(--ux-bg) !important;
  color: var(--ux-text);
  transition: background 0.5s ease, color 0.5s ease;
}

/* Fix white text in light mode */
body.ux-light-mode:has(.ux-hero) h1,
body.ux-light-mode:has(.ux-hero) h2,
body.ux-light-mode:has(.ux-hero) h3,
body.ux-light-mode:has(.ux-hero) h4,
body.ux-light-mode:has(.ux-hero) p,
body.ux-light-mode:has(.ux-hero) .ux-subline,
body.ux-light-mode:has(.ux-hero) .principle-card h4,
body.ux-light-mode:has(.ux-hero) .principle-card p,
body.ux-light-mode:has(.ux-hero) .demo-card h4,
body.ux-light-mode:has(.ux-hero) .demo-card p,
body.ux-light-mode:has(.ux-hero) .timeline-content h4,
body.ux-light-mode:has(.ux-hero) .timeline-content p,
body.ux-light-mode:has(.ux-hero) .faq-item summary,
body.ux-light-mode:has(.ux-hero) .faq-content p {
  color: var(--ux-text) !important;
}

body.ux-light-mode:has(.ux-hero) .ux-text-muted,
body.ux-light-mode:has(.ux-hero) .scroll-indicator {
  color: var(--ux-text-muted) !important;
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--ux-gradient-1), var(--ux-gradient-2), var(--ux-gradient-3));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== SINGLE LEFT AXIS FOR ALL CONTENT ===== */
:root {
  --ux-page-padding: max(2rem, calc((100vw - 1100px) / 2));
}

/* Remove ALL WordPress constraints */
body:has(.ux-hero) .wp-site-blocks,
body:has(.ux-hero) .entry-content,
body:has(.ux-hero) .wp-block-post-content {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: none !important;
}

/* ALL Sections - Same padding = same left axis */
body:has(.ux-hero) .ux-section,
body:has(.ux-hero) .ux-section.is-layout-constrained,
body:has(.ux-hero) .ux-hero {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 6rem var(--ux-page-padding) !important;
  background: transparent;
  border: none;
}

/* All content elements align to section padding */
body:has(.ux-hero) .ux-section > *,
body:has(.ux-hero) .ux-hero > * {
  max-width: 1100px;
}

/* ===== Text Alignment - Left aligned ===== */
body:has(.ux-hero) .ux-section h2,
body:has(.ux-hero) .ux-section h3,
body:has(.ux-hero) .ux-section p:not(.has-text-align-center),
body:has(.ux-hero) .principle-card,
body:has(.ux-hero) .demo-card,
body:has(.ux-hero) .timeline-content {
  text-align: left;
}

/* Override center alignment */
body:has(.ux-hero) .ux-section .has-text-align-center {
  text-align: left !important;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  color: var(--ux-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-arrow {
  font-size: 1.5rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ===== Reveal Animations ===== */
.reveal-section {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.2s;
}

.revealed .fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Principles Grid ===== */
.ux-principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  max-width: 1100px;
}

@media (max-width: 900px) {
  .ux-principles-grid {
    grid-template-columns: 1fr;
  }
}

.principle-card {
  background: var(--ux-surface);
  border: 1px solid var(--ux-border);
  border-radius: 20px;
  padding: 36px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.revealed .principle-card {
  opacity: 1;
  transform: translateY(0);
}

.principle-card:nth-child(1) { transition-delay: 0.1s; }
.principle-card:nth-child(2) { transition-delay: 0.2s; }
.principle-card:nth-child(3) { transition-delay: 0.3s; }

.principle-card:hover {
  transform: translateY(-8px);
  border-color: var(--ux-gradient-1);
  box-shadow: 0 20px 40px rgba(133, 186, 73, 0.15);
}

.principle-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(133, 186, 73, 0.15), rgba(0, 212, 170, 0.1));
  border-radius: 14px;
  padding: 12px;
  color: var(--ux-gradient-1);
}

.principle-icon svg {
  width: 28px;
  height: 28px;
}

.principle-card h4 {
  color: var(--ux-text);
  font-family: 'Manrope', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.principle-card p {
  color: var(--ux-text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ===== Gradient Section ===== */
.ux-gradient-section {
  background: linear-gradient(135deg, 
    rgba(133, 186, 73, 0.05) 0%, 
    rgba(0, 212, 170, 0.05) 50%,
    rgba(124, 58, 237, 0.05) 100%
  );
  border-top: 1px solid var(--ux-border);
  border-bottom: 1px solid var(--ux-border);
}

/* ===== "So fühlt sich / gutes UI an" - Dual Scroll Headlines ===== */
.ux-big-typo-section {
  overflow: hidden;
  position: relative;
}

/* ONLY scroll-headline-wrapper breaks out to full viewport */
.scroll-headline-wrapper {
  width: 100vw;
  margin-left: calc(-1 * var(--ux-page-padding));
  max-width: none !important;
  margin-bottom: 1.5em;
  /* Fade out left and right edges */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.ux-big-typo-section h3 {
  display: none; /* Hidden, replaced by JS-generated tracks */
}

.scroll-headline-track {
  display: flex;
  gap: 0.3em;
  white-space: nowrap;
  will-change: transform;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ux-text);
}

.scroll-headline-track span {
  flex-shrink: 0;
}

.scroll-headline-track span:nth-child(even) {
  opacity: 0.3;
}

/* Line 1: moves left */
.scroll-headline-track.line-1 {
  transform: translateX(var(--scroll-x1, 30vw));
}

/* Line 2: moves right (opposite) */
.scroll-headline-track.line-2 {
  transform: translateX(var(--scroll-x2, -30vw));
}

.ux-big-typo-section p {
  font-size: clamp(1.25rem, 3vw, 2rem);
  opacity: 0.7;
  max-width: min(80%, 1400px);
}

/* ===== Demo Cards ===== */
.ux-demo-area {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
  max-width: 1100px;
}

@media (max-width: 900px) {
  .ux-demo-area {
    grid-template-columns: 1fr;
  }
}

.demo-card {
  background: var(--ux-surface);
  border: 1px solid var(--ux-border);
  border-radius: 20px;
  padding: 36px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 24px 48px rgba(133, 186, 73, 0.2);
  border-color: var(--ux-gradient-1);
}

.demo-card h4 {
  color: var(--ux-text);
  font-family: 'Manrope', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.demo-card p {
  color: var(--ux-text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Demo Button with Ripple */
.demo-button {
  background: linear-gradient(135deg, var(--ux-gradient-1), var(--ux-gradient-2));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.demo-button:hover {
  transform: scale(1.05);
}

.demo-button:active {
  transform: scale(0.98);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-effect 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Progress Bar Demo */
.progress-demo {
  height: 10px;
  background: var(--ux-border);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ux-gradient-1), var(--ux-gradient-2));
  border-radius: 5px;
  transition: width 1s ease;
}

.demo-card:hover .progress-bar {
  width: 75%;
}

/* Tags Demo */
.demo-tag {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  margin-right: 10px;
  margin-top: 10px;
  background: var(--ux-gradient-1);
  color: white;
}

.demo-tag.secondary {
  background: var(--ux-text-muted);
  opacity: 0.7;
}

.demo-tag.tertiary {
  background: transparent;
  border: 1px solid var(--ux-border);
  color: var(--ux-text-muted);
}

/* ===== PROCESS TIMELINE - Vertical Line from Dot to Dot ===== */
.process-timeline {
  position: relative;
  margin-top: 64px;
  padding-left: 100px;
  max-width: 900px;
}

/* Each step */
.timeline-step {
  position: relative;
  padding-bottom: 56px;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

/* Scroll-triggered fade-in - initial state */
.timeline-step {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-step.step-visible {
  opacity: 1;
  transform: translateY(0);
}

/* The marker area (number + dot) */
.step-marker {
  position: absolute;
  left: -100px;
  top: 0;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

/* Number - same size as headline */
.step-number {
  font-family: 'Manrope', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ux-gradient-1);
  min-width: 32px;
}

/* The dot */
.step-dot {
  width: 14px;
  height: 14px;
  background: var(--ux-gradient-1);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(133, 186, 73, 0.5);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Pulse animation on visible */
.timeline-step.step-visible .step-dot {
  animation: dot-pulse 0.6s ease-out;
}

@keyframes dot-pulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

/* Connecting line between dots */
.timeline-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 14px;
  width: 2px;
  height: calc(100% - 14px + 56px);
  background: linear-gradient(
    180deg,
    var(--ux-gradient-1) 0%,
    var(--ux-gradient-2) 100%
  );
  opacity: 0.3;
  z-index: 1;
}

/* Line grows in on scroll */
.timeline-step:not(:last-child)::before {
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.timeline-step.step-visible:not(:last-child)::before {
  transform: scaleY(1);
}

/* Content */
.step-content h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ux-text);
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.timeline-step:hover .step-content h4 {
  color: var(--ux-gradient-1);
}

.step-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ux-text-muted);
  max-width: 600px;
}

/* ===== Tools Marquee - Full Width ===== */
/* ===== Tools/UX Section ===== */
/* Subtle headline */
.tools-section h3 {
  font-size: 1rem !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ux-text-muted) !important;
  margin-bottom: 2rem;
}

/* ONLY tools-marquee breaks out to full viewport */
.tools-marquee {
  overflow: hidden;
  padding: 24px 0;
  width: 100vw;
  margin-left: calc(-1 * var(--ux-page-padding));
  max-width: none !important;
  /* Fade out left and right edges */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  margin-bottom: 20px;
}

/* Row 1: scrolls left */
.marquee-track.track-left {
  animation: marquee-left 30s linear infinite;
}

/* Row 2: scrolls right (opposite) */
.marquee-track.track-right {
  animation: marquee-right 30s linear infinite;
}

@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Tool Tags as Pillows */
.tool-tag {
  padding: 18px 36px;
  background: var(--ux-surface);
  border: none;
  border-radius: 100px;
  color: var(--ux-text);
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.tool-tag:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 12px 24px rgba(133, 186, 73, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Light mode pillow adjustments */
body.ux-light-mode .tool-tag {
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ===== FAQ Accordion ===== */
.faq-accordion {
  max-width: 900px;
  margin: 48px 0 0;
}

.faq-item {
  border-bottom: 1px solid var(--ux-border);
}

.faq-item summary {
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ux-text);
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  color: var(--ux-gradient-1);
}

.faq-content {
  padding: 0 0 24px;
  color: var(--ux-text-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* ===== CTA Section ===== */
.ux-cta-section {
  background: linear-gradient(135deg, 
    rgba(133, 186, 73, 0.1) 0%, 
    rgba(0, 212, 170, 0.1) 50%,
    rgba(124, 58, 237, 0.1) 100%
  );
}

.cta-button-wrapper {
  margin-top: 36px;
  display: flex;
  justify-content: flex-start;
}

.ux-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  background: linear-gradient(135deg, var(--ux-gradient-1), var(--ux-gradient-2));
  color: white !important;
  text-decoration: none !important;
  border-radius: 14px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ux-cta-button::before {
  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.5s ease;
}

.ux-cta-button:hover::before {
  left: 100%;
}

.ux-cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(133, 186, 73, 0.3);
}

.button-arrow {
  transition: transform 0.3s ease;
}

.ux-cta-button:hover .button-arrow {
  transform: translateX(4px);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .ux-theme-toggle {
    top: auto;
    bottom: 20px;
    right: 20px;
  }
  
  body:has(.ux-hero) .ux-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .ux-big-typo-section h3 {
    font-size: clamp(2rem, 12vw, 4rem) !important;
  }
  
  .ux-principles-grid,
  .ux-demo-area {
    grid-template-columns: 1fr;
  }
  
  /* Timeline mobile */
  .process-timeline {
    padding-left: 70px;
    margin-top: 48px;
    max-width: 100%;
  }
  
  .step-marker {
    left: -70px;
    width: 60px;
    gap: 8px;
  }
  
  .step-number {
    font-size: 1rem;
    min-width: 24px;
  }
  
  .step-dot {
    width: 10px;
    height: 10px;
  }
  
  .timeline-step:not(:last-child)::before {
    left: -25px;
    top: 10px;
    height: calc(100% - 10px + 48px);
  }
  
  .timeline-step {
    padding-bottom: 48px;
  }
  
  .tool-tag {
    padding: 14px 24px;
    font-size: 0.9rem;
  }
}
