/* All visual styles for the portfolio. Organised by section top-to-bottom matching HTML flow. */

/* ═══════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════ */
:root {
  --white:     #FFFFFF;
  --black:     #0A0A0A;
  --navy:      #1E3A5F;
  --navy-h:    #16304f;
  --gray-50:   #F9FAFB;
  --gray-100:  #F3F4F6;
  --gray-200:  #E5E7EB;
  --gray-300:  #D1D5DB;
  --gray-400:  #9CA3AF;
  --gray-500:  #6B7280;
  --gray-600:  #4B5563;
  --gray-700:  #374151;
  --gray-800:  #1F2937;

  --green:            #16a34a;
  --green-glow:       rgba(22,163,74,0.4);
  --nav-h:            64px;
  --marquee-duration: 28s;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1200px;
}

/* ═══════════════════════════════════════
   RESET
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font-family: inherit; }

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 48px; }
@media (max-width: 768px) { .wrap { padding: 0 24px; } }
@media (max-width: 640px) {
  .hero-title br,
  .about-title br { display: none; }
}

section { padding: 120px 0; }
@media (max-width: 768px) { section { padding: 80px 0; } }

/* ═══════════════════════════════════════
   REVEAL ANIMATIONS (IntersectionObserver)
═══════════════════════════════════════ */
.rv {
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
/* JS adds .rv-init to hide elements before observing them */
.rv.rv-init {
  opacity: 0;
  transform: translateY(24px);
}
.rv.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 900;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom-color: var(--gray-200);
}
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img {
  height: 40px; width: auto; display: block;
}

.nav-links {
  display: flex; align-items: center; gap: 36px; list-style: none;
}
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--gray-500);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--black); }

.nav-cta {
  font-size: 13px; font-weight: 600;
  padding: 9px 20px;
  background: var(--navy); color: var(--white);
  border-radius: 6px;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--navy-h); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--black); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile drawer */
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; background: var(--white);
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  z-index: 1000; padding: 80px 32px 40px;
  display: flex; flex-direction: column; gap: 8px;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer a {
  font-size: 17px; font-weight: 500; color: var(--gray-700);
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
  display: block; transition: color 0.2s;
}
.nav-drawer a:hover { color: var(--navy); }
.nav-drawer a:last-child { border-bottom: none; }
.nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.nav-overlay.open { opacity: 1; pointer-events: all; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
#hero {
  background: var(--white);
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--nav-h);
}
.hero-inner {
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100svh - var(--nav-h));
  padding: 80px 0 0;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  display: block; width: 24px; height: 1px; background: var(--navy);
}

.hero-title {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.06;
  color: var(--black); margin-bottom: 28px;
}
.hero-title em {
  font-style: normal; color: var(--navy);
}

.hero-sub {
  font-size: 17px; line-height: 1.7; color: var(--gray-500);
  margin-bottom: 44px; font-weight: 400;
}

.hero-btns {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 80px;
}
.btn-primary {
  font-size: 14px; font-weight: 600;
  padding: 13px 28px; background: var(--navy); color: var(--white);
  border-radius: 6px; transition: background 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--navy-h); }
.btn-secondary {
  font-size: 14px; font-weight: 500;
  padding: 13px 28px; background: transparent; color: var(--gray-700);
  border: 1px solid var(--gray-300); border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { border-color: var(--gray-500); color: var(--black); }

/* Hero metrics strip */
.hero-metrics {
  border-top: 1px solid var(--gray-200);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 40px 0 60px;
}
@media (max-width: 640px) {
  .hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 32px 0; padding: 32px 0 48px; }
}
.hm-val {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500; color: var(--navy);
  line-height: 1; margin-bottom: 6px; letter-spacing: -0.02em;
}
.hm-lbl {
  font-size: 12px; color: var(--gray-400);
  letter-spacing: 0.04em; line-height: 1.4;
}

/* ═══════════════════════════════════════
   ABOUT
═══════════════════════════════════════ */
#about { background: var(--white); border-top: 1px solid var(--gray-200); }

