/* ==========================================================================
   AG Telecom + Wasel Telecom — brand.css
   Shared design tokens + components (PRD §3.2)
   ========================================================================== */

:root {
  --navy: #0A1628;
  --ink: #050B14;
  --brand: #2E7CE6;
  --brand-dark: #2569C9;
  --pulse: #38BDF8;
  --sand: #FAF7F2;
  --paper: #FFFFFF;
  --saffron: #E8A020;
  --saffron-dark: #8A5A06;   /* AA-safe saffron for text on light surfaces */
  --terracotta: #C4553B;
  --terracotta-dark: #8A3A28; /* AA-safe terracotta for text on light surfaces */
  --green: #159A8C;
  --slate-600: #475569;
  --slate-400: #94A3B8;
}

html {
  scroll-padding-top: 6rem;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
#siteHeader {
  background-color: rgba(10, 22, 40, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#siteHeader.scrolled {
  background-color: rgba(10, 22, 40, 0.94);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.85);
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.82);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--pulse);
}

.nav-link.nav-wasel {
  color: var(--saffron);
  font-weight: 600;
}

.nav-link.nav-wasel:hover,
.nav-link.nav-wasel.active {
  color: #F2C878;
}

.nav-link.nav-wasel.active::after {
  background: var(--saffron);
}

.mobile-link {
  display: flex;
  align-items: center;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.85);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-link:hover {
  background: rgba(46, 124, 230, 0.14);
  color: #ffffff;
}

.mobile-link.active {
  background: rgba(46, 124, 230, 0.22);
  color: #ffffff;
}

.mobile-link.nav-wasel {
  color: var(--saffron);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 14px 30px -16px rgba(46, 124, 230, 0.85);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-saffron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  background: var(--saffron);
  color: var(--navy);
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.btn-saffron:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Cards, pills, stats
   -------------------------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid rgba(10, 22, 40, 0.08);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 50px -26px rgba(10, 22, 40, 0.2);
  border-color: rgba(46, 124, 230, 0.28);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-brand {
  background: rgba(46, 124, 230, 0.12);
  color: #1D5FB5;
  border: 1px solid rgba(46, 124, 230, 0.3);
}

.pill-pulse {
  background: rgba(56, 189, 248, 0.14);
  color: #0E7490;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.pill-saffron {
  background: rgba(232, 160, 32, 0.16);
  color: var(--saffron-dark);
  border: 1px solid rgba(232, 160, 32, 0.4);
}

.pill-green {
  background: rgba(21, 154, 140, 0.14);
  color: #0E6B62;
  border: 1px solid rgba(21, 154, 140, 0.38);
}

.pill-terracotta {
  background: rgba(196, 85, 59, 0.13);
  color: var(--terracotta-dark);
  border: 1px solid rgba(196, 85, 59, 0.36);
}

.pill-neutral {
  background: rgba(71, 85, 105, 0.08);
  color: #475569;
  border: 1px solid rgba(71, 85, 105, 0.25);
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.05;
  color: var(--navy);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-caption {
  font-size: 0.875rem;
  color: var(--slate-600);
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   Section head
   -------------------------------------------------------------------------- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  color: var(--navy);
  margin-top: 0.75rem;
  letter-spacing: -0.02em;
}

.section-lede {
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--slate-600);
}

/* --------------------------------------------------------------------------
   Girih geometric accent + divider star
   -------------------------------------------------------------------------- */
.girih-bg {
  position: relative;
}

.girih-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%232E7CE6' stroke-width='1'%3E%3Crect x='24' y='24' width='48' height='48'/%3E%3Crect x='24' y='24' width='48' height='48' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px;
  opacity: 0.04;
  pointer-events: none;
}

.divider-star {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.divider-star::before,
.divider-star::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 8rem;
  background: linear-gradient(90deg, transparent, rgba(10, 22, 40, 0.22));
}

.divider-star::after {
  background: linear-gradient(90deg, rgba(10, 22, 40, 0.22), transparent);
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer-head {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94A3B8;
}

.footer-link {
  color: #CBD5E1;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-link-wasel {
  color: var(--saffron);
}

.footer-link-wasel:hover {
  color: #F2C878;
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
#toTop {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 16px 32px -16px rgba(46, 124, 230, 0.85);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#toTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#toTop:hover {
  background: var(--brand-dark);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.field-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(10, 22, 40, 0.14);
  background: #ffffff;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 124, 230, 0.16);
}

.field-input[aria-invalid="true"] {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(196, 85, 59, 0.14);
}

.field-error {
  color: var(--terracotta-dark);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  #siteHeader,
  .nav-link,
  .mobile-link,
  .card,
  .btn-primary,
  .btn-secondary,
  .btn-saffron,
  #toTop {
    transition: none !important;
  }
}
