/* ============================================================
   Marketing Bar Theme — Main Stylesheet
   WordPress FSE adaptation — fonts loaded via theme.json
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #000000;
  --bg-surface: #0A0A0A;
  --bg-elevated: #111111;
  --bg-overlay: rgba(0, 0, 0, 0.90);
  --text-primary: #F5F5F5;
  --text-secondary: #B0B0B0;
  --text-muted: #555555;
  --accent: #8B5CF6;
  --accent-pink: #EC4899;
  --accent-mint: #34D399;
  --accent-dim: rgba(139, 92, 246, 0.08);
  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #000;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- WordPress overrides --- */
.wp-site-blocks {
  padding: 0 !important;
}

.wp-block-group {
  padding: 0;
}

.wp-block-image {
  margin: 0;
}

.wp-block-image img {
  display: block;
}

figure.wp-block-image {
  margin: 0;
}

.wp-block-quote {
  margin: 0;
  padding: 0;
  border: none;
}

.wp-block-buttons {
  margin: 0;
}

/* --- Loading Screen --- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.loader__brand span {
  color: var(--accent);
}

.loader__track {
  width: 200px;
  height: 2px;
  background: var(--bg-elevated);
  border-radius: 1px;
  overflow: hidden;
}

.loader__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.1s linear;
}

.loader__percent {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  letter-spacing: 0.1em;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header__logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.header__logo span {
  color: var(--accent);
}

/* WP Navigation overrides */
.header .wp-block-navigation {
  gap: 2.5rem;
}

.header .wp-block-navigation-item a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.header .wp-block-navigation-item a:hover {
  color: var(--text-primary);
}

.header .header__cta a {
  color: var(--accent) !important;
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 5vw;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg .wp-block-image,
.hero__bg figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__bg img,
.hero__bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: saturate(0.3);
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 65vw;
}

.hero__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero__heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero__heading .word {
  display: inline-block;
}

.hero__tagline {
  margin-top: 2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  max-width: 400px;
}

.hero__scroll {
  position: absolute;
  bottom: 3rem;
  left: 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
}

.hero__scroll-text {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-lr;
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0% { top: -50%; }
  100% { top: 100%; }
}

/* --- Main Scroll Container --- */
.scroll-container {
  position: relative;
}

/* --- Section Shared Styles --- */
.section {
  position: relative;
  min-height: 100vh;
  padding: 8rem 5vw;
  overflow: hidden;
}

.section__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.section__subheading {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 3rem;
}

/* --- Services Section --- */
.services {
  background: var(--bg-primary);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.service-card {
  position: relative;
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  transition: transform 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-pink));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.15);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__number {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.1;
  line-height: 1;
  margin-bottom: -1.5rem;
}

.service-card__name {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-bottom: 0.5rem;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-card__desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* --- Portfolio Section --- */
.portfolio {
  background: var(--bg-surface);
}

.portfolio__cases {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  margin-top: 4rem;
}

.case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.case:nth-child(even) {
  direction: rtl;
}

.case:nth-child(even) > * {
  direction: ltr;
}

.case__visual {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.case__visual img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.6s ease;
}

.case__visual:hover img {
  transform: scale(1.03);
}

.case__visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.6));
  border-radius: 8px;
  pointer-events: none;
}

.case__type {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.case__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.case__challenge,
.case__result {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.case__result {
  color: var(--accent-mint);
  font-weight: 600;
}

.case__quote {
  margin-top: 1.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent) !important;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-primary);
  opacity: 0.85;
  line-height: 1.7;
}

/* --- Stats Section --- */
.stats {
  position: relative;
  padding: 10rem 5vw;
  text-align: center;
  overflow: hidden;
}

.stats__overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 0;
}

.stats__content {
  position: relative;
  z-index: 1;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-top: 4rem;
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat__suffix {
  font-size: 0.6em;
  color: var(--text-muted);
  margin-left: 2px;
}

.stat__label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* --- Marquee --- */
.marquee-strip {
  position: relative;
  overflow: hidden;
  padding: 3rem 0;
  pointer-events: none;
}

.marquee__text {
  font-family: var(--font-display);
  font-size: 12vw;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  opacity: 0.08;
  white-space: nowrap;
  will-change: transform;
}

/* --- How It Works --- */
.how-it-works {
  background: var(--bg-primary);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 2.5rem 2rem;
}

.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.step__number {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: -1rem;
}

.step__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step__desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* --- Testimonials --- */
.testimonials {
  background: var(--bg-surface);
}

.testimonials__list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 4rem;
  max-width: 700px;
}

.testimonial {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--accent);
}

.testimonial__quote {
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--text-primary);
  opacity: 0.85;
}

.testimonial__author {
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* --- CTA Section --- */
.cta-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 5vw;
  background: var(--bg-primary);
}

.cta-section__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.cta-section__heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.cta-section__sub {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 3rem;
}

/* WP Button overrides for CTA */
.cta-button .wp-block-button__link,
.cta-button .wp-element-button {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1.25rem 3rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button .wp-block-button__link:hover,
.cta-button .wp-element-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.35);
}

.cta-section__note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* --- Footer --- */
.footer {
  padding: 4rem 5vw;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__brand span {
  color: var(--accent);
}

.footer__tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.footer__links {
  display: flex;
  gap: 2rem;
}

.footer__links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__info {
  text-align: right;
}

.footer__contact {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.footer__copy {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .hero__heading {
    font-size: clamp(2.5rem, 5vw, 5rem);
  }
  .section__heading {
    font-size: 3.5rem;
  }
  .stat__number {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
  }
  .header .wp-block-navigation-item:not(.header__cta) {
    display: none;
  }
  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .hero__heading {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  .hero__content {
    max-width: 100%;
  }
  .section {
    padding: 5rem 1.5rem;
  }
  .services__grid {
    grid-template-columns: 1fr;
  }
  .case {
    grid-template-columns: 1fr;
  }
  .case:nth-child(even) {
    direction: ltr;
  }
  .stats {
    padding: 4rem 1.5rem;
  }
  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 1rem;
  }
  .stat__number {
    font-size: 2.2rem;
  }
  .stat__suffix {
    font-size: 0.5em;
  }
  .stat__label {
    font-size: 0.55rem;
    letter-spacing: 0.05em;
    word-break: break-word;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
    text-align: center;
  }
  .footer__info {
    text-align: center;
  }
  .section__heading {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .hero__heading {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }
  .section__heading {
    font-size: 2rem;
  }
  .cta-button .wp-block-button__link {
    padding: 1rem 2rem;
    font-size: 0.8rem;
  }
}
