/* ============================================================
   EvvyTools — WordPress Plugin Download Page
   ============================================================ */

/* ---- Accent color ---- */
:root {
  --wp-accent: #3858e9;
  --wp-accent-light: #eef1fd;
  --wp-accent-glow: rgba(56, 88, 233, 0.15);
}
[data-bs-theme="dark"] {
  --wp-accent-light: rgba(56, 88, 233, 0.12);
  --wp-accent-glow: rgba(56, 88, 233, 0.25);
}

/* ============================================================
   HERO
   ============================================================ */
.wp-hero {
  padding: 4rem 0 3rem;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #122244 40%, #1a3a6a 70%, #1e4d8a 100%);
  color: #fff;
}
[data-bs-theme="dark"] .wp-hero {
  background: linear-gradient(135deg, #080e1a 0%, #0d1a33 40%, #142d52 70%, #183d6e 100%);
}

.wp-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* ---- Text column ---- */
.wp-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 50rem;
  margin-bottom: 1rem;
  animation: wpFadeUp 0.6s ease both;
}

.wp-hero-text h1 {
  font-family: var(--evvy-font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  animation: wpFadeUp 0.6s ease 0.1s both;
}

.wp-hero-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  max-width: 440px;
  margin-bottom: 1.5rem;
  animation: wpFadeUp 0.6s ease 0.2s both;
}

.wp-hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  animation: wpFadeUp 0.6s ease 0.3s both;
}

.wp-download-btn {
  background: #fff !important;
  border-color: #fff !important;
  color: #0a1628 !important;
  font-weight: 600;
  gap: 0.5rem;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.wp-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  background: #e8ecf4 !important;
  border-color: #e8ecf4 !important;
  color: #0a1628 !important;
}

.wp-version-tag {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.wp-compat {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  animation: wpFadeUp 0.6s ease 0.4s both;
}
.wp-compat i {
  color: #5ce87a;
  margin-right: 0.25rem;
}

/* ---- SVG Illustration ---- */
.wp-hero-visual {
  display: flex;
  justify-content: center;
  animation: wpFadeUp 0.8s ease 0.3s both;
}

.wp-illustration {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 8px 40px rgba(0,0,0,0.25));
  --evvy-gray-50: #f8f9fa;
  --evvy-gray-100: #1e2d4a;
  --evvy-border-color: rgba(255,255,255,0.12);
  --evvy-text-secondary: rgba(255,255,255,0.5);
  --bs-body-bg: #fff;
}

/* SVG element animations */
.wp-svg-dot { animation: wpDotPop 0.4s ease both; }
.wp-svg-dot-1 { animation-delay: 0.6s; }
.wp-svg-dot-2 { animation-delay: 0.7s; }
.wp-svg-dot-3 { animation-delay: 0.8s; }

.wp-svg-content { animation: wpSlideRight 0.5s ease both; }
.wp-svg-content-d1 { animation-delay: 0.9s; }
.wp-svg-content-d2 { animation-delay: 1.0s; }
.wp-svg-content-d3 { animation-delay: 1.8s; }

.wp-svg-tool {
  animation: wpToolReveal 0.7s ease 1.1s both;
}

.wp-svg-bar { animation: wpBarGrow 0.5s ease both; transform-origin: bottom center; }
.wp-svg-bar-1 { animation-delay: 1.5s; }
.wp-svg-bar-2 { animation-delay: 1.6s; }
.wp-svg-bar-3 { animation-delay: 1.7s; }
.wp-svg-bar-4 { animation-delay: 1.8s; }
.wp-svg-bar-5 { animation-delay: 1.9s; }

/* ============================================================
   SECTIONS
   ============================================================ */
.wp-section {
  padding: 4rem 0;
}

.wp-section-alt {
  background: var(--evvy-gray-50);
}
[data-bs-theme="dark"] .wp-section-alt {
  background: var(--evvy-gray-100, #1a1a1a);
}

.wp-section-title {
  font-family: var(--evvy-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

/* ============================================================
   STEPS
   ============================================================ */
.wp-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.wp-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  position: relative;
}
.wp-step:not(:last-child) {
  border-bottom: 1px solid var(--evvy-border-color);
}

.wp-step-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--evvy-font-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--wp-accent);
  background: var(--wp-accent-light);
  border-radius: 12px;
  transition: all 0.25s ease;
}
.wp-step:hover .wp-step-number {
  background: var(--wp-accent);
  color: #fff;
  transform: scale(1.05);
}

