/* ===========================================================
   TriGrowth — Brand Design System (Arabic / RTL)
   Typography: Noto Kufi Arabic (headings) / Cairo (body)
   Primary: #176F46  | Deep: #0f5234  | Bright accent: #3FA65C
   Ink: #1C1D21 / #6B7178
   Surfaces: #F3F5F4 / #E1E4E3 / #FFFFFF
   =========================================================== */

:root {
  --tg-green: #176F46;
  --tg-green-dark: #0f5234;
  --tg-green-bright: #3FA65C;
  --tg-ink: #1c1d21;
  --tg-grey: #6b7178;
  --tg-light: #f3f5f4;
  --tg-border: #e1e4e3;
  --tg-white: #ffffff;
  --tg-night: #101214;
  --tg-night-2: #16191c;
  --tg-radius: 14px;
  --tg-shadow: 0 18px 40px -20px rgba(15, 82, 52, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ===== Motion primitives ===== */
@keyframes tgFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tgGrowBar {
  from { transform: scaleY(0.08); }
  to { transform: scaleY(1); }
}
@keyframes tgPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 166, 92, 0.45); }
  60% { box-shadow: 0 0 0 9px rgba(63, 166, 92, 0); }
}
@keyframes tgShine {
  from { transform: translateX(-130%) skewX(-20deg); }
  to { transform: translateX(230%) skewX(-20deg); }
}

/* Scroll-reveal */
.tg-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tg-reveal.is-visible { opacity: 1; transform: none; }
.tg-reveal[data-delay="1"] { transition-delay: 0.1s; }
.tg-reveal[data-delay="2"] { transition-delay: 0.2s; }
.tg-reveal[data-delay="3"] { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tg-reveal { opacity: 1; transform: none; transition: none; }
  .tg-hero-title, .tg-hero-sub, .tg-eyebrow, .tg-hero-cta, .tg-hero-stats, .tg-dash-card { animation: none !important; }
  .tg-dash-chart span { animation: none !important; }
  .tg-badge-dot, .tg-dash-badge i { animation: none !important; }
  .btn::after { display: none !important; }
}

body {
  font-family: 'Cairo', 'Noto Kufi Arabic', system-ui, sans-serif;
  font-weight: 400;
  color: var(--tg-grey);
  background-color: var(--tg-white);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Noto Kufi Arabic', 'Cairo', system-ui, sans-serif;
  font-weight: 700;
  color: var(--tg-ink);
  line-height: 1.3;
}

section { scroll-margin-top: 84px; }

/* ===== Brand Logo ===== */
.tg-logo-img { height: 34px; width: auto; }
.tg-logo-icon { height: 30px; width: auto; }
.tg-logo-text-dark {
  font-family: 'Noto Kufi Arabic', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--tg-white);
}
.tg-logo-text-dark .accent { color: var(--tg-green-bright); }

/* ===== Buttons ===== */
.btn {
  font-weight: 700;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
/* Shine sweep on hover */
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-130%) skewX(-20deg);
  pointer-events: none;
}
.btn:hover::after { animation: tgShine 0.7s ease; }

.tg-btn-primary {
  background: linear-gradient(135deg, var(--tg-green-bright) -40%, var(--tg-green) 55%, var(--tg-green-dark) 130%);
  color: var(--tg-white);
  border: 2px solid transparent;
  box-shadow: 0 10px 24px -12px rgba(23, 111, 70, 0.65);
}
.tg-btn-primary:hover {
  color: var(--tg-white);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(23, 111, 70, 0.8);
  filter: brightness(1.06);
}

.tg-btn-secondary {
  background: var(--tg-white);
  color: var(--tg-ink);
  border: 2px solid var(--tg-white);
}
.tg-btn-secondary:hover { background: transparent; color: var(--tg-white); border-color: var(--tg-white); transform: translateY(-2px); }

