:root {
  --bg: #07111f;
  --bg-2: #0b1320;
  --bg-3: #111c2e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #aeb8c5;
  --border: rgba(255, 255, 255, 0.12);
  --primary: #f6b800;
  --primary-2: #ff7a1a;
  --danger-stripe: repeating-linear-gradient(
    135deg,
    rgba(246, 184, 0, 0.95) 0 12px,
    rgba(7, 17, 31, 0.95) 12px 24px
  );
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1180px;
  --header-height: 84px;
  --transition: 250ms ease;
}

body.light-theme {
  --bg: #f5f7fb;
  --bg-2: #ffffff;
  --bg-3: #edf2f7;
  --surface: rgba(7, 17, 31, 0.055);
  --surface-2: rgba(7, 17, 31, 0.08);
  --text: #07111f;
  --muted: #526071;
  --border: rgba(7, 17, 31, 0.13);
  --shadow: 0 24px 70px rgba(7, 17, 31, 0.13);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: "Vazirmatn", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  transition:
    background var(--transition),
    color var(--transition);
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--primary);
  color: #07111f;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(246, 184, 0, 0.18),
      transparent 28%
    ),
    radial-gradient(
      circle at 10% 35%,
      rgba(255, 122, 26, 0.1),
      transparent 26%
    ),
    linear-gradient(135deg, var(--bg), var(--bg-2));
}

.site-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

.section-padding {
  padding: 110px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-head h2,
.about-content h2,
.contact-info h2,
.cta-box h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.35;
  letter-spacing: -1px;
}

.section-head p,
.about-content p,
.contact-info p,
.cta-box p {
  color: var(--muted);
  margin-top: 14px;
}

.section-tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 31, 0.72);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

body.light-theme .site-header {
  background: rgba(255, 255, 255, 0.72);
}

.site-header.scrolled {
  height: 74px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  padding: 6px;

  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow:
    0 14px 34px rgba(246, 184, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);

  isolation: isolate;
}

/* Logo image */
.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;

  mix-blend-mode: multiply;
  filter: contrast(1.08) saturate(1.08);
}

.logo strong,
.logo small {
  display: block;
}

.logo strong {
  font-size: 1.1rem;
  line-height: 1.2;
}

.logo small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--primary);
  color: #07111f;
  border-color: transparent;
}

/* Theme Switch */
.theme-switch {
  position: relative;
  width: 76px;
  height: 38px;
  display: inline-block;
  flex: 0 0 auto;
}

.theme-switch input {
  display: none;
}

.switch-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(180deg, #78c8ff, #dff5ff);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.18);
  transition: var(--transition);
}

.switch-sky {
  position: absolute;
  inset: 0;
}

.sun,
.moon {
  position: absolute;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transition: 420ms cubic-bezier(0.2, 0.85, 0.25, 1.25);
}

.sun {
  right: 7px;
  background: #ffd34e;
  box-shadow: 0 0 22px rgba(255, 211, 78, 0.9);
}

.moon {
  left: -32px;
  background: #f4f7ff;
  box-shadow: inset -7px -4px 0 #c9d2e6;
}

.cloud {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transition: 420ms ease;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.cloud::before {
  right: 6px;
}

.cloud::after {
  right: 17px;
  width: 9px;
  height: 9px;
}

.cloud-1 {
  width: 34px;
  right: 29px;
  bottom: 7px;
}

.cloud-2 {
  width: 24px;
  right: 8px;
  bottom: 5px;
  opacity: 0.75;
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: translateY(-10px);
  transition: 420ms ease;
}

.star-1 {
  right: 16px;
  top: 10px;
}

.star-2 {
  right: 34px;
  top: 22px;
}

.star-3 {
  right: 54px;
  top: 12px;
}

.theme-switch input:checked + .switch-track {
  background: linear-gradient(180deg, #121826, #030712);
}

.theme-switch input:checked + .switch-track .sun {
  right: 84px;
}

.theme-switch input:checked + .switch-track .moon {
  left: 7px;
}

.theme-switch input:checked + .switch-track .cloud {
  transform: translateY(25px);
  opacity: 0;
}

.theme-switch input:checked + .switch-track .star {
  opacity: 1;
  transform: translateY(0);
}

/* Menu Button */
.menu-btn {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
}

.menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text);
  display: block;
  margin: 3px 0;
  border-radius: 10px;
  transition: var(--transition);
}