.sec-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 52px;
  display: flex; align-items: center; gap: 10px;
}
.sec-label::before {
  content: '';
  display: block; width: 20px; height: 1px; background: var(--navy);
}

.about-grid {
  display: grid; grid-template-columns: 60fr 40fr; gap: 96px;
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 56px; } }

.about-title {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  color: var(--black); margin-bottom: 28px;
}
.about-body p {
  font-size: 16px; line-height: 1.78; color: var(--gray-600);
  margin-bottom: 18px;
}
.about-body p:last-of-type { margin-bottom: 28px; }
.about-quote {
  font-style: italic; font-size: 17px; line-height: 1.7;
  color: var(--gray-700);
  border-left: 3px solid var(--navy);
  padding-left: 20px; margin-top: 8px;
}

/* Timeline */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px; background: var(--gray-200);
}
.tl-item { position: relative; padding-left: 28px; margin-bottom: 36px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--navy); border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--gray-200);
}
.tl-year {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; color: var(--navy);
  font-weight: 500; margin-bottom: 4px;
}
.tl-role {
  font-size: 14px; font-weight: 600; color: var(--black);
  margin-bottom: 2px;
}
.tl-desc {
  font-size: 13px; color: var(--gray-500); line-height: 1.5;
}

/* ═══════════════════════════════════════
   SERVICES
═══════════════════════════════════════ */
#services { background: var(--gray-50); }

.services-header { margin-bottom: 56px; }
.sec-title {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  color: var(--black); margin-bottom: 16px;
}
.sec-sub {
  font-size: 16px; color: var(--gray-500); max-width: 480px; line-height: 1.7;
}

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--gray-200); border: 1px solid var(--gray-200);
  border-radius: 8px; overflow: hidden;
}
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; } }
@media (min-width: 861px) {
  .svc-card:last-child:nth-child(3n+2) { grid-column: span 2; }
}

.svc-card {
  background: var(--white); padding: 44px 36px;
  position: relative; overflow: hidden;
  transition: background 0.25s;
}
.svc-card:hover { background: #FAFBFF; }
.svc-num {
  position: absolute; top: 8px; right: 16px;
  font-family: var(--font-mono); font-size: 140px; font-weight: 700;
  color: rgba(30,58,95,0.05); line-height: 1; letter-spacing: -0.04em;
  user-select: none; pointer-events: none;
}
.svc-icon {
  width: 40px; height: 40px; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30,58,95,0.06); border-radius: 8px;
  color: var(--navy); position: relative; z-index: 1;
}
.svc-name {
  font-size: 17px; font-weight: 600; color: var(--black);
  margin-bottom: 10px; letter-spacing: -0.01em;
  position: relative; z-index: 1;
}
.svc-desc {
  font-size: 14px; color: var(--gray-500); line-height: 1.7;
  margin-bottom: 24px; position: relative; z-index: 1;
}
.svc-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--navy);
  opacity: 0; transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
  position: relative; z-index: 1;
}
.svc-card:hover .svc-arrow { opacity: 1; transform: translateX(0); }
@media (max-width: 860px) {
  .svc-arrow { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════
   CASE STUDIES
═══════════════════════════════════════ */
#work { background: var(--white); }

.case-stack { display: flex; flex-direction: column; }

.case-item {
  border-left: 3px solid var(--navy);
  background: var(--white); padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.3s, border-left-width 0.3s;
  position: relative;
}
.case-item:hover {
  background: #F7F9FF;
  border-left-width: 5px;
}
@media (max-width: 640px) {
  .case-item { padding: 32px 24px; }
}

/* Header: tag + period inline, client name full-width below */
.case-col-a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-bottom: 28px;
}
.case-col-a .case-tag  { margin-bottom: 0; }
.case-col-a .case-client { flex: 0 0 100%; margin-bottom: 0; font-size: 26px; margin-top: 6px; }
.case-col-a .case-period { margin-bottom: 0; }

/* Stats: order 2, sits between header and description */
.case-col-c {
  order: 2;
  padding: 28px 0;
  border-top: 1px solid var(--gray-100);
}

/* Description: order 3 */
.case-col-b {
  order: 3;
  padding-top: 28px;
  border-top: 1px solid var(--gray-100);
}

.case-tag {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--navy); background: rgba(30,58,95,0.06);
  padding: 4px 10px; border-radius: 4px;
  display: inline-block; margin-bottom: 0;
}
.case-client {
  font-size: 20px; font-weight: 700; color: var(--black);
  letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px;
}
.case-period {
  font-size: 12px; color: var(--gray-400);
  font-family: var(--font-mono); margin-bottom: 0;
}

