/* =============================================================
   Mansour Systems — shared stylesheet
   Palette: deep navy + teal accent. One accent only.
   ============================================================= */

:root {
  --bg: #070b14;
  --bg-elev: #0f1726;
  --bg-elev-2: #0b1220;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text: #e5e7eb;
  --text-strong: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent: #14b8a6;
  --accent-2: #06b6d4;
  --accent-3: #818cf8;
  --accent-hover: #2dd4bf;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-border: rgba(20, 184, 166, 0.32);
  --gradient: linear-gradient(120deg, #14b8a6 0%, #06b6d4 50%, #818cf8 100%);
  --gradient-soft: linear-gradient(120deg, rgba(20,184,166,0.18) 0%, rgba(6,182,212,0.14) 50%, rgba(129,140,248,0.18) 100%);

  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.10);

  --nav-h: 64px;
  --radius: 10px;
  --radius-lg: 16px;
  --max-w: 1180px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  line-height: 1.15;
}

h1 { font-size: clamp(3rem, 8vw, 6.5rem); letter-spacing: -0.045em; font-weight: 700; line-height: 1.02; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); letter-spacing: -0.03em; font-weight: 700; line-height: 1.08; }
h3 { font-size: 1.15rem; }

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-brand img { height: 32px; width: auto; }
.nav-brand-text { font-size: 1.05rem; }
.nav-brand-text span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.15s, background-color 0.15s;
}
.nav-links a:hover { color: var(--text-strong); background: rgba(148,163,184,0.06); }
.nav-cta {
  margin-left: 10px;
  background: var(--accent);
  color: #0a1a18 !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px 18px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .nav-cta { margin: 6px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  font-family: inherit;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gradient);
  background-size: 200% 100%;
  background-position: 0% 50%;
  color: #06151a;
  box-shadow: 0 8px 24px -8px rgba(20,184,166,0.55), 0 0 0 1px rgba(255,255,255,0.05) inset;
  transition: background-position 0.4s ease, box-shadow 0.2s, transform 0.05s;
}
.btn-primary:hover {
  background-position: 100% 50%;
  color: #06151a;
  box-shadow: 0 12px 32px -8px rgba(6,182,212,0.6), 0 0 0 1px rgba(255,255,255,0.08) inset;
}

.btn-ghost {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-arrow::after {
  content: '→';
  transition: transform 0.15s;
}
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--border); }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding: 5px 12px 5px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  box-shadow: 0 0 24px -8px rgba(20,184,166,0.4);
}
.section-kicker::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.section-head { margin-bottom: 56px; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; margin: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 120px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Drifting gradient mesh, slow */
.hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(20,184,166,0.28) 0%, transparent 60%),
    radial-gradient(45% 55% at 80% 40%, rgba(6,182,212,0.22) 0%, transparent 60%),
    radial-gradient(35% 45% at 60% 80%, rgba(129,140,248,0.22) 0%, transparent 65%);
  filter: blur(10px);
  z-index: -2;
  animation: meshDrift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes meshDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-3%, 2%) scale(1.04); }
  100% { transform: translate(2%, -2%) scale(1.02); }
}