/* Hero */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: -90px;
  top: 14%;
  background: var(--danger-stripe);
  opacity: 0.08;
  transform: rotate(12deg);
  border-radius: 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 58px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(246, 184, 0, 0.6);
  animation: pulse 1.7s infinite;
}

.hero h1 {
  font-size: clamp(2.55rem, 6vw, 5.35rem);
  line-height: 1.15;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 680px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transform: scaleX(-1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #07111f;
  box-shadow: 0 18px 44px rgba(246, 184, 0, 0.28);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 55px rgba(246, 184, 0, 0.36);
}

.btn-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  gap: 14px;
}

.hero-stats div {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero-stats strong {
  display: block;
  font-size: 1.55rem;
  color: var(--primary);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.inverted-radius {
  --r: 34px;
  --s: 64px;
  --x: 34px;
  --y: 26px;
  width: min(100%, 520px);
  aspect-ratio: 1 / 1.08;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;

  --_m: /calc(2 * var(--r)) calc(2 * var(--r))
    radial-gradient(#000 70%, #0000 72%);
  --_g: conic-gradient(
    from 180deg at var(--r) calc(100% - var(--r)),
    #0000 25%,
    #000 0
  );
  --_d: calc(var(--s) + var(--r));

  mask:
    calc(var(--_d) + var(--x)) 100% var(--_m),
    0 calc(100% - var(--_d) - var(--y)) var(--_m),
    radial-gradient(var(--s) at 0 100%, #0000 99%, #000 calc(100% + 1px))
      calc(var(--r) + var(--x)) calc(-1 * var(--r) - var(--y)),
    var(--_g) calc(var(--_d) + var(--x)) 0,
    var(--_g) 0 calc(-1 * var(--_d) - var(--y));
  mask-repeat: no-repeat;

  -webkit-mask:
    calc(var(--_d) + var(--x)) 100% var(--_m),
    0 calc(100% - var(--_d) - var(--y)) var(--_m),
    radial-gradient(var(--s) at 0 100%, #0000 99%, #000 calc(100% + 1px))
      calc(var(--r) + var(--x)) calc(-1 * var(--r) - var(--y)),
    var(--_g) calc(var(--_d) + var(--x)) 0,
    var(--_g) 0 calc(-1 * var(--_d) - var(--y));
  -webkit-mask-repeat: no-repeat;
}

.hero-image-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(7, 17, 31, 0.04), rgba(7, 17, 31, 0.55)),
    radial-gradient(circle at 20% 20%, rgba(246, 184, 0, 0.32), transparent 30%);
}

.hero-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.electric-badge {
  position: absolute;
  top: 24px;
  right: 26px;
  z-index: 5;
  width: 112px;
  height: 112px;
  border-radius: 30px;
  background: var(--danger-stripe);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}

.electric-badge span {
  font-size: 1.6rem;
  font-weight: 900;
  color: #07111f;
}

.electric-badge small {
  display: block;
  font-weight: 800;
  color: #07111f;
  font-size: 0.76rem;
}

.floating-card {
  position: absolute;
  z-index: 6;
  padding: 16px 18px;
  min-width: 190px;
  border-radius: 20px;
  background: rgba(11, 19, 32, 0.76);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

body.light-theme .floating-card {
  background: rgba(255, 255, 255, 0.76);
}

.floating-card strong {
  display: block;
  color: var(--primary);
}

.floating-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.card-top {
  left: 0;
  top: 110px;
  animation: float 5s ease-in-out infinite;
}

.card-bottom {
  right: 26px;
  bottom: 48px;
  animation: float 5.5s ease-in-out infinite reverse;
}

/* Trust */
.trust-bar {
  padding: 22px 0;
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  text-align: center;
}

.trust-grid span {
  color: var(--muted);
  font-weight: 800;
}

/* Cards */
.services-grid,
.projects-grid,
.process-grid {
  display: grid;
  gap: 22px;
}

.services-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-card,
.process-step,
.contact-form,
.about-panel,
.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.about-panel {
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: linear-gradient(
    145deg,
    rgba(17, 28, 46, 0.98),
    rgba(7, 17, 31, 0.98)
  );
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.about-panel-image {
  position: relative;
  width: 100%;
  height: 260px;
  margin: 0;
  overflow: hidden;
  background: var(--bg-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* گرادیان روی تصویر برای هماهنگی با تم */
.about-panel-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(7, 17, 31, 0.04) 30%,
      rgba(7, 17, 31, 0.28) 72%,
      rgba(7, 17, 31, 0.8) 100%
    ),
    radial-gradient(circle at 82% 18%, rgba(246, 184, 0, 0.2), transparent 38%);
}

.about-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.06);
  transition:
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 700ms ease;
}

/* زوم بسیار ملایم تصویر */
.about-panel:hover .about-panel-image img {
  transform: scale(1.06);
  filter: saturate(1.04) contrast(1.08);
}

/* برچسب روی تصویر */
.about-image-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.7);
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.about-image-badge svg {
  width: 18px;
  height: 18px;
  fill: var(--primary);
  flex: 0 0 auto;
}

.about-panel-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 32px 34px;
  background: linear-gradient(
    145deg,
    rgba(17, 28, 46, 0.98),
    rgba(7, 17, 31, 0.98)
  );
}

.panel-line {
  width: 74px;
  height: 6px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 24px rgba(246, 184, 0, 0.3);
}

.about-panel h3 {
  color: #f8fafc;
  font-size: clamp(1.65rem, 3vw, 2rem);
  line-height: 1.4;
}

.about-panel p {
  margin-top: 12px;
  color: #cbd5e1;
  line-height: 1.9;
}

/* Light theme */
body.light-theme .about-panel {
  border-color: rgba(7, 17, 31, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 24px 65px rgba(7, 17, 31, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.light-theme .about-panel-content {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98),
    rgba(242, 246, 251, 0.98)
  );
}

body.light-theme .about-panel h3 {
  color: var(--text);
}

body.light-theme .about-panel p {
  color: var(--muted);
}

.service-card {
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(246, 184, 0, 0.13), transparent 36%);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(246, 184, 0, 0.42);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(246, 184, 0, 0.13);
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.service-card h3,
.project-info h3,
.process-step h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.service-card p,
.project-info p,
.process-step p {
  color: var(--muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 58px;
}

.danger-frame {
  position: relative;
  padding: 14px;
  border-radius: 38px;
  background: var(--danger-stripe);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.danger-frame::before {
  content: "";
  position: absolute;
  inset: 12% 8%;
  z-index: -1;
  border-radius: inherit;
  background: rgba(246, 184, 0, 0.24);
  filter: blur(54px);
  opacity: 0.65;
  pointer-events: none;
}

.about-panel {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.82), rgba(7, 17, 31, 0.95)),
    radial-gradient(circle at 80% 20%, rgba(246, 184, 0, 0.2), transparent 36%);
}

.panel-line {
  width: 74px;
  height: 6px;
  background: var(--primary);
  border-radius: 999px;
  margin-bottom: 18px;
}

.about-panel h3 {
  font-size: 2rem;
}

.about-panel p {
  color: #cbd5e1;
  margin-top: 12px;
}

.feature-list {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

.feature-list li {
  position: relative;
  padding-right: 34px;
  color: var(--muted);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  right: 0;
  top: 0;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #07111f;
  font-weight: 900;
}

/* Projects */
.projects-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:not(.tilt-card):hover {
  transform: translateY(-8px);
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.05);
}

.project-info {
  padding: 24px;
}

.project-info span {
  display: inline-block;
  color: var(--primary);
  font-weight: 900;
  margin-bottom: 8px;
}

/* Process */
.process-grid {
  grid-template-columns: repeat(4, 1fr);
}

.process-step {
  padding: 26px;
  position: relative;
}

.process-step span {
  display: inline-flex;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 18px;
}

/* CTA */
.cta-section {
  padding: 40px 0;
}

.cta-box {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background:
    linear-gradient(135deg, rgba(246, 184, 0, 0.14), transparent),
    var(--surface);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 40px;
}

.contact-cards {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.contact-cards div {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-cards strong,
.contact-cards a,
.contact-cards span {
  display: block;
}

.contact-cards strong {
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-cards a,
.contact-cards span {
  color: var(--muted);
}

.contact-form {
  padding: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(246, 184, 0, 0.13);
}

.form-group textarea {
  resize: vertical;
}

.error-message {
  display: block;
  min-height: 20px;
  color: #ff6b6b;
  font-size: 0.82rem;
  margin-top: 4px;
}

.form-submit {
  width: 100%;
  border: 0;
}

.form-status {
  margin-top: 14px;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
}

/* Footer */
.site-footer {
  padding-top: 70px;
  background: rgba(0, 0, 0, 0.24);
  border-top: 1px solid var(--border);
}

body.light-theme .site-footer {
  background: rgba(7, 17, 31, 0.04);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 34px;
}

.footer-grid p {
  color: var(--muted);
  margin-top: 18px;
}

.footer-grid h3 {
  margin-bottom: 16px;
  color: var(--primary);
}

.footer-grid a,
.footer-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-grid a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 42px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Scroll Top */
.scroll-top {
  position: fixed;
  left: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--primary);
  color: #07111f;
  font-size: 1.4rem;
  font-weight: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 999;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: 700ms ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 120ms;
}

.delay-2 {
  transition-delay: 220ms;
}

.delay-3 {
  transition-delay: 320ms;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(246, 184, 0, 0.58);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(246, 184, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(246, 184, 0, 0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* Responsive */
@media (max-width: 1050px) {
  .main-nav {
    gap: 18px;
  }

  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-visual {
    min-height: auto;
  }

  .hero-image-box {
    width: min(100%, 560px);
  }

  .services-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-cta {
    display: none;
  }

  .menu-btn {
    display: grid;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 16px;
    left: 16px;
    display: grid;
    gap: 0;
    padding: 12px;
    border-radius: 24px;
    background: rgba(11, 19, 32, 0.94);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-18px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  body.light-theme .main-nav {
    background: rgba(255, 255, 255, 0.94);
  }

  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 14px;
    border-radius: 16px;
  }

  .main-nav a:hover {
    background: var(--surface);
  }

  .menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 76px;
  }

  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .section-padding {
    padding: 76px 0;
  }

  .logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .logo strong {
    font-size: 1rem;
  }

  .logo small {
    font-size: 0.72rem;
  }

  .theme-switch {
    width: 64px;
    height: 34px;
  }

  .sun,
  .moon {
    width: 23px;
    height: 23px;
    top: 5px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.6rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .inverted-radius {
    --r: 24px;
    --s: 42px;
    --x: 20px;
    --y: 16px;
    aspect-ratio: 1 / 1.08;
  }

  .electric-badge {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    top: 10px;
    right: 10px;
  }

  .electric-badge span {
    font-size: 1.25rem;
  }

  .floating-card {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: 12px;
    animation: none;
  }

  .services-grid,
  .projects-grid,
  .process-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card img {
    height: 210px;
  }

  .contact-form,
  .cta-box {
    padding: 22px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Hero Slider */
.hero-slider {
  position: relative;
  width: min(100%, 560px);
  min-height: 590px;
  display: grid;
  place-items: center;
}

.hero-slides {
  position: relative;
  width: 100%;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-28px) scale(0.98);
  transition:
    opacity 620ms ease,
    visibility 620ms ease,
    transform 620ms ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.hero-slide .hero-image-box {
  width: min(100%, 520px);
  margin-inline: auto;
}

.slider-btn {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(11, 19, 32, 0.72);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transform: translateY(-50%);
  transition: var(--transition);
}

.slider-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #07111f;
  border-color: transparent;
  transform: translateY(-50%) scale(1.08);
}

.slider-prev {
  right: -10px;
}

.slider-next {
  left: -10px;
}

.slider-dots {
  position: absolute;
  right: 50%;
  bottom: 8px;
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(50%);
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.34);
  transition: var(--transition);
}

.slider-dots button.active {
  width: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

/* Hero stat cards - striped layer behind card */
.hero-stats {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 640px;
  gap: 18px;
}

.hero-stats div {
  position: relative;
  isolation: isolate;
  overflow: visible;
  min-height: 104px;
  padding: 20px 18px;
  border-radius: 20px;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform-style: preserve-3d;
  transition:
    transform 320ms ease,
    filter 320ms ease;
}

/* لایه خط‌خطی پشت کارت */
.hero-stats div::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -2;
  border-radius: 24px;
  background: var(--danger-stripe);
  border: 1px solid rgba(246, 184, 0, 0.45);
  opacity: 0;
  transform: translate3d(0, 8px, 0) rotate(-2deg) scale(0.96);
  transition:
    opacity 320ms ease,
    transform 320ms ease;
}

/* کارت اصلی تیره روی لایه خط‌خطی */
.hero-stats div::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(17, 28, 46, 0.96),
    rgba(7, 17, 31, 0.94)
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  transition:
    border-color 320ms ease,
    box-shadow 320ms ease,
    transform 320ms ease;
}

.hero-stats div:hover {
  transform: translateY(-12px) rotate(-1deg);
  filter: saturate(1.08);
}

.hero-stats div:hover::before {
  opacity: 1;
  transform: translate3d(-12px, 16px, 0) rotate(-4deg) scale(1);
}

.hero-stats div:hover::after {
  border-color: rgba(246, 184, 0, 0.62);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(246, 184, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-stats strong,
.hero-stats span {
  position: relative;
  z-index: 2;
}

.hero-stats strong {
  display: block;
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

/* Stat counter polish */
.counter {
  direction: ltr;
  unicode-bidi: plaintext;
  font-variant-numeric: tabular-nums;
}

/* Light theme */
body.light-theme .hero-stats div::after {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.96),
    rgba(245, 247, 251, 0.92)
  );
  border-color: rgba(7, 17, 31, 0.13);
  box-shadow:
    0 22px 60px rgba(7, 17, 31, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.light-theme .hero-stats div:hover::after {
  border-color: rgba(246, 184, 0, 0.7);
}

/* Mobile slider */
@media (max-width: 640px) {
  .hero-slider {
    width: 100%;
    min-height: auto;
  }

  .hero-slides {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
    min-height: auto;
  }

  .hero-slide.active {
    display: block;
  }

  .slider-btn {
    top: 42%;
    width: 40px;
    height: 40px;
    font-size: 1.65rem;
  }

  .slider-prev {
    right: 6px;
  }

  .slider-next {
    left: 6px;
  }

  .slider-dots {
    position: relative;
    bottom: auto;
    margin-top: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
  }

  .hero-stats div {
    min-height: 96px;
  }

  .hero-stats div:hover {
    transform: translateY(-8px);
  }

  .hero-stats div:hover::before {
    transform: translate3d(-8px, 12px, 0) rotate(-3deg) scale(1);
  }

  .floating-card:hover {
    transform: translateY(-10px);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .danger-frame {
    padding: 10px;
    border-radius: 28px;
  }

  .about-panel {
    min-height: auto;
    border-radius: 20px;
  }

  .about-panel-image {
    height: 220px;
  }

  .about-panel-content {
    padding: 26px 22px 28px;
  }

  .about-image-badge {
    top: 14px;
    right: 14px;
    font-size: 0.74rem;
  }
}

/* Credentials cards - 3D hover */
.projects-grid {
  perspective: 1400px;
}

.project-card.tilt-card {
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --glow-x: 50%;
  --glow-y: 50%;
  --card-lift: 0px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: translateY(var(--card-lift)) rotateX(var(--rotate-x))
    rotateY(var(--rotate-y));
  transition:
    transform 180ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
  will-change: transform;
  background: linear-gradient(
    145deg,
    rgba(11, 19, 32, 0.96),
    rgba(7, 17, 31, 0.92)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-card.tilt-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(
    220px circle at var(--glow-x) var(--glow-y),
    rgba(246, 184, 0, 0.16),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
  z-index: 0;
}

.project-card.tilt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    120deg,
    transparent 15%,
    rgba(255, 255, 255, 0.05) 35%,
    transparent 55%
  );
  opacity: 0;
  transform: translateX(-30%);
  transition:
    opacity 220ms ease,
    transform 320ms ease;
}

.project-card-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    180px circle at var(--glow-x) var(--glow-y),
    rgba(255, 255, 255, 0.14),
    transparent 42%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card.tilt-card .project-info {
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
}

.project-card.tilt-card .project-info > span {
  display: inline-block;
  transform: translateZ(26px);
  transition:
    transform 220ms ease,
    color 220ms ease;
}

.project-card.tilt-card .project-info h3 {
  transform: translateZ(38px);
  transition:
    transform 220ms ease,
    color 220ms ease;
}

.project-card.tilt-card .project-info p,
.project-card.tilt-card .project-info li {
  transform: translateZ(22px);
  transition:
    transform 220ms ease,
    color 220ms ease;
}

.project-card.tilt-card:hover,
.project-card.tilt-card:focus-within {
  --card-lift: 0px;
  border-color: rgba(246, 184, 0, 0.45);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(246, 184, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.project-card.tilt-card:hover::before,
.project-card.tilt-card:focus-within::before,
.project-card.tilt-card:hover::after,
.project-card.tilt-card:focus-within::after,
.project-card.tilt-card:hover .project-card-glow,
.project-card.tilt-card:focus-within .project-card-glow {
  opacity: 1;
}

.project-card.tilt-card:hover::after,
.project-card.tilt-card:focus-within::after {
  transform: translateX(0);
}

.project-card.tilt-card:hover .project-info > span,
.project-card.tilt-card:focus-within .project-info > span {
  transform: translateZ(34px);
  color: var(--primary);
}

.project-card.tilt-card:hover .project-info h3,
.project-card.tilt-card:focus-within .project-info h3 {
  transform: translateZ(48px);
}

.project-card.tilt-card:hover .project-info p,
.project-card.tilt-card:hover .project-info li,
.project-card.tilt-card:focus-within .project-info p,
.project-card.tilt-card:focus-within .project-info li {
  transform: translateZ(28px);
}

/* اگر hover قدیمی داشتی، این override می‌کند */
.project-card.tilt-card:hover {
  transform: translateY(var(--card-lift)) rotateX(var(--rotate-x))
    rotateY(var(--rotate-y));
}

/* Light theme */
body.light-theme .project-card.tilt-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.96),
    rgba(245, 247, 251, 0.94)
  );
  border-color: rgba(7, 17, 31, 0.1);
  box-shadow:
    0 18px 40px rgba(7, 17, 31, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.light-theme .project-card.tilt-card:hover,
body.light-theme .project-card.tilt-card:focus-within {
  border-color: rgba(246, 184, 0, 0.55);
}

/* Reduced motion / mobile */
@media (prefers-reduced-motion: reduce) {
  .project-card.tilt-card {
    transform: none !important;
    transition:
      box-shadow 220ms ease,
      border-color 220ms ease;
  }

  .project-card.tilt-card .project-info > span,
  .project-card.tilt-card .project-info h3,
  .project-card.tilt-card .project-info p,
  .project-card.tilt-card .project-info li {
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    perspective: none;
  }

  .project-card.tilt-card {
    transform: translateY(0) !important;
  }

  .project-card.tilt-card:hover,
  .project-card.tilt-card:focus-within {
    --card-lift: -6px;
  }
}

.project-card.tilt-card {
  transform: perspective(1400px) rotateX(var(--rotate-x))
    rotateY(var(--rotate-y)) scale3d(1, 1, 1);
}

.project-card.tilt-card:hover,
.project-card.tilt-card:focus-within {
  transform: perspective(1400px) rotateX(var(--rotate-x))
    rotateY(var(--rotate-y)) scale3d(1.02, 1.02, 1.02);
}

/* Process cards - focus hover effect */
.process-grid {
  isolation: isolate;
}

.process-step {
  overflow: hidden;
  transition:
    transform 260ms ease,
    opacity 260ms ease,
    filter 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    background 260ms ease;
}

/* وقتی موس روی کل گرید است، کارت‌های غیر فعال تار شوند */
.process-grid:hover .process-step {
  opacity: 0.42;
  filter: blur(3px) saturate(0.75);
  transform: scale(0.97);
}

/* کارت فعال واضح، برجسته و فوکوس‌شده بماند */
.process-grid:hover .process-step:hover {
  opacity: 1;
  filter: blur(0) saturate(1.12);
  transform: translateY(-10px) scale(1.025);
  z-index: 5;

  border-color: rgba(246, 184, 0, 0.62);

  background:
    radial-gradient(
      260px circle at 70% 20%,
      rgba(246, 184, 0, 0.14),
      transparent 42%
    ),
    linear-gradient(145deg, rgba(17, 28, 46, 0.96), rgba(7, 17, 31, 0.98));

  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(246, 184, 0, 0.18),
    0 0 38px rgba(246, 184, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.process-step::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    120deg,
    transparent 18%,
    rgba(255, 255, 255, 0.08) 38%,
    transparent 58%
  );
  transform: translateX(35%);
  transition:
    opacity 280ms ease,
    transform 480ms ease;
}

.process-step:hover::before {
  opacity: 1;
  transform: translateX(-25%);
}
body.light-theme .process-grid:hover .process-step:hover {
  background:
    radial-gradient(
      260px circle at 70% 20%,
      rgba(246, 184, 0, 0.18),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.98),
      rgba(245, 247, 251, 0.96)
    );

  border-color: rgba(246, 184, 0, 0.68);

  box-shadow:
    0 30px 80px rgba(7, 17, 31, 0.18),
    0 0 0 1px rgba(246, 184, 0, 0.2),
    0 0 34px rgba(246, 184, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
@media (hover: none), (max-width: 768px) {
  .process-grid:hover .process-step,
  .process-grid:hover .process-step:hover {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

/* Hero readability fix */
.hero::before {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero h1,
.hero p,
.hero .eyebrow {
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
}

.hero p {
  color: rgba(248, 250, 252, 0.86);
  max-width: 62ch;
}

.hero-image-box::before {
  background: linear-gradient(
    180deg,
    rgba(7, 17, 31, 0.06),
    rgba(7, 17, 31, 0.52)
  );
}

.electric-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #07111f;
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(246, 184, 0, 0.18);
}

.electric-badge span,
.electric-badge small {
  color: #07111f;
}

/* ================================
   Capabilities Section - Clean Premium Cards
   ================================ */

#capabilities .services-grid {
  gap: 24px;
}

/* Main card */
#capabilities .service-card {
  position: relative;
  min-height: 245px;
  padding: 32px 28px 30px;
  overflow: hidden;

  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.075);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 46%),
    rgba(13, 24, 41, 0.72);

  backdrop-filter: blur(14px);

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  transform: none;

  transition:
    transform 300ms ease,
    border-color 300ms ease,
    box-shadow 300ms ease,
    background 300ms ease;
}

/* Disable old shared card glow if exists */
#capabilities .service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 1;
  background: none;
  transform: none;
  pointer-events: none;
}

/* Elegant top accent */
#capabilities .service-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 3px;

  border-radius: 0 0 999px 999px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(246, 184, 0, 0.75),
    rgba(255, 122, 26, 0.55),
    transparent
  );

  opacity: 0.45;
  transform: scaleX(0.45);
  transform-origin: center;

  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

/* Icon */
#capabilities .service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 22px;

  border-radius: 16px;

  color: var(--primary);

  background: linear-gradient(
    145deg,
    rgba(246, 184, 0, 0.14),
    rgba(246, 184, 0, 0.045)
  );

  border: 1px solid rgba(246, 184, 0, 0.18);

  box-shadow:
    0 12px 28px rgba(246, 184, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);

  transition:
    transform 300ms ease,
    background 300ms ease,
    color 300ms ease,
    box-shadow 300ms ease,
    border-color 300ms ease;
}

/* Title */
#capabilities .service-card h3 {
  position: relative;
  z-index: 2;

  margin-bottom: 12px;
  font-size: 1.18rem;
  line-height: 1.7;

  color: var(--text);

  transition: color 300ms ease;
}

/* Small underline under title */
#capabilities .service-card h3::after {
  content: "";
  display: block;

  width: 34px;
  height: 2px;
  margin-top: 10px;

  border-radius: 999px;
  background: rgba(246, 184, 0, 0.55);

  transition:
    width 300ms ease,
    background 300ms ease;
}

/* Description */
#capabilities .service-card p {
  position: relative;
  z-index: 2;

  color: rgba(174, 184, 197, 0.88);
  line-height: 2;
}

/* Hover */
#capabilities .service-card:hover {
  transform: translateY(-7px);

  border-color: rgba(246, 184, 0, 0.34);

  background:
    radial-gradient(
      420px circle at 85% 5%,
      rgba(246, 184, 0, 0.105),
      transparent 44%
    ),
    rgba(13, 24, 41, 0.82);

  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(246, 184, 0, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#capabilities .service-card:hover::after {
  opacity: 0.9;
  transform: scaleX(1);
}

#capabilities .service-card:hover .service-icon {
  color: #07111f;

  background: linear-gradient(135deg, var(--primary), var(--primary-2));

  border-color: rgba(246, 184, 0, 0.45);

  transform: translateY(-3px);

  box-shadow:
    0 16px 36px rgba(246, 184, 0, 0.2),
    0 0 0 7px rgba(246, 184, 0, 0.055),
    inset 0 -4px 10px rgba(7, 17, 31, 0.16);
}

#capabilities .service-card:hover h3 {
  color: var(--primary);
}

#capabilities .service-card:hover h3::after {
  width: 62px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

/* Very subtle variation, not messy */
#capabilities .service-card:nth-child(2n) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), transparent 46%),
    rgba(11, 22, 38, 0.72);
}

#capabilities .service-card:nth-child(2n):hover {
  background:
    radial-gradient(
      420px circle at 85% 5%,
      rgba(246, 184, 0, 0.105),
      transparent 44%
    ),
    rgba(11, 22, 38, 0.84);
}

