/*
Theme Name: Alwakeel Theme
Description: Premium dark-mode WordPress theme for Alwakeel Moving & Packing Services.
Version: 1.0.0
Author: Alwakeel Development Team
Text Domain: alhamd
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Self-hosted Cairo Font (Variable Weight)
   ========================================================================== */

/* Arabic */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('./assets/fonts/cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* Latin Extended */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('./assets/fonts/cairo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Latin */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('./assets/fonts/cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

/* ── Premium Control Move Brand Palette — الوكيل ────────────── */
:root {
  /* Navy scale */
  --color-navy-950: #070B14;
  --color-navy-900: #101827;
  --color-navy-800: #172033;
  --color-navy-700: #334155;
  --color-navy-600: #475569;

  /* Crimson scale — backward-compat gold aliases → Alwakeel Crimson */
  --color-gold-500: #9D262B;
  --color-gold-400: #D25746;
  --color-gold-300: #E88770;
  --color-gold-600: #801D23;

  /* Copper scale — backward-compat aliases → Alwakeel Crimson */
  --color-copper-500: #9D262B;
  --color-copper-400: #D25746;
  --color-copper-glow: rgba(157, 38, 43, 0.20);

  /* Trust green — WhatsApp only, unchanged */
  --color-trust-green:      #22C55E;
  --color-trust-green-dark: #15803D;

  /* Warm text */
  --color-warm-white: #F2EDE7;
  --color-soft-gray:  #C4CEDC;
  --color-muted-text: #7A8BA8;

  /* Accent aliases */
  --accent:       var(--color-gold-500);
  --accent-hover: var(--color-gold-400);

  /* Border helpers — crimson at low opacity */
  --border-subtle:  rgba(157, 38, 43, 0.06);
  --border-default: rgba(157, 38, 43, 0.12);
  --border-medium:  rgba(157, 38, 43, 0.22);
  --border-strong:  rgba(157, 38, 43, 0.45);
  --border-copper:  rgba(128, 29, 35, 0.15);
  --border-white:   rgba(255, 255, 255, 0.06);

  /* Premium shadows */
  --shadow-card:        0 2px 16px rgba(0, 0, 0, 0.20), 0 0 0 1px rgba(157, 38, 43, 0.05);
  --shadow-hover:       0 16px 40px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(157, 38, 43, 0.10);
  --shadow-gold:        0 6px 20px rgba(157, 38, 43, 0.22);
  --shadow-copper:      0 6px 20px rgba(128, 29, 35, 0.18);
  --shadow-inset-gold:  inset 0 1px 0 rgba(157, 38, 43, 0.08);

  /* Layout tokens */
  --section-padding-y: clamp(60px, 8vw, 100px);
  --container-max:     1200px;
  --container-padding: clamp(16px, 4vw, 48px);

  /* New warm surface tokens */
  --bg-warm:        #151923;
  --bg-copper-wash: rgba(157, 38, 43, 0.04);

  /* Light section surface tokens */
  --color-sand-50:   #F8F1E7;
  --color-sand-100:  #F3E7D5;
  --color-warm-card: #FFFDF9;
}

/* Primary Crimson scale — Alwakeel brand */
:root {
  --color-primary-50:  hsl(5, 60%, 97%);           /* #FAF0EF */
  --color-primary-100: rgb(249, 221, 211);          /* #F9DDD3 */
  --color-primary-200: hsl(12, 73%, 78%);           /* #EEB09F */
  --color-primary-300: rgb(232, 135, 112);          /* #E88770 */
  --color-primary-400: rgb(210, 87, 70);            /* #D25746 */
  --color-primary-500: rgb(184, 52, 50);            /* #B83432 */
  --color-primary-600: rgb(157, 38, 43);            /* #9D262B ← MAIN BRAND */
  --color-primary-700: rgb(128, 29, 35);            /* #801D23 */
  --color-primary-800: rgb(101, 22, 28);            /* #65161C */
  --color-primary-900: rgb(75, 15, 20);             /* #4B0F14 */
  --color-primary-950: rgb(52, 10, 14);             /* #340A0E */
  --color-primary-hover:  rgb(128, 29, 35);         /* #801D23 */
  --color-primary-active: rgb(101, 22, 28);         /* #65161C */
  --color-primary-glow:   rgba(157, 38, 43, 0.25);
}

/* Dark Theme Background Scale - hsl(210, 20%, 6%) */
:root {
  --color-dark-50: hsl(210, 20%, 95%);
  --color-dark-100: hsl(210, 20%, 88%);
  --color-dark-200: hsl(210, 20%, 78%);
  --color-dark-300: hsl(210, 20%, 68%);
  --color-dark-400: hsl(210, 20%, 58%);
  --color-dark-500: hsl(210, 20%, 43%);
  --color-dark-600: hsl(210, 20%, 38%);
  --color-dark-700: hsl(210, 20%, 33%);
  --color-dark-800: hsl(210, 20%, 28%);
  --color-dark-900: hsl(210, 20%, 18%);
  --color-dark-950: hsl(210, 20%, 6%);
}

/* Semantic Colors */
:root {
  --color-success: hsl(142, 71%, 45%);
  --color-warning: hsl(38, 92%, 50%);
  --color-error: hsl(0, 84%, 60%);
  --color-info: hsl(199, 89%, 48%);
}

/* Typography */
:root {
  --font-family-primary: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */

  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
}

/* Spacing Scale (4px base grid) */
:root {
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-7: 1.75rem;   /* 28px */
  --space-8: 2rem;      /* 32px */
  --space-9: 2.25rem;   /* 36px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-14: 3.5rem;   /* 56px */
  --space-16: 4rem;     /* 64px */
  --space-18: 4.5rem;   /* 72px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-28: 7rem;     /* 112px */
  --space-32: 8rem;     /* 128px */
}

/* Border Radius — premium rounded */
:root {
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-2xl:  36px;
  --radius-full: 9999px;
}

/* Semantic Background Tokens */
:root {
  --bg-body:    var(--color-navy-950);  /* #0A0F1C */
  --bg-surface: var(--color-navy-900);  /* #0F1628 */
  --bg-elevated: var(--color-navy-800); /* #1A2340 */
  --bg-sunken:  #060911;
  --bg-overlay: rgba(10, 15, 28, 0.82);
}

/* Semantic Text Tokens */
:root {
  --text-primary:    var(--color-warm-white);  /* #F2EDE7 */
  --text-secondary:  var(--color-soft-gray);   /* #C4CEDC */
  --text-muted:      var(--color-muted-text);  /* #7A8BA8 */
  --text-inverse:    var(--color-navy-950);
  --text-link:       var(--color-primary-300);
  --text-link-hover: var(--color-primary-400);
  --text-gold:       var(--color-gold-400);
  --text-copper:     var(--color-copper-400);
}

/* Semantic Border Tokens */
:root {
  --border-active: var(--color-gold-500);
}

/* Interactive State Tokens */
:root {
  --color-error-glow:   rgba(248, 81, 73, 0.15);
  --color-success-glow: rgba(34, 197, 94, 0.15);
}

/* Gradient Tokens */
:root {
  --gradient-gold:     linear-gradient(135deg, var(--color-gold-500) 0%, var(--color-gold-400) 100%);
  --gradient-gold-btn: linear-gradient(135deg, #9D262B 0%, #801D23 100%);
  --gradient-copper:   linear-gradient(135deg, #9D262B 0%, #801D23 100%);
  --gradient-dark:     linear-gradient(180deg, var(--bg-body) 0%, var(--bg-sunken) 100%);
  --gradient-hero:     linear-gradient(135deg, rgba(10,15,28,0.97) 0%, rgba(10,15,28,0.82) 40%, rgba(10,15,28,0.60) 70%, rgba(10,15,28,0.40) 100%);
  --gradient-surface:  linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  --gradient-card:     linear-gradient(180deg, #172033 0%, #101827 100%);
  --gradient-cta:      linear-gradient(135deg, var(--color-gold-500) 0%, #801D23 100%);
  --gradient-beam:     linear-gradient(90deg, transparent 0%, var(--color-gold-500) 20%, var(--color-copper-500) 50%, var(--color-gold-500) 80%, transparent 100%);
  /* Legacy alias */
  --gradient-primary: var(--gradient-gold);
}

/* Shadows */
:root {
  --shadow-sm:      0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md:      0 4px 8px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg:      0 10px 20px -3px rgb(0 0 0 / 0.45), 0 4px 8px -4px rgb(0 0 0 / 0.35);
  --shadow-xl:      0 20px 30px -5px rgb(0 0 0 / 0.55), 0 8px 12px -6px rgb(0 0 0 / 0.40);
  --shadow-glow:    0 0 20px var(--color-primary-glow);
  --shadow-glow-lg: 0 0 40px var(--color-primary-glow);
}

/* Motion Tokens */
:root {
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-micro: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  --transition-fast: var(--duration-fast) var(--ease-smooth);
  --transition-normal: var(--duration-normal) var(--ease-smooth);
  --transition-slow: var(--duration-slow) var(--ease-smooth);
}

/* RTL Support */
[dir="rtl"] {
  --direction: rtl;
  --text-align-start: right;
  --text-align-end: left;
  --margin-start: margin-right;
  --margin-end: margin-left;
  --padding-start: padding-right;
  --padding-end: padding-left;
}

[dir="ltr"] {
  --direction: ltr;
  --text-align-start: left;
  --text-align-end: right;
  --margin-start: margin-left;
  --margin-end: margin-right;
  --padding-start: padding-left;
  --padding-end: padding-right;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-family-primary);
  line-height: var(--line-height-normal);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--bg-body);
  direction: var(--direction, ltr);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
}

h1 { font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl)); }
h2 { font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-4xl)); }
h3 { font-size: clamp(var(--font-size-xl), 3vw, var(--font-size-3xl)); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  margin: 0 0 var(--space-4) 0;
  color: var(--text-secondary);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--text-link-hover);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 var(--container-padding, 1rem);
}

.section {
  padding: var(--section-padding-y) 0;
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.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;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-start { text-align: var(--text-align-start); }
.text-end { text-align: var(--text-align-end); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* ==========================================================================
   Accessibility — Focus Styles
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--color-gold-400);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ==========================================================================
   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;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Safe Area (Notch Devices)
   ========================================================================== */

@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer .footer-bottom {
    padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
  }
}

/* ==========================================================================
   Images
   ========================================================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  body {
    background: white;
    color: #000;
  }

  .site-header,
  .site-footer,
  .menu-toggle,
  .header-actions,
  .cta-section,
  .pagination {
    display: none !important;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}