/* ============================================================
   Zemzeme Website — style.css
   Design system, resets, global styles, layout utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Colors */
  --bg-primary:      #000000;
  --bg-surface:      #000000;
  --bg-card:         #000000;
  --bg-card-hover:   #0A0A0A;
  --accent:          #00E5FF;
  --accent-hover:    #00B8D4;
  --accent-dim:      #007A8C;
  --accent-glow:     rgba(0, 229, 255, 0.15);
  --accent-glow-sm:  rgba(0, 229, 255, 0.08);
  --text-primary:    #FFFFFF;
  --text-secondary:  #8A9BB0;
  --text-muted:      #4A5568;
  --border:          rgba(0, 229, 255, 0.2);
  --border-subtle:   rgba(255, 255, 255, 0.06);
  --danger:          #FF4757;
  --success:         #2ED573;
  --warning:         #FFA502;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;
  --space-3xl:  96px;
  --space-4xl:  128px;

  /* Typography */
  --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --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-size-7xl:  4.5rem;    /* 72px */

  /* Borders & Radii */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Shadows & Glows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.7);
  --glow-accent:  0 0 20px rgba(0, 229, 255, 0.3), 0 0 60px rgba(0, 229, 255, 0.1);
  --glow-sm:      0 0 8px rgba(0, 229, 255, 0.25);
  --glow-border:  0 0 0 1px rgba(0, 229, 255, 0.4), 0 0 20px rgba(0, 229, 255, 0.15);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Layout */
  --container-max: 1200px;
  --nav-height:    72px;
}

/* ── Reset ── */
*, *::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-family);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font-family);
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-family);
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

.section {
  padding: var(--space-3xl) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--font-size-6xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

@media (max-width: 1024px) {
  h1 { font-size: var(--font-size-5xl); }
  h2 { font-size: var(--font-size-3xl); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
}

@media (max-width: 480px) {
  h1 { font-size: var(--font-size-3xl); }
}

.text-accent   { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-muted    { color: var(--text-muted); }
.text-center   { text-align: center; }
.text-left     { text-align: left; }
.text-right    { text-align: right; }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black    { font-weight: 900; }

/* ── Section Headers ── */
.section-label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent-glow-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.15;
}

@media (max-width: 768px) {
  .section-title { font-size: var(--font-size-3xl); }
}

@media (max-width: 480px) {
  .section-title { font-size: var(--font-size-2xl); }
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ── Flex / Grid Helpers ── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

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

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

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-xl) 0;
}

/* ── Accent Line ── */
.accent-line {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-full);
  box-shadow: var(--glow-sm);
}

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

.badge-accent {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--border);
}

.badge-success {
  background: rgba(46, 213, 115, 0.12);
  color: var(--success);
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.badge-warning {
  background: rgba(255, 165, 2, 0.12);
  color: var(--warning);
  border: 1px solid rgba(255, 165, 2, 0.3);
}

.badge-muted {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ── Pill / Tag ── */
.pill {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--accent-glow-sm);
  color: var(--accent);
}

/* ── Scanline effect (hero background texture) ── */
.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Glowing border card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base), background var(--transition-base);
}

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

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── Selection ── */
::selection {
  background: rgba(0, 229, 255, 0.25);
  color: var(--text-primary);
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── RTL Support (Farsi / Persian) ── */
html[lang="fa"] {
  direction: rtl;
}

html[lang="fa"] body {
  font-family: 'Nunito', Tahoma, Arial, sans-serif;
  text-align: right;
}

html[lang="fa"] .text-left { text-align: right; }
html[lang="fa"] .text-right { text-align: left; }

html[lang="fa"] .section-header {
  text-align: center;
}

/* ── Utility: visually hidden ── */
.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;
}