/* Light theme */
body.light-theme #capabilities .service-card {
  border-color: rgba(7, 17, 31, 0.08);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(248, 250, 252, 0.9)
  );

  box-shadow:
    0 18px 42px rgba(7, 17, 31, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.light-theme #capabilities .service-card:nth-child(2n) {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(245, 247, 250, 0.9)
  );
}

body.light-theme #capabilities .service-card p {
  color: rgba(71, 85, 105, 0.9);
}

body.light-theme #capabilities .service-card:hover {
  border-color: rgba(246, 184, 0, 0.48);

  background:
    radial-gradient(
      420px circle at 85% 5%,
      rgba(246, 184, 0, 0.14),
      transparent 44%
    ),
    linear-gradient(180deg, #ffffff, #f8fafc);

  box-shadow: 0 26px 58px rgba(7, 17, 31, 0.13);
}

/* Mobile */
@media (max-width: 640px) {
  #capabilities .services-grid {
    gap: 18px;
  }

  #capabilities .service-card {
    min-height: auto;
    padding: 28px 24px 26px;
    border-radius: 20px;
  }

  #capabilities .service-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: 15px;
  }

  #capabilities .service-card h3 {
    font-size: 1.1rem;
  }

  #capabilities .service-card:hover {
    transform: translateY(-5px);
  }
}

