/* ============ Tokens ============ */
/* Monochrome + single accent: grayscale everything except crimson,
   which is reserved for CTAs and links. */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #1a1a1a;
  --text-muted: #6e6e6e;
  --border: #e2e2e2;
  --card: #ffffff;

  /* The one accent — reserved for CTAs and links only */
  --brand-1: #c1272d;
  --brand-1-deep: #8f1d22;

  /* Grayscale ramp used everywhere else (icon cycling, labels, decorative bars) */
  --brand-2: #5c5c5c;
  --brand-3: #8a8a8a;
  --bird-gray: #4d4d4d;
  --bar-orange: #bdbdbd;
  --bar-purple: #2e2e2e;
  --accent: #6e6e6e;

  --gradient: linear-gradient(135deg, var(--brand-1), var(--brand-1-deep));

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --font-head: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --header-h: 84px;
  --header-bg: rgba(255, 255, 255, 0.7);
  --footer-bg: #171717;
  --footer-text: #d4d4d4;
  --footer-text-strong: #ffffff;
  --footer-muted: #9a9a9a;
}

:root[data-theme="dark"] {
  --bg: #121212;
  --bg-alt: #1a1a1a;
  --text: #eeeeee;
  --text-muted: #a0a0a0;
  --border: #2c2c2c;
  --card: #1a1a1a;
  --header-bg: rgba(18, 18, 18, 0.75);

  --brand-2: #9a9a9a;
  --brand-3: #7a7a7a;
  --bar-orange: #5c5c5c;
  --bar-purple: #d4d4d4;
  --accent: #a0a0a0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

html, body { overflow-x: hidden; max-width: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 12px;
}

.section-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* ============ Progress bar ============ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 900;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo { height: 54px; width: auto; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle:hover { color: var(--brand-2); }

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  background: var(--bg-alt);
  color: var(--text);
}

.nav-cta {
  margin-left: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: var(--bg-alt);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.visible { opacity: 1; pointer-events: auto; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

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

.btn-ghost:hover { border-color: var(--brand-1); color: var(--brand-1); }

.btn-block { width: 100%; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 90px;
  overflow: hidden;
  background: var(--bg-alt);
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

.hero-grid { position: absolute; inset: 0; color: var(--border); opacity: 0.6; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
}

.blob-1 {
  width: 420px; height: 420px;
  background: var(--brand-3);
  top: -120px; right: -100px;
}

.blob-2 {
  width: 320px; height: 320px;
  background: var(--accent);
  bottom: -140px; left: -80px;
  opacity: 0.25;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============ Sections generic ============ */
section { padding: 100px 0; }

.section-head { max-width: 640px; margin-bottom: 56px; }

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: -0.01em;
}

.section-head em { color: var(--brand-1); font-style: normal; }

/* ============ About ============ */
.about-lead {
  max-width: 680px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.about-lead p { color: var(--text-muted); font-size: 1.05rem; margin: 0 0 18px; }
.about-lead p:last-child { margin-bottom: 0; }

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  position: relative;
  overflow: hidden;
  padding: 26px 26px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.value-num {
  position: absolute;
  top: 6px;
  right: 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--text-muted);
  opacity: 0.35;
  line-height: 1;
}

.value-card h4 { font-size: 1.05rem; margin-bottom: 6px; position: relative; }
.value-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; position: relative; }

/* ============ Services ============ */
.services { background: var(--bg-alt); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--gradient);
  color: #fff;
  margin-bottom: 20px;
}

/* Cycle icons through the ProBirds bar-chart colors */
.service-card:nth-child(4n+1) .service-icon { background: var(--bar-orange); }
.service-card:nth-child(4n+2) .service-icon { background: var(--brand-3); }
.service-card:nth-child(4n+3) .service-icon { background: var(--brand-2); }
.service-card:nth-child(4n+4) .service-icon { background: var(--bar-purple); }

.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ============ Product Nexus ============ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.product-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.product-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--bg-alt);
  color: var(--brand-1);
}

.product-icon-logo { background: transparent !important; padding: 0; overflow: hidden; border-radius: 50%; }
.product-icon-logo img { width: 100%; height: 100%; object-fit: contain; }

.product-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.product-card h3 { font-size: 1.25rem; margin: 0; }

.product-card > p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 18px; }

.product-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  flex-grow: 1;
}

.product-features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

.product-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-1);
  transition: gap 0.2s ease, color 0.2s ease;
}

.product-link:hover { color: var(--brand-1-deep); }

/* ============ Clients ============ */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.client-tile {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.client-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.client-tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1) opacity(0.65);
  transition: filter 0.25s ease;
}

.client-tile:hover img { filter: grayscale(0) opacity(1); }

@media (prefers-reduced-motion: reduce) {
  .client-tile img { filter: none; }
}

/* ============ Contact ============ */
.contact { background: var(--bg-alt); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}

.contact-info h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }

.contact-list { margin: 28px 0; display: flex; flex-direction: column; gap: 18px; }

.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.contact-list svg { color: var(--brand-2); flex-shrink: 0; }

.social-row { display: flex; gap: 12px; }
.social-row[hidden] { display: none; }

.social-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.social-icon:hover { background: var(--gradient); color: #fff; border-color: transparent; }

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row { display: flex; flex-direction: column; gap: 6px; }

.form-row label { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.15);
}

.form-note { font-size: 0.9rem; color: var(--brand-1); min-height: 20px; }

.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1100;
  max-width: calc(100vw - 48px);
}

.toast svg { flex-shrink: 0; color: var(--brand-2); }

.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .toast { bottom: 18px; font-size: 0.9rem; padding: 12px 18px; }
}

/* ============ Footer ============ */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 40px 0; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand { display: flex; align-items: center; }

.footer-logo { height: 34px; width: auto; }

.footer-links { display: flex; gap: 24px; }

.footer-links a { font-size: 0.92rem; color: var(--footer-text); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--footer-text-strong); }

.footer-copy { font-size: 0.85rem; color: var(--footer-muted); width: 100%; text-align: center; margin-top: 8px; }

/* ============ Back to top ============ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 700;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
  .services-grid, .products-grid { grid-template-columns: repeat(2, 1fr); }
  .about-values { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(320px, 82vw);
    height: calc(100vh - var(--header-h));
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 28px 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: var(--shadow-lg);
    z-index: 850;
    overflow-y: auto;
  }

  .main-nav.open { transform: translateX(0); }

  .nav-link { padding: 14px 16px; font-size: 1.05rem; border-radius: var(--radius-sm); }

  .nav-cta { margin: 12px 0 0; text-align: center; }

  .nav-toggle { display: flex; }

  section { padding: 72px 0; }

  .hero { padding: calc(var(--header-h) + 48px) 0 64px; }
}

@media (max-width: 640px) {
  .services-grid, .products-grid { grid-template-columns: 1fr; }
  .about-values { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .contact-form { padding: 26px; }
  .back-to-top { bottom: 18px; right: 18px; }
}
