/* ============================================================
   Agent Team Builder — Showcase design system
   Delad av index.html och alla företagssidor.
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface-2: #1a1a24;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-dim: #9a9ab5;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --accent-2: #818cf8;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --cyan: #22d3ee;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(800px circle at 15% -5%, rgba(99,102,241,0.10), transparent 60%),
    radial-gradient(700px circle at 90% 8%, rgba(34,211,238,0.06), transparent 55%);
}
a { color: inherit; }

.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
section { padding: clamp(60px, 8vw, 120px) 0; position: relative; z-index: 1; }

/* ---------- shared headings ---------- */
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-2);
  display: flex; align-items: center; gap: 9px; margin-bottom: 18px;
}
.eyebrow.center { justify-content: center; }
.step-num {
  font-variant-numeric: tabular-nums; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 1px 8px; font-size: 12px; letter-spacing: 0.04em;
}
h2.section-title {
  font-size: clamp(28px, 4vw, 44px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 14px;
}
.section-lead { color: var(--text-dim); font-size: clamp(16px, 1.6vw, 18px); max-width: 620px; }
.section-head.center { text-align: center; }
.section-head.center .section-lead { margin-left: auto; margin-right: auto; }

.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: blink 2s infinite;
}
@keyframes blink {
  0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); opacity: 0.7; }
}

/* ---------- top progress nav (per-company) ---------- */
.stepnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,15,0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.stepnav .inner {
  max-width: 1080px; margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.stepnav .home { font-weight: 700; font-size: 14px; margin-right: auto; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.stepnav a.step {
  font-size: 12.5px; color: var(--text-dim); text-decoration: none;
  padding: 5px 11px; border-radius: 100px; border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.stepnav a.step:hover { color: var(--text); border-color: var(--border); background: var(--surface); }
@media (max-width: 720px) { .stepnav a.step { display: none; } }

/* ---------- HERO ---------- */
.hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 80px; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 100px; font-size: 13px;
  font-weight: 600; color: var(--text-dim); width: fit-content;
  opacity: 0; animation: fadeUp 0.7s 0.05s ease forwards; text-decoration: none;
}
.hero h1 {
  font-size: clamp(40px, 7.5vw, 84px); font-weight: 900; letter-spacing: -0.035em;
  line-height: 0.99; margin: 26px 0 0; opacity: 0; animation: fadeUp 0.8s 0.15s ease forwards;
}
.grad {
  background: linear-gradient(110deg, var(--accent-2) 0%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: clamp(17px, 2vw, 21px); color: var(--text-dim); max-width: 660px;
  margin-top: 24px; opacity: 0; animation: fadeUp 0.8s 0.3s ease forwards;
}
.meta-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; opacity: 0; animation: fadeUp 0.8s 0.4s ease forwards; }
.meta-pill {
  font-size: 13px; color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--border); padding: 6px 13px; border-radius: 100px;
}
.meta-pill b { color: var(--text); font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 46px; opacity: 0; animation: fadeUp 0.8s 0.5s ease forwards; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 28px; min-width: 150px; flex: 1; }
.stat .num {
  font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fff, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat .lbl { color: var(--text-dim); font-size: 14px; font-weight: 500; margin-top: 4px; }
.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; color: var(--text-dim); font-size: 24px; opacity: 0;
  animation: fadeUp 1s 0.9s ease forwards, float 2.2s 1.5s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,10px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- STEP 1: INTAKE — quotes ---------- */
.quotes { display: grid; gap: 18px; margin-top: 44px; }
.quote {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0; padding: 24px 28px; font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.55; color: var(--text);
}
.quote .who { display: block; margin-top: 12px; font-size: 13px; color: var(--text-dim); font-style: normal; }
.quote.pain { border-left-color: var(--amber); }

/* ---------- STEP 2: RESEARCH — moment list ---------- */
.moments { display: grid; gap: 12px; margin-top: 40px; }
.moment {
  display: flex; align-items: center; gap: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px;
}
.moment .mtxt { flex: 1; }
.moment .mname { font-weight: 600; font-size: 15px; }
.moment .mmeta { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.fit { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 7px; white-space: nowrap; }
.fit.high { background: rgba(52,211,153,0.14); color: var(--green); }
.fit.med { background: rgba(251,191,36,0.14); color: var(--amber); }
.fit.low { background: rgba(248,113,113,0.14); color: var(--red); }
.clusters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; margin-top: 30px; }
.cluster { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.cluster .ct { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.cluster .cp { font-size: 12px; color: var(--accent-2); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 10px; }
.cluster .cd { font-size: 13.5px; color: var(--text-dim); }

/* ---------- STEP 3: SCALING — decision callout ---------- */
.decision {
  margin-top: 40px; background: linear-gradient(135deg, rgba(99,102,241,0.10), rgba(34,211,238,0.05));
  border: 1px solid rgba(99,102,241,0.35); border-radius: 20px; padding: clamp(28px, 4vw, 44px);
}
.decision .big { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.decision .big b { color: var(--accent-2); }
.decision p { color: var(--text-dim); margin-top: 16px; font-size: 16px; max-width: 640px; }
.scale-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.scale-chip { font-size: 13px; background: var(--surface); border: 1px solid var(--border); padding: 7px 14px; border-radius: 100px; }
.scale-chip b { color: var(--text); }

/* ---------- STEP 4: TEAM — org graph + cards ---------- */
.org { display: flex; flex-direction: column; align-items: center; margin-top: 50px; }
.org-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.connector { width: 2px; height: 36px; background: linear-gradient(var(--border), transparent); }
.connector.solid { background: linear-gradient(var(--accent), var(--border)); }
.node { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; text-align: center; min-width: 200px; max-width: 250px; transition: transform 0.25s, box-shadow 0.25s; }
.node:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.7); }
.node .role { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.node .nm { font-weight: 700; font-size: 16px; margin: 6px 0 5px; }
.node .jb { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.node.ceo { border-color: rgba(99,102,241,0.5); box-shadow: 0 0 30px -10px var(--accent-glow); }
.node.ceo .role { color: var(--accent-2); }
.node.cos { border-color: rgba(34,211,238,0.4); }
.node.cos .role { color: var(--cyan); }
.node.spec .role { color: var(--green); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; margin-top: 48px; }
.card { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: 20px; padding: 28px; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--cyan)); opacity: 0.55; }
.card.is-ceo::before { background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 1; }
.card.is-cos::before { background: linear-gradient(90deg, var(--cyan), var(--accent-2)); opacity: 0.9; }
.card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.icon { font-size: 26px; width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; margin-top: 5px; display: inline-block; }
.tag.always { background: rgba(99,102,241,0.15); color: var(--accent-2); }
.tag.special { background: rgba(52,211,153,0.13); color: var(--green); }
.job { color: var(--text); font-size: 14.5px; margin-bottom: 18px; }
.meta-label { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim); margin: 16px 0 9px; }
.caps { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.caps li { font-size: 13.5px; color: var(--text-dim); padding-left: 20px; position: relative; line-height: 1.5; }
.caps li::before { content: '▸'; position: absolute; left: 0; color: var(--accent-2); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-size: 12.5px; font-style: italic; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 100px; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; }
.skbadge { font-size: 12px; font-weight: 600; color: var(--cyan); background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.3); padding: 4px 11px; border-radius: 7px; }

/* ---------- REJECTED ---------- */
.rejected-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 42px; }
.rej { background: var(--surface); border: 1px dashed var(--border); border-radius: 16px; padding: 24px; }
.rej .rn { font-weight: 700; font-size: 16px; text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; margin-bottom: 10px; color: var(--text-dim); }
.rej .rm { font-size: 14px; color: var(--text-dim); line-height: 1.55; }

/* ---------- MEETINGS ---------- */
.meet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 46px; }
.meet { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: 18px; padding: 28px; transition: transform 0.25s, border-color 0.25s; }
.meet:hover { transform: translateY(-4px); border-color: var(--accent); }
.meet .mi { font-size: 30px; margin-bottom: 14px; }
.meet h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.meet p { font-size: 14px; color: var(--text-dim); }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--border); padding: 56px 0 70px; text-align: center; }
footer .built { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; margin-bottom: 14px; }
footer .fstats { color: var(--text-dim); font-size: 14px; }
footer .fstats b { color: var(--text); }
footer .try-live {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 26px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 15px; padding: 14px 26px; border-radius: 12px;
  transition: transform 0.15s, box-shadow 0.2s;
}
footer .try-live:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -16px var(--accent-glow); }
footer .backlink { display: block; margin-top: 22px; font-size: 14px; color: var(--accent-2); text-decoration: none; }
footer .backlink:hover { text-decoration: underline; }
.hyp-warn { margin-top: 16px; font-size: 13px; color: var(--amber); }