@media (max-width: 640px) {
  .logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    padding: 5px;
  }

  .logo-icon img {
    width: 100%;
    height: 100%;
  }
}

/* Clean transparent animated icons */
.services .service-card .service-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 8px;
  flex: 0 0 56px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  position: relative;

  background: rgba(250, 204, 21, 0.08) !important;
  border: 1px solid rgba(250, 204, 21, 0.28) !important;
  border-radius: 16px;

  box-shadow: 0 0 18px rgba(250, 204, 21, 0.08);
}

.services .service-card .service-icon img {
  display: block;
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;

  object-fit: contain;
  object-position: center;

  background: transparent !important;
  mix-blend-mode: normal !important;
  filter: none !important;

  pointer-events: none;
  transform: none !important;
}

.services .service-card:hover .service-icon {
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.95),
    rgba(245, 158, 11, 0.9)
  ) !important;

  border-color: rgba(250, 204, 21, 0.85) !important;
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.35);
}

.services .service-card:hover .service-icon img {
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;

  mix-blend-mode: normal !important;
  filter: none !important;
  transform: none !important;
}

/* Hover state */
.services .service-card:hover .service-icon {
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.95),
    rgba(245, 158, 11, 0.9)
  ) !important;

  border-color: rgba(250, 204, 21, 0.85) !important;
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.35);
}

.services .service-card:hover .service-icon img {
  width: 38px;
  height: 38px;
  max-width: 38px;
  max-height: 38px;

  mix-blend-mode: multiply !important;
  filter: contrast(1.35) saturate(1.35) brightness(0.95);

  transform: none !important;
}