.tg-btn-outline {
  background: transparent;
  color: var(--tg-green);
  border: 2px solid var(--tg-green);
}
.tg-btn-outline:hover { background: var(--tg-green); color: var(--tg-white); }

/* ===== Language toggle ===== */
.tg-lang-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tg-lang-btn i { font-size: 0.95rem; }

/* ===== Navbar ===== */
.tg-navbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(225, 228, 227, 0.7);
  padding: 0.85rem 0;
  transition: box-shadow 0.3s ease, padding 0.3s ease, background 0.3s ease;
}
.tg-navbar.tg-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 24px -12px rgba(0, 0, 0, 0.18);
  padding: 0.6rem 0;
}
.tg-navbar .nav-link {
  font-weight: 600;
  color: var(--tg-ink);
  padding: 0.5rem 0.9rem;
  position: relative;
}
.tg-navbar .nav-link:hover { color: var(--tg-green); }
.tg-navbar .nav-link.active { color: var(--tg-green); }
.tg-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  inset-inline: 0.9rem;
  bottom: 2px;
  height: 2px;
  background: var(--tg-green);
  border-radius: 2px;
}

/* ===== Hero (dark, automation/dashboard mood) ===== */
.tg-hero {
  position: relative;
  background:
    radial-gradient(1100px 620px at 20% -10%, rgba(63, 166, 92, 0.30), transparent 60%),
    radial-gradient(900px 520px at 100% 15%, rgba(15, 82, 52, 0.45), transparent 55%),
    linear-gradient(180deg, var(--tg-night-2) 0%, var(--tg-night) 100%);
  padding: 3rem 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
}
.tg-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 20%, black 0%, transparent 70%);
}
.min-vh-hero { min-height: 78vh; }

/* Faint ascending-bar watermark, echoes the logo mark */
.tg-hero-pillars {
  position: absolute;
  inset-inline-end: -4%;
  bottom: -6%;
  display: flex;
  align-items: flex-end;
  gap: clamp(10px, 2vw, 26px);
  opacity: 0.10;
  pointer-events: none;
}
.tg-hero-pillars span { display: block; width: clamp(46px, 8vw, 96px); border-radius: 14px 14px 0 0; background: var(--tg-green-bright); }
.tg-hero-pillars span:nth-child(1) { height: 26vh; }
.tg-hero-pillars span:nth-child(2) { height: 42vh; }
.tg-hero-pillars span:nth-child(3) { height: 60vh; }

.tg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(63, 166, 92, 0.12);
  border: 1px solid rgba(63, 166, 92, 0.35);
  color: var(--tg-green-bright);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  animation: tgFadeUp 0.7s ease both;
}
.tg-eyebrow i { animation: tgPulse 2.4s ease-out infinite; border-radius: 50%; }
.tg-hero-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--tg-white);
  text-wrap: balance;
  animation: tgFadeUp 0.7s ease 0.12s both;
}
.tg-hero-title .accent {
  background: linear-gradient(120deg, var(--tg-green-bright), #7ed957 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--tg-green-bright);
}
.tg-hero-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 56ch;
  animation: tgFadeUp 0.7s ease 0.24s both;
}
.tg-hero-cta { animation: tgFadeUp 0.7s ease 0.36s both; }

.tg-hero-stats {
  max-width: 620px;
  animation: tgFadeUp 0.7s ease 0.48s both;
}
.tg-stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--tg-green-bright);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.tg-stat-label { font-size: 0.88rem; color: rgba(255, 255, 255, 0.65); }

/* ---- Hero dashboard mockup card (pure CSS, no stock imagery) ---- */
.tg-dash-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.6),
    0 0 60px -20px rgba(63, 166, 92, 0.25);
  animation: tgFadeUp 0.8s ease 0.4s both;
}
.tg-dash-dots { display: flex; gap: 6px; margin-bottom: 1.25rem; }
.tg-dash-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.tg-dash-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.tg-dash-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(63, 166, 92, 0.18); color: var(--tg-green-bright);
  font-weight: 700; font-size: 0.85rem; padding: 0.3rem 0.7rem; border-radius: 999px;
}
.tg-dash-chart { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin-bottom: 1rem; }
.tg-dash-chart span {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--tg-green-bright), var(--tg-green-dark));
  transform-origin: bottom;
  animation: tgGrowBar 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.tg-dash-chart span:nth-child(1) { animation-delay: 0.55s; }
