:root {
  --bg: #07090e;
  --bg-soft: #0d1219;
  --surface: rgba(15, 23, 34, 0.65);
  --surface-strong: rgba(21, 31, 46, 0.85);

  --accent: #38bdf8;
  --accent-dark: #0284c7;
  --blue: #2563eb;
  --purple: #8b5cf6;

  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-light: #cbd5e1;

  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(56, 189, 248, 0.25);

  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(56, 189, 248, 0.08), transparent 40%),
    radial-gradient(circle at 100% 55%, rgba(37, 99, 235, 0.06), transparent 30%),
    var(--bg);
  font-family: "Vazirmatn", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}

.orb {
  position: fixed;
  z-index: -2;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
  pointer-events: none;
  animation: orbFloat 25s ease-in-out infinite alternate;
}

.orb-one {
  top: -200px;
  left: -150px;
  background: var(--blue);
}

.orb-two {
  right: -200px;
  bottom: 0;
  background: var(--accent);
  animation-delay: -10s;
}

.container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.navbar {
  position: sticky;
  top: 18px;
  z-index: 50;
  width: min(1160px, calc(100% - 48px));
  margin: 18px auto 0;
  padding: 12px 24px;
  position: relative; 
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  direction: ltr;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 4px;
  white-space: nowrap;
  z-index: 5;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  z-index: 1;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.nav-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  transition: all 0.25s var(--ease);
}

.nav-auth-login-button {
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
}

.nav-auth-login-button:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.user-account-menu {
  position: relative;
  z-index: 30;
}

.user-account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 5px 10px 5px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-family: inherit;
  text-align: right;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.user-account-menu-trigger:hover,
.user-account-menu-is-open .user-account-menu-trigger {
  border-color: var(--border-accent);
  background: rgba(56, 189, 248, 0.08);
}

.user-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
}

.user-account-summary {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.2;
}

.user-account-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 500;
}

.user-account-name {
  max-width: 110px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-account-menu-arrow {
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform 0.25s var(--ease);
}

.user-account-menu-is-open .user-account-menu-arrow {
  transform: rotate(180deg);
}

.user-account-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 240px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  color: var(--text);
  background: rgba(13, 18, 25, 0.95);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s var(--ease);
}

.user-account-menu-is-open .user-account-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.user-account-dropdown-header {
  display: grid;
  gap: 2px;
  padding: 8px 10px 12px;
}

.user-account-dropdown-label {
  color: var(--muted);
  font-size: 0.65rem;
}

.user-account-dropdown-full-name {
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-account-dropdown-email {
  overflow: hidden;
  direction: ltr;
  color: var(--muted-light);
  font-family: sans-serif;
  font-size: 0.7rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-account-dropdown-divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--border);
}

.user-account-menu-link,
.user-account-signout-button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: right;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.user-account-menu-link {
  color: var(--text);
}

.user-account-menu-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.user-account-signout-button {
  color: #fca5a5;
  margin-top: 2px;
}

.user-account-signout-button:hover:not(:disabled) {
  color: #fff;
  background: rgba(239, 68, 68, 0.9);
}

.user-account-signout-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.user-account-link-icon,
.user-account-signout-icon {
  display: flex;
  align-items: center;
  opacity: 0.8;
}

.hero {
  position: relative;
  min-height: 600px;
  padding: 130px 0 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-content {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  width: fit-content;
  margin: 0 auto 24px;
  padding: 6px 14px;
  border: 1px solid var(--border-accent);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.05);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  direction: ltr;
  animation: reveal 0.8s var(--ease) both;
}

.hero h1 {
  direction: ltr;
  display: block;
  width: 100%;
  margin: 0 auto 20px;
  color: #fff;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  animation: heroTitle 1s var(--ease) both;
}

.hero h1 span {
  color: var(--accent);
}

.hero-description {
  max-width: 600px;
  min-height: 60px;
  margin: 0 auto 36px;
  color: var(--muted-light);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 300;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-align: center;
  animation: reveal 0.9s 0.2s var(--ease) both;
}

.typing {
  display: inline-block;
  min-width: 4px;
  color: var(--accent);
  font-weight: 500;
  border-left: 2px solid currentColor;
  padding-left: 4px;
  animation: cursorBlink 0.8s step-end infinite;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  animation: reveal 0.9s 0.35s var(--ease) both;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.3s var(--ease);
}

.btn-primary {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.4);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 90px;
}

.stat-card {
  position: relative;
  padding: 32px 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: reveal 0.8s var(--ease) both;
  transition: all 0.3s var(--ease);
}

.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  background: var(--surface-strong);
}

.stat-number {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.section {
  padding: 80px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.section-title {
  position: relative;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
}

.section-caption {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.about-box {
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.about-box p {
  max-width: 850px;
  color: var(--muted-light);
  font-size: 1rem;
  line-height: 2;
}

.services-grid,
.subsidiaries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card,
.subsidiary-card {
  position: relative;
  min-height: 220px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: all 0.3s var(--ease);
}

.service-card:hover,
.subsidiary-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  background: var(--surface-strong);
}

.card-index {
  display: block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  direction: ltr;
}

.service-card h3,
.subsidiary-card h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.service-card p,
.subsidiary-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.subsidiaries-grid {
  grid-template-columns: minmax(0, 1fr);
}

.subsidiary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 160px;
  padding: 32px 40px;
}

.subsidiary-content {
  max-width: 600px;
}

.subsidiary-name {
  direction: ltr;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 1px;
}

.subsidiary-name span {
  color: var(--accent);
}

.subsidiary-actions {
  margin-top: 20px;
}

.btn-sub-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s var(--ease);
}

.btn-sub-link svg {
  transition: transform 0.2s var(--ease);
  opacity: 0.7;
}

.btn-sub-link:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.btn-sub-link:hover svg {
  transform: translate(-2px, -2px);
  opacity: 1;
}

.subsidiary-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
}

.subsidiary-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

footer {
  margin-top: 60px;
  padding: 30px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 0.75rem;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroTitle {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes orbFloat {
  from { transform: translate(0, 0); }
  to { transform: translate(30px, 40px); }
}

@keyframes cursorBlink {
  0%, 45% { border-color: var(--accent); }
  46%, 100% { border-color: transparent; }
}

@media (max-width: 800px) {
  .navbar {
    top: 10px;
    width: calc(100% - 24px);
    margin-top: 10px;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    min-height: auto;
  }
  .logo {
    position: static;
    transform: none !important;
    margin: 0 auto;
  }
  .nav-links { display: none; }
  .auth-actions { width: 100%; justify-content: center; }
  .hero { min-height: 500px; padding: 100px 0 70px; }
  .stats, .services-grid { grid-template-columns: 1fr; }
  .stats { margin-bottom: 60px; }
  .section { padding: 60px 0; }
  .about-box { padding: 24px; }
  .section-heading { display: block; }
  .section-caption { display: block; margin-top: 8px; }
  .subsidiary-card { align-items: flex-start; padding: 24px; }
  .subsidiary-badge { width: 64px; height: 64px; flex-basis: 64px; }
}

@media (max-width: 480px) {
  .container { width: min(100% - 32px, 1160px); }
  .hero h1 { font-size: 2.8rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .subsidiary-card { display: block; }
  .subsidiary-badge { margin-top: 20px; }
}