/* ==========================================================================
   Zandesh Trade Co. | بازرگانی بین‌المللی زندش
   Ultra-Modern, Video-Centric & Mobile-First Stylesheet
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-dark: #070d18;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(22, 36, 64, 0.9);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 185, 129, 0.35);
  
  --emerald-primary: #059669;
  --emerald-light: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  
  --teal-accent: #0d9488;
  --navy-deep: #0a192f;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.7;
}

/* Background Ambient Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}

.glow-top-right {
  top: -100px;
  right: -50px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #059669 0%, rgba(5, 150, 105, 0) 70%);
}

.glow-bottom-left {
  bottom: 50px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #0f766e 0%, rgba(15, 118, 110, 0) 70%);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 13, 24, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-wrap {
  width: 44px;
  height: 44px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.brand-logo-wrap img,
.brand-logo-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-info h1 {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.brand-info span {
  font-size: 0.72rem;
  color: var(--emerald-light);
  font-weight: 500;
  display: block;
}

.header-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hero Section with High-Visibility Video */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 0 70px;
  overflow: hidden;
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  background: #0b1528 url('../images/hero-poster.jpg') center/cover no-repeat;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.48) contrast(1.15) saturate(1.1);
  transition: opacity 1s ease;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(7, 13, 24, 0.6) 0%,
    rgba(7, 13, 24, 0.35) 45%,
    rgba(7, 13, 24, 0.9) 92%,
    var(--bg-dark) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

.hero-title .highlight {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: #e2e8f0;
  max-width: 680px;
  margin: 0 auto 34px;
  line-height: 1.85;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Modern Countdown */
.countdown-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.countdown-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  min-width: 90px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, transparent);
}

.countdown-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  display: block;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.countdown-label {
  font-size: 0.8rem;
  color: #34d399;
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

/* VIP Email Form */
.notify-form-container {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.notify-form {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.notify-form:focus-within {
  border-color: var(--emerald-light);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
}

.notify-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 18px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  min-height: 46px;
  direction: ltr;
  text-align: right;
}

.notify-input::placeholder {
  color: #94a3b8;
  direction: rtl;
  text-align: right;
}

.notify-submit {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: var(--transition);
  min-height: 46px;
  flex-shrink: 0;
}

.notify-submit:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
  transform: scale(1.02);
}

.form-feedback {
  margin-top: 12px;
  font-size: 0.88rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-feedback.success {
  display: block;
  color: #34d399;
}

.form-feedback.error {
  display: block;
  color: #f87171;
}

/* Section Headings */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 38px;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald-light);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Sleek Compact Features Grid */
.features-section {
  padding: 40px 0 60px;
}

.tools-grid-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.compact-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: var(--transition);
}

.compact-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.compact-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-light);
  flex-shrink: 0;
}

.compact-icon svg {
  width: 24px;
  height: 24px;
}

.compact-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.4;
}

.compact-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.desktop-only {
  display: block;
}

/* Compact Interactive CBM Demo */
.calculator-preview-section {
  padding: 40px 0 70px;
}

.interactive-demo-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(11, 25, 44, 0.95));
  backdrop-filter: blur(18px);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 920px;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.demo-header {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.demo-title-area h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: inline-block;
  vertical-align: middle;
}

.demo-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

.cbm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cbm-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 600;
}

.input-group input {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  min-height: 44px;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--emerald-light);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.cbm-results {
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.cbm-visual-container {
  width: 100%;
  margin-bottom: 8px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbm-svg-graphic {
  width: 100%;
  height: auto;
  max-height: 125px;
  display: block;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.result-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-title {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.result-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.result-val.highlight {
  color: var(--emerald-light);
  font-size: 1.35rem;
}

/* Footer */
footer {
  background: rgba(2, 6, 23, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-contact a {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: var(--emerald-light);
}

#copyright-brand {
  cursor: pointer;
  user-select: none;
}

/* Admin Quick Email Viewer Modal */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-content {
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-modal-header h4 {
  color: #fff;
  font-size: 1.05rem;
}

.close-modal-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
}

.emails-list {
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 20px;
  background: rgba(2, 6, 23, 0.5);
  border-radius: var(--radius-md);
}

.admin-modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  background: var(--emerald-primary);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.modal-btn.outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Mobile-First Optimization & Video Visibility
   ========================================================================== */

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

@media (max-width: 768px) {
  .header-tagline {
    display: none;
  }

  /* Make Video Pop & Clearly Visible on Mobile */
  .hero-section {
    min-height: 85vh;
    padding: 24px 0 40px;
    align-items: flex-end; /* allows video crane action to be admired on top/middle */
  }

  .hero-video {
    filter: brightness(0.68) contrast(1.1) saturate(1.1); /* Brighter video on mobile */
  }

  /* Light translucent vignette on mobile so video is clearly visible */
  .video-overlay {
    background: linear-gradient(
      180deg,
      rgba(7, 13, 24, 0.35) 0%,
      rgba(7, 13, 24, 0.1) 40%,
      rgba(7, 13, 24, 0.75) 85%,
      var(--bg-dark) 100%
    );
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: 1.65rem;
    line-height: 1.35;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 0, 0, 0.8);
  }

  .hero-description {
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  /* Translucent glassy countdown on mobile */
  .countdown-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 22px;
  }

  .countdown-card {
    min-width: 0;
    padding: 10px 4px;
    background: rgba(7, 13, 24, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(255, 255, 255, 0.15);
  }

  .countdown-number {
    font-size: 1.6rem;
  }

  .countdown-label {
    font-size: 0.68rem;
  }

  /* Email Form on Mobile */
  .notify-form {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 8px;
    gap: 8px;
    background: rgba(7, 13, 24, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .notify-input {
    width: 100%;
    border-radius: var(--radius-md);
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 16px;
    text-align: center;
    direction: ltr;
  }

  .notify-input::placeholder {
    text-align: center;
  }

  .notify-submit {
    width: 100%;
    border-radius: var(--radius-md);
    justify-content: center;
  }

  .tools-grid-compact {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .compact-card {
    padding: 16px 14px;
    gap: 12px;
  }

  /* Hide CBM calculator on mobile per user directive - Desktop / PC Only */
  .calculator-preview-section,
  .desktop-only {
    display: none !important;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-contact {
    justify-content: center;
  }
}

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