/* ============================================
   CoreLink Partners — Affiliate Landing • Modern 2025
   ============================================ */

:root {
  /* Palette — dark base + electric accents */
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text: #e8e8ed;
  --text-muted: #8b8b9a;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --accent-glow: rgba(0, 212, 170, 0.4);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.2);
  --border: rgba(255, 255, 255, 0.08);
  --white: #ffffff;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Spacing & layout */
  --container: min(92vw, 1200px);
  --section-pad: clamp(4rem, 10vw, 8rem);
  --radius: 16px;
  --radius-lg: 24px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle noise overlay for depth */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2rem);
  padding-right: clamp(1.25rem, 4vw, 2rem);
}

/* ========== Header & Nav ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #00b894);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(80px + var(--section-pad)) 0 var(--section-pad);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 45%, var(--bg) 95%);
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-dim), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, var(--purple-dim), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s var(--ease-out) both;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-title .line {
  display: block;
  animation: fadeUp 0.8s var(--ease-out) both;
}

.hero-title .line:nth-child(1) { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) { animation-delay: 0.2s; }

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent), #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--text-muted);
  animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 3rem;
  animation: fadeUp 0.8s var(--ease-out) 0.5s both;
}

.hero-stats .stat {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hero-stats .stat strong {
  display: block;
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.15rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Logos bar ========== */
.logos-bar {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logos-label {
  text-align: center;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem 3rem;
}

.logo-item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ========== Sections common ========== */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.section-title .accent {
  background: linear-gradient(135deg, var(--accent), #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Benefits ========== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.benefit-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.benefit-icon {
  width: 100%;
  height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--bg-elevated);
}

.benefit-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.benefit-card:hover .benefit-icon img {
  transform: scale(1.05);
}

.benefit-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.benefit-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== Showcase ========== */
.showcase {
  background: var(--bg-elevated);
}

.showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.showcase-content .section-badge { margin-bottom: 0.75rem; }
.showcase-content .section-title { margin-bottom: 1rem; }

.showcase-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 480px;
}

.showcase-list {
  list-style: none;
}

.showcase-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-weight: 500;
}

.showcase-list .check {
  color: var(--accent);
  font-weight: 700;
}

.showcase-visual {
  position: relative;
}

.showcase-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.5);
}

.showcase-card {
  position: absolute;
  bottom: -1.5rem;
  right: -1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  min-width: 200px;
}

.showcase-card.glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

.showcase-card-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.showcase-card-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--accent);
}

.showcase-card-value span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ========== Steps ========== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.step:hover {
  border-color: rgba(0, 212, 170, 0.25);
  transform: translateY(-2px);
}

.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== Testimonials ========== */
.testimonials {
  background: var(--bg-elevated);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.testimonial-card.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.4);
}

.testimonial-card p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--text);
}

.testimonial-card footer {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-card footer img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-card footer strong {
  display: block;
  font-size: 0.95rem;
}

.testimonial-card footer span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== CTA ========== */
.cta {
  position: relative;
  padding: var(--section-pad) 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.cta-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(10, 10, 15, 0.95) 50%, var(--bg) 100%);
}

.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.cta-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cta-form input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cta-form input::placeholder {
  color: var(--text-muted);
}

.cta-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.cta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== Footer ========== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand .logo {
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ========== Scroll-triggered animations ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children when parent reveals */
.benefits-grid.reveal .benefit-card,
.steps-grid.reveal .step,
.testimonials-grid.reveal .testimonial-card {
  opacity: 0;
}

.benefits-grid.reveal.visible .benefit-card {
  animation: fadeUp 0.6s var(--ease-out) both;
}

.benefits-grid.reveal.visible .benefit-card:nth-child(1) { animation-delay: 0.1s; }
.benefits-grid.reveal.visible .benefit-card:nth-child(2) { animation-delay: 0.2s; }
.benefits-grid.reveal.visible .benefit-card:nth-child(3) { animation-delay: 0.3s; }

.steps-grid.reveal.visible .step {
  animation: fadeUp 0.6s var(--ease-out) both;
}

.steps-grid.reveal.visible .step:nth-child(1) { animation-delay: 0.1s; }
.steps-grid.reveal.visible .step:nth-child(2) { animation-delay: 0.2s; }
.steps-grid.reveal.visible .step:nth-child(3) { animation-delay: 0.3s; }

.testimonials-grid.reveal.visible .testimonial-card {
  animation: fadeUp 0.6s var(--ease-out) both;
}

.testimonials-grid.reveal.visible .testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonials-grid.reveal.visible .testimonial-card:nth-child(2) { animation-delay: 0.15s; }
.testimonials-grid.reveal.visible .testimonial-card:nth-child(3) { animation-delay: 0.2s; }

/* ========== Responsive ========== */
/* Mobile nav */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.5rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    z-index: 99;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: 1rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 101;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  body.nav-open {
    overflow: hidden;
  }

  .showcase-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .showcase-visual {
    order: -1;
  }

  .showcase-card {
    right: 1rem;
    bottom: 1rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
