/* ===================== TOKENS ===================== */
:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --card-border: rgba(255, 255, 255, 0.08);
  --red: #e5392d;
  /* Lightened red reserved for text on dark backgrounds — #e5392d only clears
     4.6:1, which leaves no margin at small sizes. This clears 7:1. */
  --red-text: #ff6b60;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.6);
  --maxw: 1240px;
  --radius: 20px;
  --header-h: 85px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Anchor targets must clear the sticky header. */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 48px;
}

.section { position: relative; padding: 110px 0; }

/* ===================== ACCESSIBILITY ===================== */
:focus-visible {
  outline: 2px solid var(--red-text);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Buttons and cards on light surfaces need a dark ring instead. */
.contact-form :focus-visible {
  outline-color: var(--red);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  background: var(--red);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 10px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Gradient-clipped text collapses to invisible in forced-colors mode. */
@media (forced-colors: active) {
  .hero-title {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: CanvasText;
  }
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 16px;
  border-radius: 12px;
  padding: 13px 26px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 24px rgba(229, 57, 45, 0.35);
}
.btn-primary:hover {
  background: #f0473b;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(229, 57, 45, 0.5);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand img { height: 30px; width: auto; }
.nav-pill {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
}
.nav-pill a {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}
.nav-pill a:hover { color: var(--red-text); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-cta { padding: 10px 22px; }

/* --- Hamburger --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Drawer ---
   Absolutely positioned so opening it overlays the page instead of growing
   the sticky header and shoving all the content down. */
.nav-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  /* Opaque, not translucent: at 0.96 the hero headline ghosted through and
     made the menu labels hard to read. */
  background: #0d0d0d;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}
.nav-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 22px 24px;
}
.nav-drawer-inner a {
  font-size: 17px;
  padding: 13px 4px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-drawer-inner a:hover { color: var(--red-text); }
.nav-drawer-cta {
  margin-top: 16px;
  border-bottom: none !important;
  color: #fff !important;
}
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.5);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  text-align: center;
  /* padding-top also sets where the headline sits relative to .hero-diamond.
     At 240px the headline centres on the diamond; raising it lifts the text
     off-centre again. The 80px bottom keeps the trust strip from falling
     below the fold on a ~800px-tall laptop viewport. */
  padding: 240px 0 80px;
  overflow: hidden;
}
/* Engineered-feeling texture. Masked so the lines dissolve toward every edge
   instead of stopping on a hard seam. */
/* The grid itself is static — it is the board. The motion is the light
   pulses running along its lines (.trace). */
.hero-grid {
  --cell: 64px;
  --travel-y: 820px;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.085) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  /* Masks the traces too, so they fade out at the edges with the grid. */
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 45%, #000 15%, transparent 78%);
  mask-image: radial-gradient(ellipse 65% 60% at 50% 45%, #000 15%, transparent 78%);
}

/* Offsets are multiples of --cell so every pulse rides an actual grid line. */
.trace {
  position: absolute;
  opacity: 0;
  /* drop-shadow (not box-shadow) so the halo follows the gradient's falloff
     and reads as a travelling light, not a glowing rectangle. */
  filter: drop-shadow(0 0 6px rgba(255, 90, 80, 0.75));
}
.trace-h1, .trace-h2 { height: 2px; width: 260px; }
.trace-v1, .trace-v2 { width: 2px; height: 260px; }

.trace-h1, .trace-h2 {
  background: linear-gradient(90deg, transparent, rgba(255, 150, 140, 1) 55%, transparent);
}
.trace-v1, .trace-v2 {
  background: linear-gradient(180deg, transparent, rgba(255, 150, 140, 0.9) 55%, transparent);
}

.trace-h1 {
  top: calc(var(--cell) * 3); left: -260px;
  animation: traceRight 6s linear infinite;
}
.trace-h2 {
  top: calc(var(--cell) * 7); right: -260px;
  animation: traceLeft 8s linear infinite 2.5s;
}
.trace-v1 {
  left: calc(var(--cell) * 5); top: -260px;
  animation: traceDown 7s linear infinite 1.2s;
}
.trace-v2 {
  left: calc(var(--cell) * 16); top: -260px;
  animation: traceDown 9s linear infinite 3.8s;
}

/* Fade in/out at the ends so pulses never pop at the mask boundary. */
@keyframes traceRight {
  0%   { transform: translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(calc(100vw + 260px)); opacity: 0; }
}
@keyframes traceLeft {
  0%   { transform: translateX(0); opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(calc(-100vw - 260px)); opacity: 0; }
}
@keyframes traceDown {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(var(--travel-y)); opacity: 0; }
}

.hero-glow {
  position: absolute;
  /* Was -120px, which pushed the haze into the header. Now centred on the
     headline alongside .hero-diamond. */
  top: 60px; left: 50%;
  transform: translateX(-50%);
  width: 560px; height: 380px;
  background: radial-gradient(ellipse at center, rgba(229, 57, 45, 0.18) 0%, transparent 65%);
  filter: blur(30px);
  z-index: 0;
  /* ease-in-out, NOT var(--ease). --ease is cubic-bezier(.22,1,.36,1), an
     ease-out built for one-shot transitions — on a loop it snaps to the end
     value in the first ~25% and then sits still, which reads as no motion. */
  animation: heroGlowBreathe 7s ease-in-out infinite;
}

/* Must restate translateX(-50%) — it is the element's centring transform,
   not a starting offset. Amplitude is deliberately calmer than the traces:
   this is ambient depth, they are the actual motion. */
@keyframes heroGlowBreathe {
  0%, 100% { transform: translateX(-50%) scale(0.96); opacity: 0.6; }
  50%      { transform: translateX(-50%) scale(1.18); opacity: 1; }
}
/* Real Figma vector: red diamond glow behind the heading.
   `top` is tuned so the apex clears the sticky header — at 620px wide the
   artwork is ~412px tall, so anything under ~100px crowds the navbar. */
.hero-diamond {
  position: absolute;
  top: 118px; left: 50%;
  width: 620px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -1px;
  background: linear-gradient(91deg, #ffbcb7 0%, #ff5348 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 26px auto 38px;
  font-size: 22px;
  color: var(--muted);
  font-weight: 300;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ===================== SHARED SECTION HEADINGS ===================== */
.eyebrow {
  color: var(--red-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

/* ===================== SOLUTION ===================== */
.solution { background: var(--bg); }
.solution-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: flex-end;
  margin-bottom: 70px;
}
.solution-lead {
  color: var(--muted);
  font-size: 16px;
  font-weight: 300;
}
/* 6-column base so the orphan row of 2 can be centred instead of left-ragged. */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 40px 56px;
}
.service { grid-column: span 2; }
.service:nth-last-child(2) { grid-column: 2 / span 2; }
.service:last-child { grid-column: 4 / span 2; }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(229, 57, 45, 0.12);
  color: var(--red-text);
  margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; }
.service h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 14.5px; font-weight: 300; }

/* ===================== VISION ===================== */
.vision { background: var(--bg); padding: 40px 0 110px; }
.vision-card {
  background: linear-gradient(180deg, #141312, #0e0d0d);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 72px 90px;
  text-align: center;
}
.vision-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-text);
  margin-bottom: 26px;
}
.vision-statement {
  font-size: 28px;
  line-height: 1.45;
  font-weight: 500;
  color: #fff;
  max-width: 920px;
  margin: 0 auto;
}
.vision-attribution {
  margin-top: 28px;
  font-size: 15px;
  color: var(--muted);
}

