/* ================================================
   MAKKAH PRINTERS — GLOBAL DESIGN SYSTEM (main.css)
   ================================================ */

/* ── 1. CSS CUSTOM PROPERTIES (DESIGN TOKENS) ── */
:root {
  /* Colors */
  --color-white:      #FFFFFF;
  --color-crimson:    #C0001A;
  --color-crimson-dk: #960015;
  --color-crimson-lt: #E8001E;
  --color-charcoal:   #1A1A1A;
  --color-gray-50:    #F9F9F9;
  --color-gray-100:   #F3F3F3;
  --color-gray-200:   #E5E5E5;
  --color-gray-400:   #ADADAD;
  --color-gray-500:   #6B6B6B;
  --color-gray-700:   #3D3D3D;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Font sizes — 1.25 scale */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */
  --text-5xl:  3rem;      /* 48px */
  --text-6xl:  3.75rem;   /* 60px */
  --text-7xl:  4.5rem;    /* 72px */

  /* Spacing (8px grid) */
  --space-1:  0.5rem;   /* 8px  */
  --space-2:  1rem;     /* 16px */
  --space-3:  1.5rem;   /* 24px */
  --space-4:  2rem;     /* 32px */
  --space-5:  2.5rem;   /* 40px */
  --space-6:  3rem;     /* 48px */
  --space-8:  4rem;     /* 64px */
  --space-10: 5rem;     /* 80px */
  --space-12: 6rem;     /* 96px */
  --space-16: 8rem;     /* 128px */

  /* Shadows */
  --shadow-sm:    0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.12);
  --shadow-nav:   0 2px 20px rgba(0, 0, 0, 0.08);

  /* Border radius */
  --radius-sm:  4px;
  --radius:     8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;
  --transition-slower: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-max: 1200px;
  --container-pad: var(--space-4);
  --navbar-height: 72px;
}

/* ── 2. RESET & BASE ── */
*, *::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: var(--text-base);
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

address {
  font-style: normal;
}

/* ── 3. TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-charcoal);
}

h1 { font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }

p { max-width: 68ch; }
p + p { margin-top: var(--space-2); }

em {
  font-style: italic;
  color: var(--color-crimson);
}

strong { font-weight: 600; }

/* ── 4. LAYOUT UTILITIES ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── 5. SECTION HEADERS ── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-crimson);
  margin-bottom: var(--space-1);
}

.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  color: var(--color-charcoal);
  margin-bottom: var(--space-2);
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--color-gray-500);
  max-width: 52ch;
  margin-inline: auto;
}

/* ── 6. BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

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

.btn--primary:hover {
  background: var(--color-crimson-dk);
  border-color: var(--color-crimson-dk);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(192, 0, 26, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--color-charcoal);
  border-color: var(--color-gray-200);
}

.btn--ghost:hover {
  border-color: var(--color-charcoal);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-crimson);
  border-color: var(--color-crimson);
}

.btn--outline:hover {
  background: var(--color-crimson);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-crimson);
  border-color: var(--color-white);
}

.btn--white:hover {
  background: var(--color-gray-100);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn--full { width: 100%; justify-content: center; }

/* ── 7. PAGE HERO (internal pages) ── */
.page-hero {
  padding: calc(var(--navbar-height) + var(--space-10)) 0 var(--space-10);
  background: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 50%, rgba(192, 0, 26, 0.03) 100%);
  pointer-events: none;
}

.page-hero__content {
  max-width: 700px;
}

.page-hero__title {
  margin: var(--space-1) 0 var(--space-2);
  color: var(--color-charcoal);
}

.page-hero__sub {
  font-size: var(--text-lg);
  color: var(--color-gray-500);
  max-width: 56ch;
}

/* ── 8. CTA BANNER (shared) ── */
.cta-banner {
  background: var(--color-crimson);
  padding: var(--space-12) 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.cta-banner__content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-banner__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-1);
  max-width: none;
}

.cta-banner__headline {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.cta-banner__sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-5);
  margin-inline: auto;
  max-width: 50ch;
}

/* ── 9. SCROLL ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--transition-slower),
    transform var(--transition-slower);
  transition-delay: var(--delay, 0s);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 10. FOCUS STYLES (Accessibility) ── */
:focus-visible {
  outline: 2px solid var(--color-crimson);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── 11. SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-gray-100); }
::-webkit-scrollbar-thumb { background: var(--color-gray-400); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-crimson); }

/* ── 12. SELECTION ── */
::selection { background: var(--color-crimson); color: var(--color-white); }

/* ── 13. MAIN CONTENT ── */
#main-content {
  min-height: calc(100vh - var(--navbar-height) - 300px);
}
