/* =====================================================
   MAHDI AMARIA — PORTFOLIO DESIGN SYSTEM
   Premium Dark Theme • Multilingual RTL-Ready
   ===================================================== */

/* --- Google Fonts --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* --- CSS Custom Properties --- */
:root {
  /* Palette */
  --bg: #07111a;
  --bg-subtle: #0b1622;
  --bg-card: #0d1a28;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-hover: rgba(255, 255, 255, 0.07);
  --soft: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --text: #f0f4f8;
  --muted: #8ea3b8;
  --accent: #4fd1b5;
  --accent2: #6c7bff;
  --accent-glow: rgba(79, 209, 181, 0.12);
  --accent2-glow: rgba(108, 123, 255, 0.1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 60px rgba(79, 209, 181, 0.06);

  /* Typography */
  --font:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.25rem;
  --fs-hero: 3rem;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Layout */
  --max-width: 1180px;
  --gutter: 24px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration: 0.3s;
  --duration-fast: 0.18s;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--fs-base);
}

/* Background ambient glow — top */
body::before {
  content: "";
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 700px;
  background: radial-gradient(
    ellipse 80% 50% at center,
    rgba(108, 123, 255, 0.06) 0%,
    rgba(79, 209, 181, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(7, 17, 26, 0.82);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--duration) var(--ease);
}

.nav.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: var(--space-4);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav__logo-letter {
  font-size: 16px;
  font-weight: 900;
  color: #07111a;
  line-height: 1;
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
}

.nav__name {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

.nav__role {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease);
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.01em;
}

.nav__link:hover {
  color: var(--text);
  background: var(--soft);
}

.nav__link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav__lang-group {
  display: flex;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  background: rgba(255, 255, 255, 0.02);
}

.nav__lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--duration-fast) var(--ease);
  letter-spacing: 0.04em;
}

.nav__lang-btn:hover {
  color: var(--text);
  background: var(--soft);
}

.nav__lang-btn.active {
  background: var(--accent);
  color: #07111a;
}

/* Mobile hamburger */
.nav__toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: var(--space-2);
  flex-direction: column;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

.nav__toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  padding-top: var(--space-14);
  padding-bottom: var(--space-12);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero__ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero__ambient::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(79, 209, 181, 0.06) 0%,
    transparent 60%
  );
  animation: ambient-float 20s ease-in-out infinite;
}

.hero__ambient::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(108, 123, 255, 0.05) 0%,
    transparent 60%
  );
  animation: ambient-float 25s ease-in-out infinite reverse;
}

@keyframes ambient-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(30px, -20px);
  }
  66% {
    transform: translate(-20px, 15px);
  }
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-10);
  align-items: center;
}

.hero__main {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  position: relative;
}

.hero__main::before {
  display: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  color: var(--muted);
  font-size: var(--fs-xs);
  margin-bottom: var(--space-6);
  letter-spacing: 0.02em;
}

.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse-dot 2.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 680px;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__text {
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--muted);
  margin-top: var(--space-5);
  max-width: 640px;
  font-weight: 400;
}

.hero__ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

/* --- Buttons --- */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #07111a;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--fs-sm);
  font-family: var(--font);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all var(--duration) var(--ease);
  box-shadow: 0 4px 24px rgba(79, 209, 181, 0.15);
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 209, 181, 0.25);
}

.btn-primary .btn-icon {
  transition: transform var(--duration) var(--ease);
}

.btn-primary:hover .btn-icon {
  transform: translateX(3px);
}

[dir="rtl"] .btn-primary:hover .btn-icon {
  transform: translateX(-3px) scaleX(-1);
}

[dir="rtl"] .btn-primary .btn-icon {
  transform: scaleX(-1);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-sm);
  font-family: var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all var(--duration) var(--ease);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--soft);
  transform: translateY(-2px);
}

/* --- Hero Stats (Left Side Footer) --- */
.hero__stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__stat-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__stat-value {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* --- Hero Portrait (Right Side) --- */
.hero__portrait-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero__portrait-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.hero__portrait-glow {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(
    circle at center,
    rgba(108, 123, 255, 0.08) 0%,
    transparent 60%
  );
  z-index: 0;
  pointer-events: none;
}

.hero__portrait-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  transition: transform 0.8s var(--ease-out);
  filter: contrast(1.02) saturate(1.05); /* Slight polish */
}

.hero__portrait-container:hover .hero__portrait-img {
  transform: scale(1.03);
}

.hero__portrait-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  background: linear-gradient(to top, rgba(7, 17, 26, 0.8) 0%, transparent 40%);
  z-index: 2;
  pointer-events: none;
}

/* =====================================================
   SECTIONS — SHARED
   ===================================================== */
.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-14);
  position: relative;
  z-index: 1;
}

.section__header {
  margin-bottom: var(--space-8);
}

.section__title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section__subtitle {
  color: var(--muted);
  max-width: 580px;
  line-height: 1.7;
  font-size: var(--fs-base);
  margin-top: var(--space-3);
}