/* Live status badge */
.status-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--green); letter-spacing: 0.04em; margin-top: 8px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--green-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(22,163,74,0); }
}

/* Challenge + built section */
.case-challenge-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 10px;
}
.case-challenge-text {
  font-size: 14px; line-height: 1.75; color: var(--gray-600);
  margin-bottom: 20px;
}
.case-built-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gray-400); margin-bottom: 8px;
}
.case-built-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.case-built-tag {
  font-size: 11px; color: var(--gray-600);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}

/* Results — single row */
.case-results {
  display: flex;
  flex-direction: row;
  gap: 0;
  margin-bottom: 0;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}
.case-result {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 14px;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
}
.case-result:last-child { border-right: none; }
@media (max-width: 640px) {
  .case-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
  }
  .case-result { border-right: none; }
}
.cr-num {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 600; color: var(--navy);
  letter-spacing: -0.03em; white-space: nowrap; line-height: 1;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.cr-num.revealed { opacity: 1; transform: translateY(0); }
.cr-desc {
  font-size: 11px; color: var(--gray-500); line-height: 1.4;
}
.case-link {
  font-size: 13px; font-weight: 500; color: var(--navy);
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(30,58,95,0.2);
  padding-bottom: 2px;
  transition: border-color 0.2s, gap 0.2s;
}
.case-link:hover { border-color: var(--navy); gap: 10px; }

/* ═══════════════════════════════════════
   SAAS PRODUCTS
═══════════════════════════════════════ */
#saas { background: var(--gray-50); }

.saas-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 768px) { .saas-grid { grid-template-columns: 1fr; } }

.saas-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: 12px; padding: 44px 40px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.saas-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.saas-badge {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy); background: rgba(30,58,95,0.07);
  padding: 4px 10px; border-radius: 4px;
  display: inline-block; margin-bottom: 20px;
}
.saas-name {
  font-size: 26px; font-weight: 700; color: var(--black);
  letter-spacing: -0.025em; margin-bottom: 8px;
}
.saas-tagline {
  font-size: 15px; color: var(--gray-500); line-height: 1.6;
  margin-bottom: 28px;
}
.saas-features { list-style: none; margin-bottom: 32px; }
.saas-features li {
  font-size: 14px; color: var(--gray-600); padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex; gap: 10px; align-items: flex-start;
  line-height: 1.5;
}
.saas-features li:last-child { border-bottom: none; }
.saas-features li::before {
  content: '–'; color: var(--navy); font-weight: 600;
  flex-shrink: 0; line-height: 1.5;
}
.saas-features li .feat-text { display: block; }
.saas-features li em {
  display: block;
  font-style: italic; color: var(--gray-400); font-size: 12px;
  margin-top: 3px;
}
.saas-cta {
  font-size: 14px; font-weight: 600; color: var(--navy);
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(30,58,95,0.25);
  padding-bottom: 2px;
  transition: border-color 0.2s, gap 0.2s;
}
.saas-cta:hover { border-color: var(--navy); gap: 10px; }

/* ═══════════════════════════════════════
   METRICS
═══════════════════════════════════════ */
#metrics { background: var(--white); }

.metrics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 56px 40px;
}
@media (max-width: 860px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; } }
@media (max-width: 480px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; } }

