/* ==========================================================
   D PRO — DESIGN SYSTEM
   Industrial Minimal Power · B&W + 5% yellow · Rubik · RTL
   ========================================================== */

/* --- TOKENS --- */
:root {
  /* Colors */
  --black: #000000;
  --white: #FFFFFF;
  --yellow: #FFC20E;
  --yellow-dim: #B88600;
  --gray-950: #050505;
  --gray-900: #0A0A0A;
  --gray-800: #171717;
  --gray-700: #262626;
  --gray-600: #404040;
  --gray-500: #737373;
  --gray-400: #A3A3A3;
  --gray-300: #D4D4D4;

  /* Type scale */
  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: clamp(24px, 3vw, 32px);
  --fs-2xl: clamp(32px, 5vw, 48px);
  --fs-3xl: clamp(40px, 7vw, 72px);
  --fs-4xl: clamp(48px, 9vw, 96px);

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Layout */
  --container: 1240px;
  --header-h: 64px;

  /* Lines */
  --line: 1px solid var(--gray-800);
  --line-strong: 1px solid var(--gray-600);

  /* Radii — keep sharp, industrial */
  --r-0: 0;
  --r-1: 2px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, video, svg { display: block; max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

/* --- BASE --- */
html, body { background: var(--black); color: var(--white); min-height: 100%; }
body {
  font-family: 'Rubik', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.55;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'kern' 1, 'liga' 1;
  overflow-x: hidden;
}

::selection { background: var(--yellow); color: var(--black); }

/* RTL fixes — wordmark must NOT mirror */
.wordmark {
  direction: ltr;
  unicode-bidi: bidi-override;
  letter-spacing: .02em;
}
.wordmark .sq {
  display: inline-block;
  width: .13em;
  height: .13em;
  background: var(--yellow);
  margin: 0 .1em;
}
.tagline { white-space: nowrap; }

/* Focus — accessibility */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* --- CONTAINER --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--sp-5);
  padding-right: var(--sp-5);
}
@media (min-width: 768px) {
  .container { padding-left: var(--sp-7); padding-right: var(--sp-7); }
}

/* --- TYPOGRAPHY UTILITIES --- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: var(--sp-3);
}
.eyebrow.muted { color: var(--gray-500); }

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.01em;
}
.h1 { font-size: var(--fs-3xl); line-height: 1.02; }
.h2 { font-size: var(--fs-2xl); }
.h3 { font-size: var(--fs-xl); }
.h4 { font-size: var(--fs-lg); font-weight: 700; line-height: 1.25; }

.lead {
  font-size: var(--fs-md);
  color: var(--gray-300);
  max-width: 60ch;
  line-height: 1.65;
}

.muted { color: var(--gray-500); }
.dim { color: var(--gray-400); }
.accent { color: var(--yellow); }

/* Section title with yellow accent bar */
.section-title {
  position: relative;
  margin-bottom: var(--sp-6);
}
.section-title::before {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--yellow);
  margin-bottom: var(--sp-3);
}

/* --- HEADER --- */
.header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: var(--line);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5);
}
.brand {
  font-size: 20px; font-weight: 900;
  font-family: 'Poppins', 'Rubik', system-ui, sans-serif;
  letter-spacing: .01em;
}
.nav {
  display: none;
}
@media (min-width: 900px) {
  .nav { display: flex; gap: var(--sp-7); align-items: center; }
}
.nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-300);
  transition: color .15s var(--ease);
  position: relative;
  padding: 6px 0;
}
.nav a:hover { color: var(--white); }
.nav a.active {
  color: var(--white);
}
.nav a.active::after {
  content: ''; position: absolute;
  inset: auto 0 -2px 0;
  height: 2px;
  background: var(--yellow);
}

.menu-btn {
  display: flex; padding: var(--sp-2);
  color: var(--white);
}
@media (min-width: 900px) { .menu-btn { display: none; } }

.mobile-menu {
  display: none;
  position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--black);
  z-index: 99;
  flex-direction: column;
  padding: var(--sp-7) var(--sp-5);
  gap: var(--sp-5);
  font-size: var(--fs-lg);
  font-weight: 700;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--white); padding: var(--sp-3) 0; border-bottom: var(--line); }
.mobile-menu a.active { color: var(--yellow); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px;
  min-height: 52px;
  font-size: var(--fs-md);
  font-weight: 700;
  border: 1px solid transparent;
  transition: all .2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--yellow);
  color: var(--black);
}
.btn-primary:hover { background: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--gray-600);
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-arrow { font-size: 18px; line-height: 1; }

