/*
Theme Name: Funnel Media
Theme URI: https://funnelmedia.ua
Author: Funnel Media
Author URI: https://funnelmedia.ua
Description: Кастомна тема для маркетинг-агенції Funnel Media. Сучасний дизайн, повна адаптивність, без зайвих залежностей.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: funnel-media
Tags: business, agency, marketing, custom
*/

/* ============================================================
   FUNNEL MEDIA — main stylesheet
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --bg:           #EFE9DC;          /* cream background */
  --bg-card:      #E8E1D0;          /* slightly darker card */
  --bg-soft:      #F3EEE2;          /* lighter section */
  --green:        #2C4A2C;          /* primary brand green */
  --green-deep:   #213A21;          /* hover / deeper */
  --green-soft:   rgba(44, 74, 44, .08);
  --gold:         #D4A847;          /* accent gold */
  --gold-soft:    #E8DC9B;
  --ink:          #1A1A1A;          /* primary text */
  --ink-muted:    #6E6B62;          /* secondary text */
  --line:         rgba(26, 26, 26, .10);
  --white:        #FFFFFF;

  /* Typography */
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;

  /* Sizing */
  --container: 1200px;
  --radius-sm: 10px;
  --radius:    18px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Reusable bits ---------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(212, 168, 71, .18);
  margin-bottom: 22px;
}
.eyebrow--light {
  color: var(--gold-soft);
  background: rgba(212, 168, 71, .15);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-title em {
  font-style: italic;
  font-weight: 400;
}
.section-title--center { text-align: center; }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head--left {
  text-align: left;
  position: relative;
}
.section-sub {
  color: var(--ink-muted);
  font-size: 16px;
  margin-top: 16px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.section-sub--left {
  margin-left: 0;
  margin-right: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.btn--sm { padding: 10px 20px; font-size: 13px; }
.btn--lg { padding: 16px 32px; font-size: 15px; }

.btn--primary {
  background: var(--green);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
}
.btn--gold:hover {
  background: #C89A3B;
  transform: translateY(-1px);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 0;
  background: rgba(239, 233, 220, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav--left { justify-self: start; }
.nav--right { justify-self: end; }
.nav__link {
  font-size: 14px;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color .2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--green);
  transition: right .3s var(--ease);
}
.nav__link:hover { color: var(--green); }
.nav__link:hover::after { right: 0; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}
.logo__mark { display: inline-flex; }
.logo__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
}
.nav-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: var(--bg);
  padding: 24px 28px 32px;
  flex-direction: column;
  gap: 18px;
  z-index: 49;
  box-shadow: 0 16px 40px -20px rgba(0,0,0,.18);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu__link {
  font-size: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 60px 0 0;
  overflow: hidden;
}
.hero__inner {
  text-align: center;
  position: relative;
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(54px, 9vw, 110px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--ink);
}
.hero__title em {
  font-style: italic;
  color: var(--ink);
  font-weight: 400;
}
.hero__lead {
  max-width: 580px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__funnel {
  margin: -10px auto 0;
  max-width: 760px;
  opacity: .9;
}
.hero__funnel svg { width: 100%; height: auto; }

/* ---------- Tag marquee ---------- */
.tags-marquee {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg);
}
.tags-marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.tag-item {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.tags-marquee .dot {
  color: var(--gold);
  font-size: 14px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 100px 0 90px;
}
.about__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 70px;
  align-items: start;
}
.about__text {
  margin-top: 24px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 480px;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.stat-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.stat-card__num {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  color: var(--ink);
}
.stat-card__num span {
  font-size: 26px;
  color: var(--green);
  font-style: italic;
}
.stat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  color: var(--green);
}
.stat-card__label {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: 90px 0 100px;
  background: var(--bg-soft);
  position: relative;
}
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(212,168,71,.06), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(44,74,44,.04), transparent 50%);
  pointer-events: none;
}
.services__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.service-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  display: grid;
  grid-template-columns: 40px 1.1fr 1.4fr 24px;
  align-items: center;
  gap: 22px;
  transition: transform .25s var(--ease), background .25s var(--ease);
  cursor: pointer;
}
.service-item:hover {
  transform: translateX(6px);
  background: #E1D9C5;
}
.service-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--green);
  flex-shrink: 0;
}
.service-item__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.service-item__desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.55;
}
.service-item__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.service-item:hover .service-item__arrow {
  background: var(--green);
  color: var(--bg);
  transform: rotate(-45deg);
}

/* ============================================================
   PROCESS
   ============================================================ */
.process {
  padding: 100px 0;
}
.process__cta { margin-top: 18px; }
.process__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
  margin-top: 30px;
}
.process__visual svg {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.process__steps {
  display: flex;
  flex-direction: column;
}
.step {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--green);
  padding-top: 2px;
}
.step__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.step__desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 420px;
}

/* ============================================================
   CASES
   ============================================================ */
