@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700;900&display=swap');

:root {
  --primary: #8B2FC7;
  --accent: #FF3399;
  --accent-lime: #D4FF00;
  --bg: #FAFAF8;
  --surface: #F2EEF7;
  --text: #1C1C2E;
  --muted: #7A7A90;
  
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  
  --container-max: 1200px;
  --header-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

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

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

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.125rem;
}

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-lime { color: var(--accent-lime); }
.bg-surface { background-color: var(--surface); }

/* =========================================
   HEADER & NAVIGATION
   ========================================= */

.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.header.scrolled {
  background: var(--bg);
  border-bottom: 2px solid var(--text);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.5px;
}

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

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

.nav-menu a {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.mobile-menu-toggle {
  background: none;
  border: 2px solid var(--text);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
}

/* CRITICAL HAMBURGER RULES */
.mobile-menu-toggle { display: none; }
.nav-menu { display: flex; gap: 1.5rem; }

@media (max-width: 767px) {
  .mobile-menu-toggle { display: inline-block; }
  .nav-menu { display: none; }
  .nav-menu.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); padding: 1rem; border-top: 1px solid var(--muted); }
  .nav-menu.open a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--surface);
  }
}

/* =========================================
   BUTTONS
   ========================================= */

.btn-primary,
.btn-secondary,
.cta-button,
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--text);
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  transform: translate(-2px, -2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--text);
  color: var(--bg);
  transform: translate(-2px, -2px);
}

.cta-button {
  background: var(--accent-lime);
  color: var(--text);
  border-color: var(--text);
}

.cta-button:hover {
  background: var(--accent);
  color: #FFFFFF;
  transform: translate(-2px, -2px);
}

.form-submit {
  background: var(--text);
  color: var(--bg);
  width: 100%;
}

.form-submit:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translate(-2px, -2px);
}

/* =========================================
   FORMS & INPUTS
   ========================================= */

.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; width: 100%; }

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.form-input, 
.form-textarea { 
  width: 100%; 
  padding: 0.75rem 1rem; 
  border: 1px solid var(--muted); 
  border-radius: 0; 
  background: var(--surface); 
  color: var(--text); 
  font: inherit; 
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  border-width: 2px;
  padding: calc(0.75rem - 1px) calc(1rem - 1px);
}

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

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-image: url('https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
}

/* CRITICAL TEXT-OVER-PHOTO RULES */
.has-photo-bg { position: relative; isolation: isolate; }
.has-photo-bg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.85)); z-index: 0; }
.has-photo-bg > * { position: relative; z-index: 1; }

.hero-content {
  max-width: 700px;
}

.hero-section h1 {
  font-size: 3rem;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

.hero-section h1 span {
  color: var(--accent-lime);
}

.hero-section p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 550px;
}

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