/* ---------- INDEX / GALLERY ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-top: 52px; }
.gcard {
  display: block; text-decoration: none; background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: 20px; padding: 28px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.gcard:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 24px 50px -28px var(--accent-glow); }
.gcard.soon { opacity: 0.55; pointer-events: none; }
.gcard .gtop { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.gcard .gicon { font-size: 22px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.gcard h3 { font-size: 20px; font-weight: 700; }
.gcard .gsub { font-size: 13px; color: var(--text-dim); }
.gcard .gdesc { font-size: 14px; color: var(--text-dim); line-height: 1.55; margin-bottom: 18px; }
.gcard .gmeta { display: flex; flex-wrap: wrap; gap: 8px; }
.gtag { font-size: 11.5px; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 100px; }
.gtag.mode { color: var(--accent-2); border-color: rgba(99,102,241,0.3); }
.gcard .go { margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--accent-2); }
.soonflag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber); }

.mode-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
@media (max-width: 720px) { .mode-split { grid-template-columns: 1fr; } }
.mode-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.mode-box h3 { font-size: 19px; margin-bottom: 6px; }
.mode-box .mtag { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); }
.mode-box p { font-size: 14px; color: var(--text-dim); margin-top: 12px; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

@media (max-width: 640px) { .stat, .node { min-width: 100%; } }

/* ---------- a11y: synlig tangentbordsfokus ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- respektera reducerad rörelse ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