.cases {
  padding: 90px 0 100px;
  background: var(--bg-soft);
}
.cases__controls {
  position: absolute;
  top: 6px;
  right: 0;
  display: flex;
  gap: 10px;
}
.case-arrow {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.case-arrow:hover {
  background: var(--green);
  color: var(--bg);
}

.cases__slider {
  margin-top: 30px;
}
.case-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--green);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 50px 50px 30px;
  position: relative;
  overflow: hidden;
  min-height: 360px;
}
.case-card__tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.case-card__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--bg);
  margin-bottom: 18px;
}
.case-card__title em {
  font-style: italic;
  color: var(--gold-soft);
  font-weight: 400;
}
.case-card__desc {
  font-size: 14px;
  color: rgba(239, 233, 220, .75);
  max-width: 420px;
  line-height: 1.6;
}
.case-card__metrics {
  position: absolute;
  left: 50px;
  bottom: 40px;
  display: flex;
  gap: 36px;
}
.metric__value {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: 30px;
  color: var(--gold-soft);
  display: block;
  line-height: 1;
}
.metric__value--neg { color: #E8B89B; }
.metric__label {
  font-size: 11px;
  color: rgba(239, 233, 220, .6);
  letter-spacing: 0.04em;
}

/* ----- Phone mockup ----- */
.case-card__visual {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.phone {
  width: 220px;
  height: 440px;
  background: #1A1A1A;
  border-radius: 36px;
  padding: 10px;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.05),
    0 30px 60px -20px rgba(0,0,0,.5);
  transform: translateY(40px) rotate(-2deg);
}
.phone__notch {
  width: 80px;
  height: 18px;
  background: #1A1A1A;
  border-radius: 0 0 14px 14px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.phone__screen {
  background: #FFFFFF;
  border-radius: 28px;
  height: 100%;
  padding: 28px 16px 18px;
  overflow: hidden;
  color: #1A1A1A;
}
.phone__statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 16px;
}
.phone__icons {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: #1A1A1A;
}
.phone__overview-title {
  font-size: 12px;
  font-weight: 600;
}
.phone__overview-sub {
  font-size: 9px;
  color: #888;
  margin-bottom: 14px;
  display: inline-block;
  padding: 2px 8px;
  background: #F1F1F1;
  border-radius: 999px;
  margin-top: 2px;
}
.phone__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.phone__stat-label {
  font-size: 8px;
  color: #888;
  margin-bottom: 2px;
}
.phone__stat-value {
  font-size: 13px;
  font-weight: 600;
}
.phone__stat-delta {
  font-size: 8px;
  color: #2C8A3B;
}
.phone__chart-title {
  font-size: 9px;
  color: #888;
  margin-bottom: 4px;
}
.phone__chart {
  width: 100%;
  height: 100px;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials {
  padding: 90px 0 80px;
}
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.testimonial {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
}
.testimonial__stars {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.testimonial__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 24px;
}
.testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: var(--bg);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.testimonial__name {
  font-size: 14px;
  font-weight: 600;
}
.testimonial__role {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.testimonials__nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: var(--green);
  color: var(--bg);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}
.cta__inner {
  text-align: center;
  position: relative;
  z-index: 1;
}
.cta__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(46px, 6.5vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--bg);
  margin-bottom: 18px;
}
.cta__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-soft);
}
.cta__sub {
  font-size: 15px;
  color: rgba(239, 233, 220, .75);
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.cta__spiral {
  margin: 30px auto 0;
  max-width: 700px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  padding: 60px 0 24px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer__brand .logo--footer {
  margin-bottom: 14px;
}
.footer__tagline {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 280px;
}
.footer__heading {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--ink);
}
.footer__list li {
  margin-bottom: 8px;
}
.footer__list a {
  font-size: 13px;
  color: var(--ink-muted);
  transition: color .2s var(--ease);
}
.footer__list a:hover { color: var(--green); }
.footer__list--icons li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
}
.footer__bottom {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .process__grid { grid-template-columns: 1fr; gap: 30px; }
  .case-card { grid-template-columns: 1fr; padding: 40px 32px; }
  .case-card__metrics { position: static; margin-top: 30px; }
  .case-card__visual { justify-content: center; margin-top: 30px; }
  .phone { transform: translateY(0) rotate(0); }
  .testimonials__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .nav--left, .nav--right { display: none; }
  .nav-toggle { display: flex; }
  .header__inner { grid-template-columns: auto 1fr auto; }
  .logo { justify-self: start; }

  .hero { padding-top: 36px; }
  .hero__title { font-size: clamp(48px, 14vw, 80px); }
  .hero__lead { font-size: 15px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }

  .about, .services, .process, .cases, .testimonials { padding: 60px 0; }

  .about__stats { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 20px; }
  .stat-card__num { font-size: 34px; }

  .section-title { font-size: clamp(30px, 8vw, 42px); }

  .service-item {
    grid-template-columns: 36px 1fr 24px;
    grid-template-rows: auto auto;
    gap: 10px 16px;
    padding: 20px;
  }
  .service-item__icon { grid-row: 1 / 3; }
  .service-item__head { grid-column: 2 / 3; grid-row: 1; }
  .service-item__desc { grid-column: 2 / 3; grid-row: 2; }
  .service-item__arrow { grid-column: 3 / 4; grid-row: 1 / 3; align-self: center; }

  .step { grid-template-columns: 36px 1fr; gap: 14px; }
  .step__num { font-size: 18px; }

  .case-card { padding: 32px 22px; }
  .case-card__metrics { gap: 22px; flex-wrap: wrap; }
  .metric__value { font-size: 24px; }
  .phone { width: 200px; height: 400px; }

  .cta { padding: 60px 0 0; }
  .cta__title { font-size: clamp(38px, 11vw, 60px); }

  .footer__inner { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }

  .cases__controls { position: static; margin-top: 16px; }
}

@media (max-width: 480px) {
  .about__stats { grid-template-columns: 1fr; }
  .testimonials__grid { gap: 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