/* ===================== CTA / CONTACT ===================== */
.cta {
  background: var(--bg-soft);
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  top: 0; right: 0;
  width: 60%; height: 100%;
  background:
    radial-gradient(circle at 75% 40%, rgba(229, 57, 45, 0.4), transparent 45%),
    radial-gradient(circle at 95% 70%, rgba(193, 40, 29, 0.35), transparent 45%);
  filter: blur(10px);
  z-index: 0;
}
.cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(380px, 460px);
  gap: 70px;
  align-items: start;
}
.cta-sub { color: var(--muted); margin: 18px 0 40px; font-weight: 300; max-width: 46ch; }
.contact-block .contact-heading { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.contact-line { color: var(--muted); font-size: 15px; }
.contact-line a:hover { color: var(--red-text); }

.socials, .footer-socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.social {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.social svg { width: 18px; height: 18px; }
.social:hover { background: var(--red); color: #fff; transform: translateY(-2px); }

/* --- Form --- */
.contact-form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 34px;
  backdrop-filter: blur(8px);
}
.form-heading { font-size: 19px; font-weight: 600; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}
.field .optional { color: var(--muted); font-weight: 300; }
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.35); }
.field input:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.28); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red-text);
  background: rgba(255, 255, 255, 0.07);
}
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--red-text); outline-offset: 1px; }

.form-submit { width: 100%; margin-top: 6px; }
.form-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  min-height: 1.4em;
}
.form-status.is-ok { color: #6ee7a8; }
.form-status.is-error { color: var(--red-text); }

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 56px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 60px;
  padding-bottom: 40px;
}
.footer-brand .brand { display: inline-block; margin-bottom: 20px; }
.footer-address {
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--red-text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.copyright { font-size: 13px; color: rgba(255, 255, 255, 0.45); }
.footer-socials { margin-top: 0; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .hero-title { font-size: 56px; }
  .section-title { font-size: 36px; }
  .nav-pill { display: none; }
  .nav-toggle { display: flex; }

  .solution-grid { grid-template-columns: repeat(4, 1fr); gap: 40px; }
  /* 5 items across 4 cols: reset the centring rules, centre the last one. */
  .service,
  .service:nth-last-child(2) { grid-column: span 2; }
  .service:last-child { grid-column: 2 / span 2; }

  .cta-inner { grid-template-columns: 1fr; gap: 44px; }
  .cta-sub { max-width: none; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .container { padding: 0 22px; }
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 56px; }
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 17px; }
  .hero-sub br, .hero-title br, .section-title br { display: none; }
  .hero-diamond { width: 360px; top: 78px; }
  /* --cell drives both the grid and every trace offset, so they stay aligned. */
  .hero-grid { --cell: 40px; --travel-y: 620px; }
  .trace-v2 { display: none; } /* its column sits off-screen on a phone */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .section-title { font-size: 30px; }

  .solution-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .solution-grid { grid-template-columns: 1fr; gap: 36px; }
  .service,
  .service:nth-last-child(2),
  .service:last-child { grid-column: 1 / -1; }

  .vision-card { padding: 44px 26px; }
  .vision-statement { font-size: 20px; }

  .contact-form { padding: 24px; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  /* Logo + CTA + hamburger runs edge-to-edge on a phone. The drawer already
     carries a Contact Us, so drop the header one. */
  .header-cta { display: none; }
}

@media (max-width: 420px) {
  .footer-nav { grid-template-columns: 1fr; }
}
