/* =====================================================
   PPC Landing — Іванна | Light & Dark themes, Pink accent
   ===================================================== */

:root {
  /* Accent Pink Palette */
  --accent-50: #fdf2f8;
  --accent-100: #fce7f3;
  --accent-200: #fbcfe8;
  --accent-300: #f9a8d4;
  --accent-400: #f472b6;
  --accent-500: #ec4899;
  --accent-600: #db2777;
  --accent-700: #be185d;
  --accent-800: #9d174d;
  --accent-900: #831843;

  /* Light Theme (default) */
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #525252;
  --text-muted: #737373;
  --border-color: #e5e5e5;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);

  /* Semantic */
  --accent: var(--accent-500);
  --accent-hover: var(--accent-600);
  --accent-soft: var(--accent-100);
}

[data-theme="dark"] {
  --bg-primary: #0c0c0c;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --text-primary: #fafafa;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --border-color: #262626;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  --accent: var(--accent-400);
  --accent-hover: var(--accent-300);
  --accent-soft: rgba(244, 114, 182, 0.15);
}

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible — WCAG 2.4.7 */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip Link (Accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: .8rem;
  right: .8rem;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.theme-toggle:hover {
  transform: scale(1.05);
}

.theme-icon {
  position: absolute;
  font-size: 1.25rem;
}

.theme-icon.moon { display: none; }
[data-theme="dark"] .theme-icon.sun { display: none; }
[data-theme="dark"] .theme-icon.moon { display: block; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s;
}

[data-theme="dark"] .header {
  background: rgba(12, 12, 12, 0.9);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.logo__role {
  color: var(--accent);
  font-size: 1rem;
}

.nav__list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav__list { display: flex; }
}

.nav__list a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav__burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

@media (min-width: 768px) {
  .nav__burger { display: none; }
}

.nav__burger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

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

.hero__gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 70% 20%, var(--accent-soft) 0%, transparent 50%),
              radial-gradient(ellipse 60% 40% at 20% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
  will-change: transform;
}

.hero__noise {
  position: absolute;
  inset: 0;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  padding: 4rem 1.5rem;
}

@media (min-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
  }
}

/* Hero stagger animation */
.hero__animate {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-in 0.7s ease forwards;
}

.hero__animate[data-delay="0"] { animation-delay: 0ms; }
.hero__animate[data-delay="100"] { animation-delay: 100ms; }
.hero__animate[data-delay="200"] { animation-delay: 200ms; }
.hero__animate[data-delay="300"] { animation-delay: 300ms; }
.hero__animate[data-delay="400"] { animation-delay: 400ms; }

@keyframes hero-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accent underline */
.accent--underline {
  display: inline-block;
  position: relative;
}

.accent--underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1em;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-400));
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .hero__animate {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent-soft);
  color: var(--accent-700);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 1rem;
}

[data-theme="dark"] .hero__badge {
  color: var(--accent-300);
}

.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 0;
}

.accent {
  color: var(--accent);
  position: relative;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 2rem 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn--full {
  width: 100%;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.hero__stat {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
}

.hero__stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Trust */
.trust {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.trust__title {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
}

.trust__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.trust__item {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem auto;
}

.section-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent-soft);
  color: var(--accent-700);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 1rem;
}

[data-theme="dark"] .section-badge {
  color: var(--accent-300);
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Services */
.services {
  padding: 6rem 0;
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.3s;
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
}

.service-card:hover .service-card__icon {
  color: var(--accent);
}

.service-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

/* About */
.about {
  padding: 6rem 0;
  background: var(--bg-tertiary);
}

.about__inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about__inner {
    grid-template-columns: 1fr auto;
  }
}

.about__content .section-header {
  text-align: left;
  margin-bottom: 2rem;
}

.about__content .section-badge {
  margin-bottom: 0.5rem;
}

.about__text {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
}

.about__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.about__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.about__avatar {
  --avatar-url: none;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--avatar-url), linear-gradient(135deg, var(--accent-400), var(--accent-600));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 20px 50px -12px rgba(236, 72, 153, 0.35),
              0 8px 20px -8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.about__avatar-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.25) 100%);
  border-radius: 50%;
  pointer-events: none;
}

.about__avatar-placeholder {
  font-size: 4rem;
  font-weight: 700;
  color: white;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Додай .has-photo при підключенні реального фото */
.about__avatar.has-photo .about__avatar-placeholder {
  display: none;
}

/* Cases */
.cases {
  padding: 6rem 0;
}

.cases__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.cases__filter {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

.cases__filter:hover,
.cases__filter.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.cases__wrapper {
  position: relative;
}

.cases__skeleton {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.cases__skeleton[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .cases__skeleton {
    grid-template-columns: repeat(2, 1fr);
  }
}

.case-skeleton {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.case-skeleton::before {
  content: "";
  display: block;
  height: 160px;
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--border-color) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.case-skeleton::after {
  content: "";
  display: block;
  height: 120px;
  padding: 1.5rem;
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--border-color) 40%,
    var(--bg-tertiary) 70%,
    var(--border-color) 85%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out 0.2s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .case-skeleton::before,
  .case-skeleton::after {
    animation: none;
  }
}

.cases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cases__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cases__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.case-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
}

.case-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.case-card__image {
  height: 160px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-card__placeholder {
  font-size: 3rem;
}

.case-card__content {
  padding: 1.5rem;
}

.case-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.case-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
}

.case-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
}

.case-card__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.case-card__stats li {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.case-card__stats strong {
  color: var(--accent);
  margin-right: 0.25rem;
}

/* CTA */
.cta {
  padding: 6rem 0;
}

.cta__box {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-700));
  border-radius: 24px;
  padding: 3rem;
  text-align: center;
}

.cta__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: white;
  margin: 0 0 0.5rem 0;
}

.cta__text {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1.5rem 0;
}

.cta .btn-primary {
  background: white;
  color: var(--accent-700);
}

.cta .btn-primary:hover {
  background: var(--bg-secondary);
}

/* Contact */
.contact {
  padding: 6rem 0;
  background: var(--bg-tertiary);
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 639px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group--checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.form-group--checkbox input {
  width: auto;
  margin-top: 0.25rem;
}

.form-group--checkbox label {
  font-size: 0.9rem;
  font-weight: 400;
}

.form-error--checkbox {
  flex-basis: 100%;
  margin-top: -0.5rem;
}

.form-error {
  display: block;
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 0.25rem;
}

.form-group.is-invalid input,
.form-group.is-invalid textarea {
  border-color: #dc2626;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-color);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__brand {
  font-weight: 800;
  font-size: 1.25rem;
}

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

.footer__nav {
  display: flex;
  gap: 1.5rem;
}

.footer__nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}

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

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

/* Mobile nav */
@media (max-width: 767px) {
  .nav.nav--open .nav__list {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
  }
}

/* Animation on scroll (optional) */
@media (prefers-reduced-motion: no-preference) {
  .service-card,
  .case-card {
    opacity: 1;
  }
}