/* =========================================
   FEATURES SECTION
   ========================================= */

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-card {
  background: var(--bg);
  border: 2px solid var(--text);
  padding: 2rem;
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translate(-4px, -4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-lime);
  border: 2px solid var(--text);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.feature-card:nth-child(2) .feature-icon {
  background: var(--accent);
}

.feature-card:nth-child(3) .feature-icon {
  background: var(--primary);
  color: #FFFFFF;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--muted);
  margin-bottom: 0;
}

/* =========================================
   SERVICES SECTION
   ========================================= */

.services-section {
  background: var(--surface);
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.service-item {
  padding: 2rem;
  border-bottom: 2px solid var(--text);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-item:last-child {
  border-bottom: none;
}

.service-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.service-item h3 {
  font-size: 1.5rem;
}

.service-item p {
  color: var(--muted);
  margin-bottom: 0;
}

.service-link {
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  align-self: flex-start;
}

/* =========================================
   ABOUT SECTION
   ========================================= */

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

.about-image {
  border: 2px solid var(--text);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--muted);
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.about-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-weight: 500;
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 1px solid var(--text);
}

/* =========================================
   STATS SECTION
   ========================================= */

.stats-section {
  background: var(--text);
  color: var(--bg);
  border-top: 4px solid var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--accent-lime);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
}

/* =========================================
   TESTIMONIALS SECTION
   ========================================= */

.testimonial-section {
  background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  color: #FFFFFF;
}

.testimonial-section .section-header h2,
.testimonial-section .section-header p {
  color: #FFFFFF;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.testimonial-card {
  background: var(--surface);
  border: 2px solid var(--text);
  padding: 2rem;
  color: var(--text);
}

.testimonial-quote {
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* =========================================
   CTA SECTION
   ========================================= */

.cta-section {
  background: var(--primary);
  border-top: 4px solid var(--text);
  border-bottom: 4px solid var(--text);
  text-align: center;
}

.cta-section h2 {
  color: #FFFFFF;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* =========================================
   CONTACT SECTION
   ========================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-info h2 {
  margin-bottom: 1.5rem;
}

.contact-info > p {
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-row { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }

.contact-row .icon {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 0.2rem;
}

.contact-row .text strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-row .text span,
.contact-row .text a {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-form-wrapper {
  background: var(--surface);
  border: 2px solid var(--text);
  padding: 2rem;
}

.contact-form-wrapper h3 {
  margin-bottom: 1.5rem;
}

/* =========================================
   POLICY PAGES (Privacy, Terms)
   ========================================= */

.policy-page {
  padding: 4rem 0;
}

.policy-content {
  max-width: 800px;
  margin: 0 auto;
}

.policy-content h1 {
  border-bottom: 2px solid var(--text);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.policy-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.policy-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.policy-content p,
.policy-content li {
  color: var(--muted);
  line-height: 1.8;
}

.policy-content ul {
  margin-bottom: 1.5rem;
}

.policy-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  background: var(--surface);
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text);
}

.policy-update-date {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2rem;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
  background: var(--text);
  color: var(--bg);
  padding: 4rem 0 2rem;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-lime);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.footer-bottom-links a:hover {
  color: #FFFFFF;
}

/* =========================================
   COOKIE POPUP
   ========================================= */

.cookie-popup {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 400px;
  background: var(--surface);
  border: 2px solid var(--text);
  padding: 1.5rem;
  z-index: 2000;
  box-shadow: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-popup.hidden {
  display: none;
}

.cookie-popup h4 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.cookie-popup p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid var(--text);
  cursor: pointer;
  font-family: var(--font-body);
}

.cookie-btn-accept {
  background: var(--primary);
  color: #FFFFFF;
}

.cookie-btn-decline {
  background: transparent;
  color: var(--text);
}

/* =========================================
   RESPONSIVE BREAKPOINTS (Mobile-First)
   ========================================= */

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  
  .section { padding: 5rem 0; }
  
  .hero-section h1 { font-size: 3.5rem; }
  
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-item { border-bottom: none; border-right: 2px solid var(--text); }
  .service-item:nth-child(2n) { border-right: none; }
  .service-item:nth-child(n+3) { border-top: 2px solid var(--text); }
  
  .about-grid { grid-template-columns: 1fr 1fr; }
  
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  
  .contact-grid { grid-template-columns: 1fr 1fr; }
  
  .form-row { flex-direction: row; }
  
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  
  .cookie-popup { left: auto; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 3rem; }
  
  .section { padding: 6rem 0; }
  
  .hero-section { min-height: 85vh; }
  .hero-section h1 { font-size: 4.5rem; }
  .hero-section p { font-size: 1.35rem; }
  
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .service-item { border-right: 2px solid var(--text); }
  .service-item:last-child { border-right: none; }
  .service-item:nth-child(n+3) { border-top: none; }
  .service-item:nth-child(n+4) { border-top: 2px solid var(--text); }
  
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* =========================================
   ACCESSIBILITY & 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;
  }
  
  html {
    scroll-behavior: auto;
  }
}

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