/* ================================================================
   SMARTTECH KITCHEN SOLUTIONS — DESIGN SYSTEM
   main.css | Design Tokens + Utilities + Base Styles
   ================================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
  /* ---- Brand Colors ---- */
  --color-primary:        #1A3A5C;
  --color-primary-dark:   #0F2640;
  --color-primary-light:  #2563EB;
  --color-primary-glow:   rgba(37,99,235,0.18);

  --color-secondary:      #FFFFFF;
  --color-accent:         #2D3748;
  --color-success:        #22C55E;
  --color-emergency:      #EF4444;
  --color-emergency-dark: #B91C1C;
  --color-warning:        #F59E0B;

  --color-bg:             #F0F4F8;
  --color-bg-dark:        #0D1B2A;
  --color-bg-card:        #FFFFFF;
  --color-surface:        #E8EFF7;

  --color-text-primary:   #0F172A;
  --color-text-secondary: #475569;
  --color-text-muted:     #94A3B8;
  --color-text-inverse:   #FFFFFF;

  /* ---- Gradients ---- */
  --gradient-primary:     linear-gradient(135deg, #1A3A5C 0%, #2563EB 100%);
  --gradient-dark:        linear-gradient(135deg, #0D1B2A 0%, #1A3A5C 100%);
  --gradient-hero:        linear-gradient(135deg, rgba(13,27,42,0.92) 0%, rgba(26,58,92,0.80) 60%, rgba(37,99,235,0.55) 100%);
  --gradient-emergency:   linear-gradient(135deg, #7F1D1D 0%, #EF4444 100%);
  --gradient-card:        linear-gradient(145deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%);
  --gradient-success:     linear-gradient(135deg, #14532D 0%, #22C55E 100%);
  --gradient-gold:        linear-gradient(135deg, #78350F 0%, #F59E0B 100%);

  /* ---- Typography ---- */
  --font-primary:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic:     'Tajawal', 'Noto Sans Arabic', 'Arial Unicode MS', sans-serif;

  --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 */

  --weight-light:     300;
  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;
  --weight-extrabold: 800;
  --weight-black:     900;

  --leading-tight:  1.2;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;
  --leading-loose:  2;

  /* ---- Spacing ---- */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* ---- Border Radius ---- */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.08);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.10);
  --shadow-xl:   0 20px 60px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.12);
  --shadow-2xl:  0 40px 80px rgba(0,0,0,0.22);
  --shadow-glow: 0 0 40px rgba(37,99,235,0.35);
  --shadow-emergency: 0 0 30px rgba(239,68,68,0.40);
  --shadow-card:  0 2px 20px rgba(26,58,92,0.10);
  --shadow-card-hover: 0 12px 40px rgba(26,58,92,0.18);

  /* ---- Transitions ---- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---- Z-Index ---- */
  --z-below:   -1;
  --z-base:     0;
  --z-above:    10;
  --z-sticky:   100;
  --z-overlay:  200;
  --z-modal:    300;
  --z-toast:    400;
  --z-max:      999;

  /* ---- Layout ---- */
  --container-max:  1280px;
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1280px;

  --header-height:      72px;
  --header-height-mob:  64px;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Arabic/RTL body */
body[lang="ar"],
body[lang="ur"] {
  font-family: var(--font-arabic);
  direction: rtl;
}

body[lang="hi"],
body[lang="ml"] {
  font-family: var(--font-primary);
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
}

/* ================================================================
   CONTAINER
   ================================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 640px)  { .container { padding-inline: var(--space-6); } }
@media (min-width: 1024px) { .container { padding-inline: var(--space-8); } }
@media (min-width: 1280px) { .container { padding-inline: var(--space-12); } }

/* ================================================================
   TYPOGRAPHY UTILITIES
   ================================================================ */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-4);
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.section-eyebrow--light {
  color: rgba(255,255,255,0.75);
}
.section-eyebrow--light::before {
  background: rgba(255,255,255,0.5);
}

.section-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-5xl));
  font-weight: var(--weight-black);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.section-title--light {
  color: var(--color-text-inverse);
}

.section-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title--light span {
  background: linear-gradient(135deg, #60A5FA 0%, #93C5FD 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-top: var(--space-4);
}

.section-subtitle--light {
  color: rgba(255,255,255,0.72);
}

.section-header {
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-eyebrow {
  justify-content: center;
}

.section-header--center .section-subtitle {
  margin-inline: auto;
}

/* ================================================================
   SECTION PADDING
   ================================================================ */
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.section--bg-white { background: var(--color-secondary); }
.section--bg-light { background: var(--color-bg); }
.section--bg-dark  { background: var(--color-bg-dark); }
.section--bg-primary { background: var(--color-primary); }
.section--bg-surface { background: var(--color-surface); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
}

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

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

/* Primary Button */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 20px rgba(37,99,235,0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(37,99,235,0.50);
  transform: translateY(-2px);
}

/* Secondary Button */
.btn-secondary {
  background: rgba(255,255,255,0.10);
  color: var(--color-text-inverse);
  border-color: rgba(255,255,255,0.30);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.55);
  transform: translateY(-2px);
}

/* WhatsApp Button */
.btn-whatsapp {
  background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 20px rgba(37,211,102,0.40);
}

.btn-whatsapp:hover {
  box-shadow: 0 8px 30px rgba(37,211,102,0.55);
  transform: translateY(-2px);
}

/* Emergency Button */
.btn-emergency {
  background: var(--gradient-emergency);
  color: var(--color-text-inverse);
  box-shadow: 0 4px 20px rgba(239,68,68,0.40);
  animation: pulse-emergency 2s infinite;
}

.btn-emergency:hover {
  animation: none;
  box-shadow: 0 8px 30px rgba(239,68,68,0.60);
  transform: translateY(-2px);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
}

/* Button sizes */
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-lg); }
.btn-xl { padding: var(--space-5) var(--space-10); font-size: var(--text-xl); }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-slow);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px);
}

.card--glass {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
}

.card--glass:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-4px);
}

/* ================================================================
   BADGE
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge--primary  { background: var(--color-primary-glow); color: var(--color-primary-light); }
.badge--success  { background: rgba(34,197,94,0.15); color: var(--color-success); }
.badge--emergency{ background: rgba(239,68,68,0.15); color: var(--color-emergency); }
.badge--gold     { background: rgba(245,158,11,0.15); color: var(--color-warning); }

/* ================================================================
   DIVIDER
   ================================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26,58,92,0.15), transparent);
  margin: var(--space-6) 0;
}

/* ================================================================
   GRID UTILITIES
   ================================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ================================================================
   SCROLL REVEAL ANIMATIONS
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1),
              transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: none;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ================================================================
   KEYFRAMES
   ================================================================ */
@keyframes pulse-emergency {
  0%, 100% { box-shadow: 0 4px 20px rgba(239,68,68,0.40); }
  50%       { box-shadow: 0 4px 40px rgba(239,68,68,0.75), 0 0 0 8px rgba(239,68,68,0.12); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes ping {
  0%   { transform: scale(1); opacity: 1; }
  75%, 100% { transform: scale(2); opacity: 0; }
}

@keyframes counter-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

/* ================================================================
   SELECTION
   ================================================================ */
::selection {
  background: rgba(37,99,235,0.20);
  color: var(--color-primary-dark);
}

/* ================================================================
   FOCUS (Accessibility)
   ================================================================ */
:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