/* --- CARDS --- */
.card {
  background: var(--gray-900);
  border: var(--line);
  padding: var(--sp-6);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
  display: flex; flex-direction: column;
}
@media (hover: hover) {
  .card:hover { border-color: var(--yellow); transform: translateY(-3px); }
}
.card-cover {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--gray-800), var(--gray-700));
  border: var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  position: relative;
  overflow: hidden;
}
.card-cover::after {
  content: ''; position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,194,14,.04), transparent 60%);
}
.card-meta {
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .14em;
  color: var(--yellow);
  margin-bottom: var(--sp-2);
}
.card-title { margin-bottom: var(--sp-3); }
.card-desc { color: var(--gray-400); font-size: var(--fs-sm); line-height: 1.65; }

/* --- HERO BLOCK --- */
.hero {
  position: relative;
  min-height: 92vh;
  padding-top: var(--header-h);
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 70% 30%, rgba(255,194,14,.05), transparent 60%),
    radial-gradient(circle at 20% 80%, var(--gray-900) 0%, var(--black) 60%);
  z-index: 0;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: .55;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--black) 5%, rgba(0,0,0,.4) 50%, transparent 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--sp-9) 0 var(--sp-8);
}
.hero h1 {
  font-size: var(--fs-3xl);
  font-weight: 900;
  line-height: 1;
  max-width: 18ch;
  margin-bottom: var(--sp-5);
}
.hero h1 .accent { color: var(--yellow); }
.hero .lead { margin-bottom: var(--sp-7); max-width: 56ch; }

/* --- SECTION SPACING --- */
section.block {
  padding: var(--sp-9) 0;
  border-top: var(--line);
}
section.block-tight { padding: var(--sp-8) 0; border-top: var(--line); }
@media (max-width: 700px) {
  section.block { padding: var(--sp-8) 0; }
  section.block-tight { padding: var(--sp-7) 0; }
}

/* --- GRID HELPERS --- */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--gray-800); }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- STAT BLOCK --- */
.stats { background: var(--gray-800); }
.stat {
  background: var(--black);
  padding: var(--sp-6) var(--sp-5);
  display: flex; flex-direction: column;
}
.stat .num {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--sp-3);
}
.stat .label {
  font-size: var(--fs-sm);
  color: var(--gray-400);
}
.stat .sub-label {
  font-size: var(--fs-xs);
  color: var(--gray-600);
  margin-top: var(--sp-1);
}

/* --- PRICING TIER --- */
.tier {
  background: var(--gray-900);
  border: var(--line);
  padding: var(--sp-7);
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.tier-featured {
  border-color: var(--yellow);
  border-width: 1.5px;
  background: var(--gray-950);
}
.tier-badge {
  position: absolute;
  top: -12px; right: var(--sp-6);
  background: var(--yellow); color: var(--black);
  font-size: var(--fs-xs); font-weight: 800;
  padding: 5px 10px;
  letter-spacing: .12em;
}
.tier-name {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.tier-featured .tier-name { color: var(--yellow); }
.tier-price {
  font-size: var(--fs-2xl);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}
.tier-price-suffix {
  font-size: var(--fs-sm);
  color: var(--gray-500);
  margin-bottom: var(--sp-5);
}
.tier-list {
  display: flex; flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.tier-list li {
  font-size: var(--fs-sm);
  color: var(--gray-300);
  position: relative;
  padding-inline-start: 20px;
  line-height: 1.55;
}
.tier-list li::before {
  content: '▸';
  color: var(--yellow);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
}
.tier-list li strong { font-weight: 700; color: var(--white); }

/* --- FORM --- */
.form-grid { display: grid; gap: var(--sp-5); }
.form-row { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gray-300);
}
.field input, .field select, .field textarea {
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  color: var(--white);
  padding: 14px 16px;
  font-size: var(--fs-base);
  transition: border-color .15s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--yellow);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field-ltr input { direction: ltr; text-align: left; }

/* --- FOOTER --- */
.footer {
  background: var(--black);
  border-top: var(--line);
  padding: var(--sp-7) 0 var(--sp-6);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 2fr 3fr; }
}
.footer .brand-block .tagline { color: var(--gray-400); margin-top: var(--sp-2); }
.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-5);
}
@media (min-width: 700px) {
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
}
.footer-nav a {
  color: var(--gray-300);
  font-size: var(--fs-sm);
  transition: color .15s var(--ease);
}
.footer-nav a:hover { color: var(--yellow); }
.footer-bottom {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: var(--line);
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-3);
  color: var(--gray-500);
  font-size: var(--fs-xs);
}
.footer-bottom .disclosure { max-width: 80ch; line-height: 1.7; }

/* --- DIVIDERS --- */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gray-700) 30%, var(--gray-700) 70%, transparent);
  margin: var(--sp-7) 0;
}

/* --- BADGE --- */
.badge {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  background: rgba(255,194,14,.06);
  letter-spacing: .06em;
}

/* --- HELPERS --- */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; justify-content: center; }
.gap-3 { gap: var(--sp-3); }
.gap-5 { gap: var(--sp-5); }
.mt-5 { margin-top: var(--sp-5); }
.mt-7 { margin-top: var(--sp-7); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
