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

/* =========================================
   1. CSS VARIABLES & ROOT
   ========================================= */
:root {
  --primary: #000000;
  --accent: #FF2A00;
  --bg: #FFFFFF;
  --surface: #F5F5F5;
  --text: #000000;
  --muted: #666666;
  
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --glow: 0 0 40px rgba(255, 42, 0, 0.3);
  --glow-hover: 0 0 60px rgba(255, 42, 0, 0.5);
  
  --header-height: 72px;
  --container-max: 1280px;
  --container-narrow: 800px;
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 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;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

ul,
ol {
  list-style: none;
}

/* =========================================
   3. TYPOGRAPHY & EDITORIAL STYLES
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }

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

.text-muted {
  color: var(--muted);
}

.text-accent {
  color: var(--accent);
}

.editorial-headline {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.drop-cap::first-letter {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  margin-right: 0.5rem;
  margin-top: 0.1rem;
  color: var(--accent);
}

.pull-quote {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.3;
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--primary);
}

.multi-column-text {
  column-count: 1;
  column-gap: 2rem;
  column-rule: 1px solid var(--surface);
}

@media (min-width: 768px) {
  .multi-column-text {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .multi-column-text-3 {
    column-count: 3;
  }
}

/* =========================================
   4. LAYOUT & GRID UTILITIES
   ========================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.section {
  padding: 5rem 0;
}

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

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

@media (min-width: 768px) {
  .magazine-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 2.5rem;
  }
  .magazine-grid .span-2 { grid-column: span 2; }
  .magazine-grid .span-3 { grid-column: span 3; }
  .magazine-grid .span-4 { grid-column: span 4; }
  .magazine-grid .span-6 { grid-column: span 6; }
  
  .magazine-grid .offset-1 { grid-column-start: 2; }
  .magazine-grid .offset-2 { grid-column-start: 3; }
  .magazine-grid .offset-3 { grid-column-start: 4; }
}

.asymmetric-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* =========================================
   5. HEADER & NAVIGATION
   ========================================= */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--surface);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
}

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

.nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

@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);
  }
}

/* =========================================
   6. BUTTONS & INTERACTIVE ELEMENTS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.btn-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

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

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

.cta-button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 1.125rem 2.5rem;
  font-size: 1.1rem;
  box-shadow: var(--glow);
  border-radius: 0;
}

.cta-button:hover {
  box-shadow: var(--glow-hover);
  transform: translateY(-2px);
}

/* =========================================
   7. FORMS & INPUTS
   ========================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  width: 100%;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.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;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.form-submit {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.3s ease;
}

.form-submit:hover {
  background: var(--accent);
}

/* =========================================
   8. TEXT-OVER-PHOTO & OVERLAYS (CRITICAL)
   ========================================= */
.has-photo-bg,
.hero-section,
.testimonial-section {
  position: relative;
  isolation: isolate;
}

.has-photo-bg::before,
.hero-section::before,
.testimonial-section::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 > *,
.hero-section > *,
.testimonial-section > * {
  position: relative;
  z-index: 1;
}

/* =========================================
   9. HERO SECTION
   ========================================= */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  color: var(--bg);
}

.hero-section h1,
.hero-section p {
  color: var(--bg);
}

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

.hero-content .editorial-headline {
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  opacity: 0.9;
}

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

/* =========================================
   10. FEATURES & SERVICES
   ========================================= */
.feature-card {
  background: var(--bg);
  border: 1px solid var(--surface);
  padding: 2.5rem;
  border-radius: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
  border-color: var(--accent);
}

.feature-card .icon-wrapper {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--accent);
  margin-bottom: 1.5rem;
  border-radius: 0;
}

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

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

.service-item h4 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.service-item .service-number {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
}

/* =========================================
   11. ABOUT & STATS
   ========================================= */
.about-section .magazine-grid {
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  z-index: -1;
  border-radius: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 4rem 0;
  border-top: 1px solid var(--surface);
  border-bottom: 1px solid var(--surface);
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item .stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item .stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* =========================================
   12. TESTIMONIALS
   ========================================= */
.testimonial-section {
  background-image: url('https://images.unsplash.com/photo-1497215842964-222b430dc094?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  color: var(--bg);
}

.testimonial-section .section-header h2 {
  color: var(--bg);
}

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

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

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

.testimonial-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 0;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-left: 4px solid var(--accent);
}

.testimonial-card .quote-icon {
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  font-family: serif;
}

.testimonial-card p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.testimonial-author img {
  width: 48px;
  height: 48px;
  border-radius: 0;
  object-fit: cover;
}

.testimonial-author .author-info strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--primary);
}

.testimonial-author .author-info span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* =========================================
   13. CTA & CONTACT SECTIONS
   ========================================= */
.cta-section {
  background: var(--primary);
  color: var(--bg);
  text-align: center;
  padding: 6rem 0;
}

.cta-section h2 {
  color: var(--bg);
  margin-bottom: 1.5rem;
}

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

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

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

.contact-info h3 {
  margin-bottom: 2rem;
}

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

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

.contact-row p {
  margin-bottom: 0;
  line-height: 1.5;
}

.contact-form-wrapper {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 0;
}

/* =========================================
   14. POLICY PAGES (Privacy, Terms)
   ========================================= */
.policy-page {
  padding: 4rem 0;
}

.policy-page .policy-header {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.policy-page .policy-header .updated-date {
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.policy-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--surface);
}

.policy-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.policy-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* =========================================
   15. FOOTER
   ========================================= */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 5rem 0 2rem;
}

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

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

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand .logo {
  color: var(--bg);
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  max-width: 300px;
  font-size: 0.95rem;
}

.footer-col h5 {
  color: var(--bg);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

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

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

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

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

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

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

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

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

/* =========================================
   16. COOKIE POPUP
   ========================================= */
.cookie-popup {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 400px;
  background: var(--bg);
  border: 2px solid var(--primary);
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

@media (min-width: 768px) {
  .cookie-popup {
    left: auto;
  }
}

.cookie-popup.hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

.cookie-popup h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

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

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

.cookie-actions .btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
}

/* =========================================
   17. ACCESSIBILITY & MOTION
   ========================================= */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0;
}

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

@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;
  }
}

/* =========================================
   18. UTILITY CLASSES
   ========================================= */
.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;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.section-header {
  max-width: 700px;
  margin-bottom: 3.5rem;
}

.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
}

.section-header .overline {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.divider {
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 1.5rem 0;
  border-radius: 0;
}

.text-center .divider {
  margin-left: auto;
  margin-right: auto;
}