.metric-val {
  font-family: var(--font-mono);
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 500; color: var(--navy);
  letter-spacing: -0.03em; line-height: 1; margin-bottom: 10px;
}
.metric-lbl {
  font-size: 13px; color: var(--gray-500); line-height: 1.5;
}
.metric-sub {
  font-size: 11px; color: var(--gray-400); margin-top: 4px;
  font-family: var(--font-mono); letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════
   CLIENTS
═══════════════════════════════════════ */
#clients { background: var(--gray-50); }

.clients-marquee-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}
.clients-row {
  display: flex; align-items: center;
  flex-wrap: nowrap; gap: 64px;
  width: max-content;
  animation: marquee var(--marquee-duration) linear infinite;
}
.clients-row:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.client-logo {
  height: 40px; width: auto; object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  mix-blend-mode: multiply;
  transition: filter 0.35s ease, opacity 0.35s ease;
  display: block; flex-shrink: 0;
}
.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  mix-blend-mode: normal;
}
.client-sep {
  color: var(--gray-300); font-size: 18px; line-height: 1;
  user-select: none;
}

/* ═══════════════════════════════════════
   TECH STACK
═══════════════════════════════════════ */
#stack { background: var(--white); }

.stack-groups { display: flex; flex-direction: column; gap: 48px; }

.stack-group-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray-400); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.stack-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-tag {
  font-size: 13px; font-weight: 500; color: var(--gray-700);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  padding: 6px 14px; border-radius: 100px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: default;
}
.stack-tag:hover {
  background: rgba(30,58,95,0.06);
  color: var(--navy); border-color: rgba(30,58,95,0.2);
}

/* ═══════════════════════════════════════
   EMPLOYER SIGNAL
═══════════════════════════════════════ */
#signal { background: var(--gray-50); }

.signal-inner {
  max-width: 720px; margin: 0 auto; text-align: center;
}
.signal-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 24px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.signal-eyebrow::before,
.signal-eyebrow::after {
  content: ''; display: block; flex: 1;
  max-width: 40px; height: 1px; background: var(--navy); opacity: 0.4;
}
.signal-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.15;
  color: var(--black); margin-bottom: 20px;
}
.signal-sub {
  font-size: 16px; color: var(--gray-500); line-height: 1.75;
  margin-bottom: 36px;
}
.signal-roles {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 40px;
}
.signal-role {
  font-size: 13px; font-weight: 500; color: var(--navy);
  background: rgba(30,58,95,0.07);
  padding: 8px 16px; border-radius: 100px;
}
.signal-note {
  font-size: 13px; color: var(--gray-400); font-style: italic;
}

/* ═══════════════════════════════════════
   CONTACT
═══════════════════════════════════════ */
#contact { background: var(--white); border-top: 1px solid var(--gray-200); }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 56px; } }

.contact-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.15;
  color: var(--black); margin-bottom: 20px;
}
.contact-desc {
  font-size: 16px; color: var(--gray-500); line-height: 1.75;
  margin-bottom: 36px;
}
.contact-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 16px 28px;
  background: var(--navy); color: var(--white);
  border-radius: 8px; font-size: 15px; font-weight: 600;
  transition: background 0.2s;
  margin-bottom: 20px;
}
.contact-whatsapp:hover { background: var(--navy-h); }
.contact-links {
  display: flex; flex-direction: column; gap: 12px;
}
.contact-link {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--gray-500);
  transition: color 0.2s;
}
.contact-link:hover { color: var(--navy); }
.contact-link svg { flex-shrink: 0; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.form-input, .form-textarea {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--gray-200); border-radius: 6px;
  font-size: 15px; color: var(--black);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.08);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
.form-select {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--gray-200); border-radius: 6px;
  font-size: 15px; color: var(--black);
  background: var(--white);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.08);
}
.form-submit {
  width: 100%; padding: 14px 28px;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 6px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.form-submit:hover { background: var(--navy-h); }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
#footer {
  background: var(--black); padding: 60px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.footer-logo img {
  height: 28px; width: auto; display: block;
  filter: invert(1);
}
.footer-copy {
  font-size: 13px; color: rgba(255,255,255,0.35);
}
.footer-icons {
  display: flex; align-items: center; gap: 16px;
}
.footer-icon {
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
  display: flex; align-items: center;
}
.footer-icon:hover { color: var(--white); }

/* ── WordPress Compatibility ── */

/* Admin bar compensation */
.admin-bar #nav {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar #nav {
    top: 46px;
  }
}