/* Faint grid lattice */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
  z-index: -1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 100%;
}
.hero-copy { max-width: 640px; }
.hero h1 {
  margin: 16px 0 24px;
}
.hero-sub {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  color: var(--text);
  max-width: 580px;
  margin: 0 0 36px;
  line-height: 1.5;
}
.hero-sub strong { color: var(--text-strong); font-weight: 500; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero graphic — animated node/stream network */
.hero-graphic {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  filter: drop-shadow(0 30px 80px rgba(20,184,166,0.25));
}
.hero-graphic svg { width: 100%; height: 100%; overflow: visible; }
.hero-graphic .ring {
  fill: none;
  stroke: url(#heroGrad);
  stroke-width: 1.5;
  opacity: 0.35;
}
.hero-graphic .ring-1 { animation: ringPulse 6s ease-in-out infinite; }
.hero-graphic .ring-2 { animation: ringPulse 6s ease-in-out infinite 2s; }
.hero-graphic .ring-3 { animation: ringPulse 6s ease-in-out infinite 4s; }
@keyframes ringPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); transform-origin: center; }
  50%      { opacity: 0.5;  transform: scale(1.05); }
}
.hero-graphic .node {
  fill: var(--accent);
  filter: drop-shadow(0 0 8px rgba(20,184,166,0.8));
}
.hero-graphic .node-2 { fill: var(--accent-2); filter: drop-shadow(0 0 8px rgba(6,182,212,0.8)); }
.hero-graphic .node-3 { fill: var(--accent-3); filter: drop-shadow(0 0 8px rgba(129,140,248,0.8)); }
.hero-graphic .link {
  fill: none;
  stroke: url(#heroGrad);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.5;
}
.hero-graphic .pulse {
  fill: #f8fafc;
  filter: drop-shadow(0 0 6px var(--accent));
}
.hero-graphic .core {
  fill: url(#heroGradRadial);
  filter: drop-shadow(0 0 30px rgba(20,184,166,0.6));
  animation: corePulse 4s ease-in-out infinite;
}
@keyframes corePulse {
  0%, 100% { transform: scale(1); transform-origin: center; }
  50%      { transform: scale(1.06); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-graphic { max-width: 360px; margin: 0 auto; order: 2; }
}

/* ---------- Problem statement ---------- */
.statement {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.statement h2 { margin-bottom: 16px; }
.statement p { color: var(--text-muted); margin-bottom: 0; font-size: 1.05rem; }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.metric {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.metric-value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 500;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  line-height: 1;
}
.metric-delta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

@media (max-width: 820px) {
  .statement { grid-template-columns: 1fr; padding: 32px; gap: 32px; }
}

/* ---------- Services grid ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  isolation: isolate;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.25s;
  filter: blur(20px);
}
.card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(20,184,166,0.35);
}
.card:hover::before { opacity: 0.35; }

.card-icon {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 18px;
}
.card-icon img,
.card-icon svg {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ---------- Case cards ---------- */
.case {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.case:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(20,184,166,0.35);
}
.case-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.case h3 { font-size: 1.2rem; margin: 0; }
.case p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }
.case-stat {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 16px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

/* ---------- Trusted by ---------- */
.trusted {
  text-align: center;
}
.trusted-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.trusted-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
}
.trusted-chip {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev);
  transition: color 0.15s, border-color 0.15s;
}
.trusted-chip:hover { color: var(--text-strong); border-color: var(--border-strong); }

/* ---------- Testimonials ---------- */
.quote {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}
.quote-mark {
  font-family: Georgia, serif;
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 0.5;
  height: 14px;
}
.quote p { color: var(--text); font-size: 0.98rem; margin: 0; flex-grow: 1; }
.quote-attr {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.quote-attr strong { color: var(--text-strong); font-weight: 600; }

/* ---------- Insights ---------- */
.insight {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.insight:hover {
  border-color: var(--accent-border);
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(6,182,212,0.35);
}
.insight-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.insight h3 { font-size: 1.15rem; margin: 0; }
.insight p { color: var(--text-muted); font-size: 0.93rem; margin: 0; flex-grow: 1; }
.insight-more {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 8px;
}
.insight-more::after { content: ' →'; transition: margin-left 0.15s; }
.insight:hover .insight-more::after { margin-left: 4px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: center;
}
.about-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}
.about-body p { color: var(--text-muted); font-size: 1.05rem; }
.about-body p:last-child { color: var(--accent); font-weight: 500; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .about-photo { max-width: 220px; margin: 0 auto; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.contact-info p { color: var(--text-muted); }
.contact-info .email-line {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 0.95rem;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
  display: block;
}
.contact-info .email-line:hover { border-color: var(--accent-border); color: var(--accent); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field input,
.field textarea {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  transition: border-color 0.15s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--accent); }

/* ---------- Article pages ---------- */
.article {
  padding: 80px 0 96px;
  max-width: 760px;
  margin: 0 auto;
}
.article-back {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  display: inline-block;
}
.article-back::before { content: '← '; }
.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.article h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}
.article-lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  line-height: 1.55;
}
.article h2 {
  font-size: 1.6rem;
  margin-top: 48px;
  margin-bottom: 16px;
}
.article h3 {
  font-size: 1.2rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-strong);
}
.article p, .article li {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}
.article ul, .article ol {
  padding-left: 22px;
  margin-bottom: 20px;
}
.article li { margin-bottom: 8px; }
.article blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}
.article code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}
.article pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}
.article pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.9rem;
}
.article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}