.wp-step-body h3 {
  font-family: var(--evvy-font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}
.wp-step-body p {
  font-size: 0.9375rem;
  color: var(--evvy-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   CODE CARD
   ============================================================ */
.wp-code-card {
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.wp-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: rgba(255,255,255,0.06);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.wp-code-lang {
  font-family: monospace;
  font-size: 0.6875rem;
  background: rgba(255,255,255,0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.wp-code-block {
  margin: 0;
  padding: 1.25rem;
  background: transparent;
  overflow-x: auto;
}
.wp-code-block code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  color: #a8c8ff;
  line-height: 1.6;
}

/* ============================================================
   ATTRIBUTE GRID
   ============================================================ */
.wp-attrs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.wp-attr {
  background: var(--bs-body-bg);
  border: 1px solid var(--evvy-border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s ease;
}
.wp-attr:hover {
  border-color: var(--wp-accent);
}

.wp-attr > code {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--evvy-text-primary);
  background: none;
  padding: 0;
}
.wp-attr-req,
.wp-attr-opt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  vertical-align: middle;
}
.wp-attr-req {
  color: #d63638;
  background: rgba(214, 54, 56, 0.08);
}
.wp-attr-opt {
  color: var(--evvy-text-secondary);
  background: var(--evvy-gray-50);
}
.wp-attr p {
  font-size: 0.8125rem;
  color: var(--evvy-text-secondary);
  margin: 0.5rem 0 0;
  line-height: 1.45;
}
.wp-attr p code {
  font-size: 0.8125rem;
  background: var(--evvy-gray-50);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* ============================================================
   FEATURES
   ============================================================ */
.wp-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.wp-feature {
  background: var(--bs-body-bg);
  border: 1px solid var(--evvy-border-color);
  border-radius: 14px;
  padding: 1.5rem;
  transition: all 0.25s ease;
}
.wp-feature:hover {
  border-color: var(--wp-accent);
  box-shadow: 0 4px 24px var(--wp-accent-glow);
  transform: translateY(-2px);
}

.wp-feature-icon {
  margin-bottom: 1rem;
}

.wp-feature h3 {
  font-family: var(--evvy-font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}
.wp-feature p {
  font-size: 0.875rem;
  color: var(--evvy-text-secondary);
  margin: 0;
  line-height: 1.55;
}
.wp-feature p code {
  font-size: 0.8125rem;
  background: var(--evvy-gray-50);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* ============================================================
   USE CASES
   ============================================================ */
.wp-usecases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.wp-usecase {
  text-align: center;
  padding: 1.5rem 1rem;
}
.wp-usecase i {
  font-size: 2rem;
  color: var(--wp-accent);
  margin-bottom: 0.75rem;
  display: block;
}
.wp-usecase h4 {
  font-family: var(--evvy-font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}
.wp-usecase p {
  font-size: 0.8125rem;
  color: var(--evvy-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.wp-cta {
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse at 30% 50%, var(--wp-accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(56, 88, 233, 0.06) 0%, transparent 50%);
}

/* ============================================================
   DOWNLOAD CONFIRMATION PAGE
   ============================================================ */

/* Animated checkmark */
.wp-dl-check-wrap {
  display: inline-block;
  animation: wpFadeUp 0.5s ease both;
}

.wp-dl-check-circle {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: wpCircleDraw 0.8s ease 0.2s forwards;
}

.wp-dl-check-tick {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: wpTickDraw 0.5s ease 0.9s forwards;
}

/* Install steps on confirmation */
.wp-install-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wp-install-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.wp-install-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--evvy-font-display);
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--wp-accent);
  background: var(--wp-accent-light);
  border-radius: 8px;
  margin-top: 2px;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes wpFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes wpDotPop {
  0%   { r: 0; opacity: 0; }
  60%  { r: 7; }
  100% { r: 6; opacity: 1; }
}

@keyframes wpSlideRight {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes wpToolReveal {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wpBarGrow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: var(--bar-opacity, 1); }
}

@keyframes wpCircleDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes wpTickDraw {
  to { stroke-dashoffset: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
  .wp-hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .wp-hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
  .wp-hero-actions {
    justify-content: center;
  }
  .wp-compat {
    justify-content: center;
  }
  .wp-hero-visual {
    order: -1;
  }
  .wp-illustration {
    max-width: 360px;
  }
}

@media (max-width: 575.98px) {
  .wp-hero {
    padding: 2.5rem 0 2rem;
  }
  .wp-section {
    padding: 2.5rem 0;
  }
  .wp-hero-text h1 {
    font-size: 1.75rem;
  }
  .wp-features {
    grid-template-columns: 1fr;
  }
  .wp-attrs-grid {
    grid-template-columns: 1fr;
  }
  .wp-usecases {
    grid-template-columns: 1fr 1fr;
  }
  .wp-compat {
    flex-direction: column;
    gap: 0.5rem;
  }
}