/* WordPress core style resets — prevent block editor styles leaking in */
.wp-block-image img { margin: 0; }
.wp-caption { max-width: 100%; }

/* ===== BLOG STYLES ===== */

/* Fix: content starts below fixed nav */
.blog-hero,
.post-header,
.archive-hero {
  padding-top: calc(var(--nav-h) + 80px);
}

/* Fix: remove any unintended bottom margin on last blog section */
.blog-grid-section,
.post-content-section {
  margin-bottom: 0;
}

/* Hero section */
.blog-hero {
  background: var(--white);
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--gray-200);
}
.blog-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.blog-hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--navy);
}
.blog-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--black);
  margin-bottom: 16px;
}
.blog-hero p {
  font-size: 18px;
  color: var(--gray-500);
  max-width: 560px;
}

/* Posts grid */
.blog-grid-section {
  background: var(--white);
  padding: 80px 0 120px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* Post card */
.post-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  border-color: var(--navy);
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.08);
}
.post-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  background: var(--gray-100);
  display: block;
}
.post-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-card-image-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--gray-300);
}
.post-card-body {
  padding: 24px;
}
.post-card-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
  display: block;
}
.post-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.post-card-excerpt {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 20px;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 20px;
}
.post-card-meta span { display: flex; align-items: center; gap: 4px; }
.post-card-read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.post-card:hover .post-card-read-more { gap: 10px; }

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
}
.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.2s;
}
.blog-pagination a:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.blog-pagination .current {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--gray-400);
  font-size: 16px;
}

/* ===== SINGLE POST STYLES ===== */

.post-header {
  background: var(--white);
  padding: 120px 0 64px;
  border-bottom: 1px solid var(--gray-200);
}
.post-header-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 16px;
  display: block;
}
.post-header h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 800px;
}
.post-header-excerpt {
  font-size: 20px;
  color: var(--gray-500);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.post-header-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--gray-400);
  flex-wrap: wrap;
}
.post-featured-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Post content */
.post-content-section {
  background: var(--white);
  padding: 80px 0 120px;
}
.post-content-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) {
  .post-content-wrap { padding: 0 24px; }
}
.post-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--gray-700);
}
.post-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
}
.post-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--black);
  margin: 36px 0 12px;
}
.post-content p { margin-bottom: 24px; }
.post-content ul, .post-content ol {
  margin: 0 0 24px 24px;
}
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  border-left: 3px solid var(--navy);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--gray-50);
  border-radius: 0 8px 8px 0;
  font-size: 18px;
  color: var(--gray-600);
  font-style: italic;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--gray-100);
  color: var(--navy);
  padding: 2px 6px;
  border-radius: 4px;
}
.post-content pre {
  background: var(--black);
  color: #e5e7eb;
  padding: 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 32px 0;
}
.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 14px;
}
.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 32px auto;
}
.post-content a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Post footer */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}
.post-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: 100px;
}
.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 48px;
  transition: gap 0.2s;
}
.post-back-link:hover { gap: 12px; }

/* Author bio */
.post-author-bio {
  display: flex;
  gap: 20px;
  padding: 32px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  margin-bottom: 64px;
}
.post-author-bio img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-author-bio-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}
.post-author-bio-role {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.post-author-bio-desc {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 12px;
}
.post-author-bio-links {
  display: flex;
  gap: 16px;
}
.post-author-bio-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.post-author-bio-links a:hover {
  border-color: var(--black);
}

/* Related posts */
.related-posts {
  padding-top: 64px;
  border-top: 1px solid var(--gray-200);
}
.related-posts-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .related-posts-grid { grid-template-columns: 1fr; }
}

/* ===== ARCHIVE STYLES ===== */

.archive-hero {
  background: var(--white);
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--gray-200);
}
.archive-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.archive-hero p {
  font-size: 18px;
  color: var(--gray-500);
}

