/* =========================================================
   FlexHub.ai — styles
   Dependency-free. System font stack, CSS custom properties.
   ========================================================= */

:root {
  --ink: #17181c;          /* brand ink */
  --bg: #0e0f12;
  --bg-alt: #141519;
  --surface: #1a1c22;
  --surface-2: #20222b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f1f2f5;
  --muted: #a3a6b2;
  --faint: #73767f;

  --brand: #4250ee;        /* primary — filled buttons */
  --brand-2: #8e97ff;      /* accent on dark — links, eyebrow, .ai */
  --accent: #8e97ff;       /* focus rings, form success */
  --grad: linear-gradient(120deg, #6d79ff 0%, #a6abff 100%);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);

  --font: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-2);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--brand);
  background-image: linear-gradient(120deg, #4f5cf2, #4250ee);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(66, 80, 238, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(66, 80, 238, 0.85); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--brand); color: #fff; background: rgba(109,139,255,0.08); }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 23, 0.72);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 13, 23, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.04em;
}
.brand-dot { color: var(--brand-2); }
.brand-mark { border-radius: 8px; }

.nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a:not(.btn) {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav-menu a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.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); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 720px;
  background:
    radial-gradient(40% 50% at 20% 10%, rgba(66, 80, 238, 0.32), transparent 70%),
    radial-gradient(38% 50% at 85% 0%, rgba(142, 151, 255, 0.22), transparent 70%),
    radial-gradient(30% 40% at 60% 30%, rgba(110, 121, 255, 0.16), transparent 70%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero-title {
  font-size: clamp(2.2rem, 5.4vw, 3.85rem);
  font-weight: 800;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--faint);
  font-size: 0.92rem;
}
.hero-trust li { position: relative; padding-left: 22px; }
.hero-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--grad);
}

/* ---------- Logos strip ---------- */
.logos {
  border-block: 1px solid var(--border);
  padding: 34px 0;
  background: var(--bg-alt);
}
.logos-label {
  text-align: center;
  color: var(--faint);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.logos-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem;
  opacity: 0.85;
}

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; margin-bottom: 16px; }
.section-lede { color: var(--muted); font-size: 1.1rem; }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.3rem;
  background: rgba(66, 80, 238, 0.16);
  color: var(--brand-2);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}
.step-num {
  display: inline-block;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: transparent;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.stat {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.stat-label { color: var(--muted); font-size: 0.92rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.about-copy { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; }
.about-grid .btn { margin-top: 8px; }
.about-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.about-points li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: var(--muted);
}
.about-points strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-direct {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.contact-direct li { display: grid; gap: 2px; }
.contact-direct-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.contact-direct a { color: var(--brand-2); font-weight: 600; }
.contact-direct a:hover { text-decoration: underline; }

.contact-form {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.optional { color: var(--faint); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(66, 80, 238, 0.28);
}
.field textarea { resize: vertical; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #ff6b81;
  box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.18);
}
.form-status {
  margin-top: 14px;
  font-size: 0.92rem;
  min-height: 1.2em;
  color: var(--accent);
}
.form-status.error { color: #ff8a9b; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-top: 48px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 36px;
}
.footer-tag { color: var(--faint); margin-top: 10px; font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer-nav a { color: var(--muted); font-size: 0.95rem; transition: color 0.15s ease; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 24px;
  color: var(--faint);
  font-size: 0.88rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 22px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-menu li { padding: 6px 0; }
  .nav-cta { margin-top: 8px; }
  .nav-cta .btn { width: 100%; }
  .hero { padding: 64px 0 60px; }
  .section { padding: 64px 0; }
}

@media (max-width: 520px) {
  .cards, .steps, .stats { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}