/* --- Card --- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--border-hover);
}

/* =====================================================
   ABOUT SECTION
   ===================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.about__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.about__text {
  color: var(--muted);
  line-height: 1.85;
  margin-top: var(--space-5);
  font-size: var(--fs-base);
}

.strengths__list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.strength-item {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: var(--fs-sm);
  transition: all var(--duration-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.strength-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--duration-fast) var(--ease);
}

.strength-item:hover {
  background: var(--soft);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.strength-item:hover::before {
  opacity: 1;
}

[dir="rtl"] .strength-item:hover {
  transform: translateX(-4px);
}

/* =====================================================
   PRODUCTS SECTION
   ===================================================== */
.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* Flagship product spans full width on first row */
.products__grid .product-card--flagship {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.products__grid .product-card--flagship .product-card__mockup {
  aspect-ratio: 16 / 11;
  border-radius: 0;
}

.products__grid .product-card--flagship .product-card__body {
  padding: var(--space-8);
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-card--flagship {
  border-color: rgba(79, 209, 181, 0.15);
  background: linear-gradient(
    135deg,
    rgba(79, 209, 181, 0.04),
    rgba(108, 123, 255, 0.04)
  );
}

.product-card--flagship:hover {
  border-color: rgba(79, 209, 181, 0.35);
  box-shadow:
    var(--shadow),
    0 0 60px rgba(79, 209, 181, 0.06);
}

.product-card__mockup {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
}

.product-card__mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.product-card:hover .product-card__mockup img {
  transform: scale(1.03);
}

.product-card__mockup-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  background: rgba(7, 17, 26, 0.7);
  backdrop-filter: blur(12px);
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
}

[dir="rtl"] .product-card__mockup-badge {
  left: auto;
  right: var(--space-3);
}

.product-card__body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__subtitle {
  display: inline-flex;
  border-radius: var(--radius-pill);
  padding: 5px 11px;
  background: var(--accent2-glow);
  color: #b3bcff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  width: fit-content;
  letter-spacing: 0.01em;
}

.product-card__name {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.product-card__impact {
  color: var(--accent);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
}

.product-card__desc {
  color: var(--muted);
  line-height: 1.75;
  font-size: var(--fs-sm);
  flex: 1;
}

.product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.tag {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease);
  letter-spacing: 0.01em;
}

.tag:hover {
  border-color: var(--border-hover);
  background: var(--soft);
  color: var(--text);
}

/* =====================================================
   FEATURED TECHNOLOGIES
   ===================================================== */
.tech__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

.tech-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  transition: all var(--duration) var(--ease);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.tech-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(79, 209, 181, 0.04),
    rgba(108, 123, 255, 0.04)
  );
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.tech-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.tech-item:hover::before {
  opacity: 1;
}

.tech-item__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  border-radius: var(--radius-md);
  font-size: 18px;
  position: relative;
  z-index: 1;
}

.tech-item__name {
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-1);
  position: relative;
  z-index: 1;
}

.tech-item__desc {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* =====================================================
   ARCHITECTURE SECTION
   ===================================================== */
.architecture__card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.architecture__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent2),
    var(--accent),
    transparent
  );
  opacity: 0.3;
}

.architecture__text {
  color: var(--muted);
  line-height: 1.85;
  margin-top: var(--space-4);
  font-size: var(--fs-base);
  max-width: 800px;
}

.architecture__blocks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
  position: relative;
}

.arch-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--duration) var(--ease);
  position: relative;
}

.arch-block:hover {
  background: var(--soft);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.arch-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.arch-block:hover::before {
  opacity: 1;
}

.arch-block__title {
  font-weight: 800;
  margin-bottom: var(--space-3);
  line-height: 1.4;
  font-size: var(--fs-sm);
}

.arch-block__text {
  color: var(--muted);
  line-height: 1.75;
  font-size: var(--fs-xs);
}

/* =====================================================
   CASE STUDIES + KONVORO DEEP DIVE
   ===================================================== */
.cases__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-6);
}

.cases__list {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.case-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.025);
  transition: all var(--duration) var(--ease);
}

.case-item:hover {
  border-color: var(--border-hover);
  background: var(--soft);
}

.case-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.case-item__title {
  font-weight: 800;
  font-size: var(--fs-md);
}

