/*
===========================================
MAFAR GROUP - BASE STYLES
Reset, Typography, Layout, Components, Utilities
Version 2.0 | February 2026
===========================================

TABLE OF CONTENTS:
1. CSS Reset & Base Styles
2. Typography System  
3. Layout & Spacing
4. Component Library
5. Utility Classes
6. Responsive Breakpoints
===========================================
*/

/* ===========================================
   1. CSS RESET & BASE STYLES
   =========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--mafar-white);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

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

a {
  color: var(--mafar-gold);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--mafar-gold);
  outline-offset: 2px;
}

/* ===========================================
   2. TYPOGRAPHY SYSTEM
   =========================================== */

h1, .h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--mafar-black);
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-4);
}

h2, .h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--mafar-black);
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-4);
}

h3, .h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--mafar-black);
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-3);
}

h4, .h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-3);
}

.font-serif {
  font-family: var(--font-serif);
}

p {
  margin-bottom: var(--spacing-4);
}

.text-large {
  font-size: 1.125rem;
  line-height: 1.6;
}

.text-overline {
  font-family: var(--font-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
}

.mission-statement {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.6;
  color: var(--mafar-black);
  font-weight: 500;
  font-style: italic;
  background-color: #FAFAFA;
  border-left: 4px solid var(--mafar-gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--spacing-6) var(--spacing-8);
  margin: var(--spacing-8) 0;
  position: relative;
}

.mission-statement::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 4rem;
  color: var(--mafar-gold);
  opacity: 0.2;
  font-family: serif;
  line-height: 1;
  font-style: normal;
}