.tg-dash-chart span:nth-child(2) { animation-delay: 0.65s; }
.tg-dash-chart span:nth-child(3) { animation-delay: 0.75s; }
.tg-dash-chart span:nth-child(4) { animation-delay: 0.85s; }
.tg-dash-chart span:nth-child(5) { animation-delay: 0.95s; }
.tg-dash-chart span:nth-child(6) { animation-delay: 1.05s; }
.tg-dash-meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.tg-dash-meta strong { color: rgba(255,255,255,0.85); font-weight: 700; }

/* ===== Sections ===== */
.tg-section { padding: 5.5rem 0; }
.tg-section-alt { background: var(--tg-light); }
.tg-section-head { max-width: 720px; margin: 0 auto 3.25rem; }
.tg-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tg-green);
  margin-bottom: 0.75rem;
}
.tg-kicker-light { color: rgba(255, 255, 255, 0.85); }
.tg-section-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 0.85rem; }
.tg-section-lead { font-size: 1.1rem; color: var(--tg-grey); }

/* 3-pillar ascending divider accent */
.tg-section-head::after {
  content: "";
  display: block;
  width: 64px;
  height: 14px;
  margin: 1.25rem auto 0;
  background:
    linear-gradient(var(--tg-green-bright), var(--tg-green-bright)) 0 100%/14px 7px no-repeat,
    linear-gradient(var(--tg-green), var(--tg-green)) 25px 100%/14px 11px no-repeat,
    linear-gradient(var(--tg-green-dark), var(--tg-green-dark)) 50px 100%/14px 14px no-repeat;
}
[dir="rtl"] .tg-section-head::after { transform: scaleX(-1); }

/* ===== Why / Features ===== */
.tg-feature {
  background: var(--tg-white);
  border: 1px solid var(--tg-border);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tg-feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px -22px rgba(15, 82, 52, 0.4), 0 0 0 1px rgba(63, 166, 92, 0.25);
  border-color: rgba(63, 166, 92, 0.5);
}
.tg-feature-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(63, 166, 92, 0.14), rgba(23, 111, 70, 0.08));
  color: var(--tg-green);
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  transition: transform 0.25s ease;
}
.tg-feature:hover .tg-feature-icon { transform: scale(1.08) rotate(-4deg); }
.tg-feature-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.6rem; }
.tg-feature-text { font-size: 0.95rem; margin-bottom: 0; }

/* ===== Services (6-card grid) ===== */
.tg-service-card {
  background: var(--tg-white);
  border: 1px solid var(--tg-border);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tg-service-card::before {
  content: "";
  position: absolute;
  top: 0; inset-inline-start: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--tg-green-bright), var(--tg-green-dark));
  transform: scaleX(0);
  transform-origin: start;
  transition: transform 0.3s ease;
}
.tg-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px -22px rgba(15, 82, 52, 0.4), 0 0 0 1px rgba(63, 166, 92, 0.2);
  border-color: rgba(63, 166, 92, 0.4);
}
.tg-service-card:hover::before { transform: scaleX(1); }
.tg-service-icon {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--tg-green-bright) -60%, var(--tg-green) 60%);
  color: var(--tg-white);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 18px -8px rgba(23, 111, 70, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tg-service-card:hover .tg-service-icon {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 12px 24px -8px rgba(23, 111, 70, 0.65);
}
.tg-service-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.6rem; }
.tg-service-text { font-size: 0.93rem; margin-bottom: 0; }