.case-item__result {
  color: var(--accent);
  font-weight: 700;
  font-size: var(--fs-xs);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.case-item__text {
  color: var(--muted);
  line-height: 1.8;
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
}

/* Konvoro Deep Dive Card */
.deep-dive {
  background: linear-gradient(
    180deg,
    rgba(108, 123, 255, 0.1),
    rgba(79, 209, 181, 0.06)
  );
  border: 1px solid rgba(108, 123, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.deep-dive::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  opacity: 0.5;
}

.deep-dive__badge {
  display: inline-flex;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  background: rgba(108, 123, 255, 0.15);
  color: #b3bcff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: var(--space-5);
  letter-spacing: 0.03em;
}

.deep-dive__title {
  font-size: var(--fs-2xl);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.deep-dive__text {
  color: #c0c8e0;
  line-height: 1.82;
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}

.deep-dive__points {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.deep-dive__point {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.7;
  font-size: var(--fs-sm);
  transition: all var(--duration-fast) var(--ease);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.deep-dive__point::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

[dir="rtl"] .deep-dive__point::before {
  content: "←";
}

.deep-dive__point:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

/* =====================================================
   CTA BANNER
   ===================================================== */
.cta-banner {
  background: linear-gradient(
    135deg,
    rgba(79, 209, 181, 0.06),
    rgba(108, 123, 255, 0.06)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}

.cta-banner__text {
  max-width: 620px;
}

.cta-banner__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.cta-banner__desc {
  color: var(--muted);
  line-height: 1.7;
  font-size: var(--fs-base);
}

/* =====================================================
   CONTACT SECTION
   ===================================================== */
.contact__card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.contact__card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  opacity: 0.2;
}

.contact__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.contact__text {
  color: var(--muted);
  line-height: 1.8;
  margin-top: var(--space-3);
  max-width: 560px;
  font-size: var(--fs-base);
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.contact__link-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--duration-fast) var(--ease);
  text-decoration: none;
  color: inherit;
}

.contact__link-item:hover {
  border-color: var(--border-hover);
  background: var(--soft);
  transform: translateX(4px);
}

[dir="rtl"] .contact__link-item:hover {
  transform: translateX(-4px);
}

.contact__link-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact__link-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  line-height: 1.2;
}

.contact__link-value {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-top: 2px;
}

.contact__cta-wrapper {
  display: flex;
  align-items: center;
}

.contact__cta-btn {
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #07111a;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  font-weight: 800;
  white-space: nowrap;
  font-size: var(--fs-base);
  transition: all var(--duration) var(--ease);
  box-shadow: 0 4px 24px rgba(79, 209, 181, 0.2);
  display: inline-flex;
  align-items: center;
}

.contact__cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 209, 181, 0.3);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.footer__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
}

/* =====================================================
   SCROLL REVEAL ANIMATION
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   RTL SUPPORT
   ===================================================== */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav__links {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav__brand {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero__ctas {
  flex-direction: row-reverse;
}

[dir="rtl"] .section__header {
  text-align: right;
}

[dir="rtl"] .case-item__header {
  flex-direction: row-reverse;
}

[dir="rtl"] .product-card__tags {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer__inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .contact__card {
  direction: rtl;
}

[dir="rtl"] .contact__link-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .contact__link-item > div {
  text-align: right;
}

[dir="rtl"] .products__grid .product-card--flagship {
  grid-template-columns: 1fr 1.2fr;
  direction: rtl;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

/* Large Tablet */
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-14);
  }

  .hero__portrait-wrapper {
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
  }

  .hero__portrait-container {
    max-width: 100%;
  }

  .hero__stats {
    justify-content: flex-start;
    gap: var(--space-6);
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products__grid .product-card--flagship {
    grid-column: 1 / -1;
  }

  .tech__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .architecture__blocks {
    grid-template-columns: repeat(2, 1fr);
  }

  .architecture__card {
    padding: var(--space-8);
  }

  .cases__grid {
    grid-template-columns: 1fr;
  }

  .contact__card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact__links {
    align-items: center;
  }

  .contact__link-item {
    max-width: 380px;
    width: 100%;
  }

  .contact__cta-wrapper {
    justify-content: center;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__main {
    padding: var(--space-8);
  }
}

/* Tablet */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(7, 17, 26, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-4) var(--gutter);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--duration) var(--ease);
    z-index: 99;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav__link {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--fs-sm);
  }

  .hero {
    padding-top: var(--space-10);
    padding-bottom: var(--space-8);
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .hero__text {
    font-size: var(--fs-base);
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-4);
    align-items: flex-start;
    border-top: none;
    margin-top: var(--space-6);
    padding-top: var(--space-4);
  }

  .products__grid {
    grid-template-columns: 1fr;
  }

  .products__grid .product-card--flagship {
    grid-template-columns: 1fr;
  }

  .tech__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .architecture__blocks {
    grid-template-columns: 1fr;
  }

  .section__title {
    font-size: var(--fs-xl);
  }

  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-8);
  }

  .contact__card {
    padding: var(--space-6);
  }

  .contact__link-item {
    max-width: 100%;
  }

  [dir="rtl"] .nav__links {
    flex-direction: column;
  }

  [dir="rtl"] .products__grid .product-card--flagship {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }

  .hero__main {
    padding: var(--space-6);
  }

  .hero__title {
    font-size: 1.5rem;
  }

  .tech__grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-card__body {
    padding: var(--space-5);
  }

  .architecture__card {
    padding: var(--space-6);
  }

  .cta-banner {
    padding: var(--space-6);
  }

  .contact__card {
    padding: var(--space-5);
  }

  .nav__brand-text .nav__role {
    display: none;
  }
}