/* ===========================================
   3. LAYOUT & SPACING
   =========================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-4);
  padding-right: var(--spacing-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--spacing-6);
    padding-right: var(--spacing-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--spacing-8);
    padding-right: var(--spacing-8);
  }
}

.section {
  padding-top: var(--spacing-16);
  padding-bottom: var(--spacing-16);
}

@media (min-width: 1024px) {
  .section {
    padding-top: var(--spacing-20);
    padding-bottom: var(--spacing-20);
  }
}

.section-light {
  background-color: var(--background-light);
}

/* ===========================================
   4. COMPONENT LIBRARY
   =========================================== */

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: var(--mafar-white);
  background: linear-gradient(135deg, var(--mafar-gold) 0%, #C5A028 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  box-shadow: 0 10px 15px -3px rgba(212, 175, 55, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  color: var(--mafar-white) !important;
  background: linear-gradient(135deg, var(--gold-dark) 0%, #A6841F 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -5px rgba(212, 175, 55, 0.5), 0 10px 12px -6px rgba(212, 175, 55, 0.3);
  text-decoration: none;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: var(--mafar-black);
  background-color: var(--mafar-white);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-secondary:hover {
  color: var(--mafar-gold);
  background-color: var(--mafar-white);
  border-color: var(--mafar-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* Cards */
.card {
  background-color: var(--mafar-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-3xl);
  padding: var(--spacing-8);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.05);
  transform: translateY(-2px);
}

/* Forms */
.input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--mafar-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.input:focus {
  outline: none;
  border-color: var(--mafar-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--mafar-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  resize: vertical;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.textarea:focus {
  outline: none;
  border-color: var(--mafar-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.label {
  display: block;
  margin-bottom: var(--spacing-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* CTA Banner - Shared Component */
.cta-section {
  background: transparent;
  padding-left: var(--spacing-6);
  padding-right: var(--spacing-6);
  margin-bottom: var(--spacing-20);
}

.cta-section .container {
  background: linear-gradient(135deg, var(--mafar-black) 0%, #2A2A2A 100%);
  border-radius: var(--radius-5xl);
  padding: var(--spacing-12) var(--spacing-8);
  position: relative;
  overflow: hidden;
  color: var(--mafar-white);
}

.cta-section .container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-section h2 {
  color: var(--mafar-white);
  margin-bottom: var(--spacing-4);
}

.cta-section .text-large {
  color: rgba(255, 255, 255, 0.8);
  max-width: 700px;
  margin: 0 auto var(--spacing-8);
}

.cta-buttons {
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-buttons .btn-primary,
  .cta-buttons .btn-secondary {
    width: 100%;
  }
}

/* Dark background button adjustments */
.cta-section .btn-secondary {
  color: var(--mafar-white);
  background-color: transparent;
  border-color: var(--mafar-white);
}

.cta-section .btn-secondary:hover {
  color: var(--mafar-gold) !important;
  background-color: var(--mafar-white);
  border-color: var(--mafar-white);
}

/* ===========================================
   5. UTILITY CLASSES
   =========================================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: var(--spacing-4); }
.gap-6 { gap: var(--spacing-6); }

.text-center { text-align: center; }
.mt-8 { margin-top: var(--spacing-8); }
.mb-8 { margin-bottom: var(--spacing-8); }

/* No top padding needed with sticky header - header is in document flow */
.site-main {
  padding-top: 0;
}

/* Image Placeholders */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F5F5F5;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.image-placeholder::after {
  content: attr(data-label);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  padding: var(--spacing-4);
  line-height: 1.4;
}

.image-placeholder:hover {
  background-color: #EFEFEF;
  border-color: rgba(212, 175, 55, 0.2);
}

/* Placeholder Variants */
.image-placeholder.hero {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.image-placeholder.hero-wide {
  aspect-ratio: 21 / 9;
  width: 100%;
}

.image-placeholder.landscape {
  aspect-ratio: 4 / 3;
  width: 100%;
}

.image-placeholder.square {
  aspect-ratio: 1;
  width: 100%;
}

.image-placeholder.portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
}

.image-placeholder.icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-2xl);
  background-color: var(--background-light);
  border: none;
}

.image-placeholder.icon::after {
  font-size: 1.5rem;
}

.image-placeholder.card-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin-bottom: var(--spacing-4);
}

/* Dark background placeholder adjustments */
.site-footer .image-placeholder {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.site-footer .image-placeholder::after {
  color: rgba(255, 255, 255, 0.5);
}

/* ===========================================
   6. RESPONSIVE BREAKPOINTS
   =========================================== */

/* Mobile: 0-639px (default) */
/* Tablet: 640-1023px */
/* Desktop: 1024px+ */

@media (max-width: 767px) {
  .mobile-hidden {
    display: none;
  }
}

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

/* ===========================================
   HERO em RESET — no italics in hero sections
   =========================================== */

.mafar-hero em,
.mafar-about-hero em,
.mafar-services-hero em,
.mafar-partnership-hero em,
.mafar-news-hero em,
.mafar-contact-hero em {
  font-style: normal;
}

/* ===========================================
   HERO INFINITE GRID — shared across pages
   =========================================== */

.mafar-hero-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mafar-hero-grid--base {
  z-index: 1;
  opacity: 0.04;
}

.mafar-hero-grid--reveal {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mafar-hero-glows {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.mafar-hero-glow-blob {
  position: absolute;
  border-radius: 50%;
}

.mafar-hero-glow-blob--gold {
  right: -20%;
  top: -20%;
  width: 40%;
  height: 40%;
  background: rgba(212, 175, 55, 0.25);
  filter: blur(120px);
}

.mafar-hero-glow-blob--primary {
  right: 10%;
  top: -10%;
  width: 20%;
  height: 20%;
  background: rgba(212, 175, 55, 0.15);
  filter: blur(100px);
}

.mafar-hero-glow-blob--navy {
  left: -10%;
  bottom: -20%;
  width: 40%;
  height: 40%;
  background: rgba(30, 58, 95, 0.35);
  filter: blur(120px);
}

@media (prefers-reduced-motion: reduce) {
  .mafar-hero-grid--reveal {
    display: none;
  }
}