/* ===== Technology / AutoGrowth showcase ===== */
.tg-product-panel {
  background: linear-gradient(155deg, var(--tg-night-2) 0%, var(--tg-night) 100%);
  border: 1px solid rgba(63, 166, 92, 0.18);
  border-radius: 28px;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 90px -45px rgba(15, 82, 52, 0.55);
}
.tg-product-panel::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: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 30%, black 0%, transparent 70%);
  pointer-events: none;
}
.tg-product-panel::after {
  content: "";
  position: absolute;
  inset-inline-end: -10%;
  top: -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(63,166,92,0.25), transparent 65%);
  pointer-events: none;
}
.tg-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(63, 166, 92, 0.15);
  color: var(--tg-green-bright);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.tg-product-title { color: var(--tg-white); font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 1rem; }
.tg-product-lead { color: rgba(255,255,255,0.7); font-size: 1.05rem; margin-bottom: 1.75rem; }
.tg-product-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.9rem; }
.tg-product-list li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.98rem; color: rgba(255,255,255,0.85); }
.tg-product-list i { color: var(--tg-green-bright); margin-top: 0.25rem; }

/* ===== CTA / Lead Form ===== */
.tg-cta-section {
  padding: 5.5rem 0;
  background: var(--tg-green);
  background-image: linear-gradient(135deg, var(--tg-green) 0%, var(--tg-green-dark) 100%);
}
.tg-cta-section {
  position: relative;
  overflow: hidden;
}
.tg-cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 75%);
  pointer-events: none;
}
.tg-cta-card {
  background: var(--tg-white);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.4);
  position: relative;
}
.tg-cta-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.tg-cta-lead { color: var(--tg-grey); }
.form-label { font-weight: 700; color: var(--tg-ink); font-size: 0.9rem; }
.form-control, .form-select {
  border: 1px solid var(--tg-border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: var(--tg-ink);
}
.form-control:focus, .form-select:focus {
  border-color: var(--tg-green);
  box-shadow: 0 0 0 0.2rem rgba(23, 111, 70, 0.15);
}
.tg-form-success {
  background: rgba(23, 111, 70, 0.1);
  border: 1px solid var(--tg-green);
  color: var(--tg-green-dark);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  text-align: center;
  font-weight: 700;
  margin-top: 0.5rem;
}
.tg-form-error {
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid #b3261e;
  color: #b3261e;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  text-align: center;
  font-weight: 700;
  margin-top: 0.5rem;
}
#tgFormSubmit[disabled] { opacity: 0.7; cursor: not-allowed; }

/* ===== Footer ===== */
.tg-footer {
  background: var(--tg-night);
  color: var(--tg-white);
  padding: 4rem 0 1.5rem;
}
.tg-footer-text { color: rgba(255,255,255,0.65); font-size: 0.95rem; }
.tg-footer-heading { color: var(--tg-white); font-size: 1rem; font-weight: 700; margin-bottom: 1.1rem; }
.tg-footer-links { list-style: none; padding: 0; margin: 0; }
.tg-footer-links li { margin-bottom: 0.6rem; }
.tg-footer-links a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s ease; }
.tg-footer-links a:hover { color: var(--tg-green-bright); }
.tg-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--tg-white);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.tg-social a:hover { background: var(--tg-green); transform: translateY(-3px); }
.tg-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

/* ===== Responsive tweaks ===== */
@media (max-width: 991.98px) {
  .tg-navbar .navbar-nav { padding-top: 1rem; }
  .tg-hero { padding: 2rem 0 3rem; }
  .min-vh-hero { min-height: auto; }
  .tg-cta-card { padding: 2rem 1.5rem; }
  .tg-section { padding: 4rem 0; }
  .tg-product-panel { padding: 2rem 1.5rem; }
}
@media (max-width: 575.98px) {
  .tg-hero-stats .tg-stat-num { font-size: 1.4rem; }
  .tg-hero-stats .tg-stat-label { font-size: 0.75rem; }
}