/* ===== RTL & ARABIC LANGUAGE STYLES ===== */

/* Arabic font — SF Arabic on Apple, Tajawal everywhere else */
[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] p, [dir="rtl"] a, [dir="rtl"] span, [dir="rtl"] li,
[dir="rtl"] button, [dir="rtl"] input, [dir="rtl"] textarea {
  font-family: 'SF Arabic', -apple-system, BlinkMacSystemFont, 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

[dir="rtl"] .entry-content {
  text-align: right;
}

/* Nav RTL */
[dir="rtl"] .nav-inner {
  flex-direction: row; 
}
[dir="rtl"] .nav-links {
  flex-direction: row; 
}

/* Hero eyebrow RTL */
[dir="rtl"] .hero-eyebrow {
  flex-direction: row;
}
[dir="rtl"] .hero-eyebrow::before {
  margin-right: 0;
  margin-left: 12px;
}

/* Hero text RTL */
[dir="rtl"] .hero-inner,
[dir="rtl"] .wrap {
  text-align: right;
}

/* Blog card RTL */
[dir="rtl"] .post-card-meta {
  flex-direction: row;
}
[dir="rtl"] .post-card-read-more {
  flex-direction: row;
}
[dir="rtl"] .post-card-body {
  text-align: right;
}

/* Blog hero RTL */
[dir="rtl"] .blog-hero,
[dir="rtl"] .blog-hero-eyebrow {
  text-align: right;
}
[dir="rtl"] .blog-hero-eyebrow {
  flex-direction: row;
}
[dir="rtl"] .blog-hero-eyebrow::before {
  margin-right: 0;
  margin-left: 12px;
}

/* Post content RTL */
[dir="rtl"] .post-content {
  text-align: right;
}
[dir="rtl"] .post-content blockquote {
  border-left: none;
  border-right: 3px solid var(--navy);
  border-radius: 8px 0 0 8px;
  text-align: right;
}
[dir="rtl"] .post-content ul,
[dir="rtl"] .post-content ol {
  margin: 0 24px 24px 0;
}

/* Post back link RTL */
[dir="rtl"] .post-back-link {
  flex-direction: row;
}

/* Author bio RTL */
[dir="rtl"] .post-author-bio {
  flex-direction: row;
  text-align: right;
}

/* Footer RTL */
[dir="rtl"] footer .wrap {
  flex-direction: row;
}

/* Section eyebrows RTL (services, about, etc.) */
[dir="rtl"] .section-eyebrow,
[dir="rtl"] .about-eyebrow,
[dir="rtl"] .services-eyebrow,
[dir="rtl"] .work-eyebrow {
  flex-direction: row;
}

/* Language toggle — shows only the OTHER language */
/* Nav CTA group — lang toggle + Let's Talk side by side */
.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Globe icon before the text */
.lang-toggle::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.6;
  flex-shrink: 0;
}

.lang-toggle:hover {
  color: var(--navy);
  background: var(--gray-50);
}

.lang-toggle:hover::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E3A5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
}

/* Mobile */
.lang-toggle--mobile {
  font-size: 14px;
  padding: 10px 14px;
  margin: 8px 0;
  width: fit-content;
}

/* RTL nav — push toggle to left side */
[dir="rtl"] .nav-inner {
  flex-direction: row;
}

/* Services card RTL */
[dir="rtl"] .svc-num {
  right: auto;
  left: 16px;
}

[dir="rtl"] .svc-arrow svg, html[dir="rtl"] .btn-primary svg {
  transform: scaleX(-1);
}

/* SaaS CTA RTL — arrow points left */

[dir="rtl"] .saas-cta svg {
  transform: scaleX(-1);
}

/* Brands marquee RTL — scroll right-to-left becomes left-to-right */
@keyframes marquee-rtl {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
[dir="rtl"] .clients-row {
  animation-name: marquee-rtl;
}

/* Fix: English pages always LTR — safety rule */
[dir="ltr"] body,
html:not([dir="rtl"]) body {
  direction: ltr;
  text-align: left;
}
