/* Competitive Intelligence — a PrimeLayer build. Field briefing terminal. Dark navy + amber + mono. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/spacegrotesk-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/plexmono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #0a0f1c;
  --panel: #111826;
  --elevated: #16202f;
  --steel: #c7d2e0;
  --muted: #7c8aa0;
  --amber: #f5a623;
  --amber-dim: rgba(245, 166, 35, .14);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, .12);
  --red: #fb7185;
  --red-dim: rgba(251, 113, 133, .12);
  --hair: rgba(255, 255, 255, .08);
  --hair-2: rgba(255, 255, 255, .04);

  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --glow: 0 0 0 1px var(--hair), 0 18px 44px rgba(0, 0, 0, .5);
}

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

body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(245, 166, 35, .07), transparent 60%),
    radial-gradient(900px 560px at -6% 8%, rgba(52, 211, 153, .05), transparent 55%),
    var(--ink);
  background-attachment: fixed;
  color: var(--steel);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  /* breathing room beneath the auto-injected navy PrimeLayer nav bar */
  padding-top: 14px;
}

::selection { background: rgba(245, 166, 35, .28); color: #fff; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 26px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(22, 32, 47, .9), rgba(17, 24, 38, .9));
  max-width: 1080px;
  margin: 0 auto 6px;
  backdrop-filter: blur(6px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #eef3fa;
}
.brand .logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(145deg, var(--amber), #ffcf6b);
  box-shadow: 0 0 18px rgba(245, 166, 35, .35);
}
.brand .sub {
  font-family: var(--mono);
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding-left: 11px;
  border-left: 1px solid var(--hair);
}
.topbar .spacer { flex: 1; }
.topbar .badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--steel);
  border: 1px solid var(--hair);
  background: var(--hair-2);
  padding: 5px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: .04em;
}
.topbar .badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- layout ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 26px 80px;
}

.hero { margin-bottom: 22px; }
.hero-code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.hero-code::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}
.hero h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #f2f6fb;
}
.hero p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 680px;
}

/* ---------- cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), #0e1420);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  padding: 24px;
}
.input-card { overflow: hidden; }
.input-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: .7;
}

/* ---------- inputs ---------- */
.field { margin-bottom: 15px; }
.field label,
.notes-head label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 7px;
}
.field .opt, .notes-head .opt {
  color: rgba(124, 138, 160, .7);
  text-transform: none;
  letter-spacing: 0;
}
.field input, textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--steel);
  background: var(--ink);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, textarea::placeholder { color: rgba(124, 138, 160, .55); }
.field input:focus, textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
textarea {
  min-height: 168px;
  resize: vertical;
  line-height: 1.6;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.notes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 6px;
  gap: 12px;
}
.notes-head label { margin-bottom: 0; }
.link-btn {
  background: none;
  border: none;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- actions ---------- */
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  cursor: pointer;
  background: linear-gradient(145deg, var(--amber), #ffc25a);
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  box-shadow: 0 8px 22px rgba(245, 166, 35, .22);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(245, 166, 35, .3); }
.btn.ghost {
  background: transparent;
  color: var(--steel);
  border: 1px solid var(--hair);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--amber); color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn .spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(10, 15, 28, .35);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hint {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .02em;
}

/* ---------- banner ---------- */
.banner {
  margin-top: 16px;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 13.5px;
  border: 1px solid var(--hair);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.banner.error {
  background: var(--red-dim);
  border-color: rgba(251, 113, 133, .4);
  color: var(--red);
}
.banner .i {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--red);
}

/* ---------- results ---------- */
#results { margin-top: 22px; display: none; }
#results.show { display: block; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.doc { padding: 32px 36px; }
@media (max-width: 620px) { .doc { padding: 22px 18px; } }

.doc-head {
  border-bottom: 1px solid var(--hair);
  padding-bottom: 18px;
  margin-bottom: 22px;
  position: relative;
}
.doc-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 90px; height: 2px;
  background: var(--amber);
}
.doc-head .eyebrow {
  font-family: var(--mono);
  color: var(--amber);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .18em;
}
.sample-tag {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  font-family: var(--mono);
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, .4);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.doc-head h2 {
  margin: 8px 0 0;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #f2f6fb;
}
.lead {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  color: var(--steel);
}

/* ---------- sections ---------- */
.sec { margin: 26px 0; }
.sec h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--muted);
  margin: 0 0 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec h3::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--amber);
  transform: rotate(45deg);
  flex: none;
}

/* ---------- lists ---------- */
ul.clean { list-style: none; margin: 0; padding: 0; }
ul.clean li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 14px;
  line-height: 1.55;
  border-bottom: 1px solid var(--hair-2);
  color: var(--steel);
}
ul.clean li:last-child { border-bottom: none; }
ul.clean li::before {
  content: "";
  position: absolute;
  left: 2px; top: 15px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
}
ul.gaps li { padding-left: 26px; }
ul.gaps li::before {
  content: "\25B8";
  background: none;
  color: var(--amber);
  font-size: 13px;
  top: 7px; left: 2px;
  width: auto; height: auto;
  border-radius: 0;
}

/* ---------- SWOT quadrants ---------- */
.swot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) { .swot { grid-template-columns: 1fr; } }
.quad {
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 15px 17px;
  background: var(--elevated);
  position: relative;
  overflow: hidden;
}
.quad::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.quad .q-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 10px;
}
.quad .q-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
}
.quad ul { list-style: none; margin: 0; padding: 0; }
.quad li {
  position: relative;
  padding: 7px 0 7px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  border-bottom: 1px solid var(--hair-2);
  color: var(--steel);
}
.quad li:last-child { border-bottom: none; }
.quad li::before {
  content: "";
  position: absolute;
  left: 1px; top: 13px;
  width: 5px; height: 5px;
  border-radius: 50%;
}

.quad.strengths::before { background: var(--green); }
.quad.strengths .q-head { color: var(--green); }
.quad.strengths .q-dot, .quad.strengths li::before { background: var(--green); }

.quad.weaknesses::before { background: var(--red); }
.quad.weaknesses .q-head { color: var(--red); }
.quad.weaknesses .q-dot, .quad.weaknesses li::before { background: var(--red); }

.quad.opportunities::before { background: var(--amber); }
.quad.opportunities .q-head { color: var(--amber); }
.quad.opportunities .q-dot, .quad.opportunities li::before { background: var(--amber); }

.quad.threats::before { background: var(--red); }
.quad.threats .q-head { color: var(--red); }
.quad.threats .q-dot, .quad.threats li::before { background: var(--red); }

/* ---------- battlecard ---------- */
.bc {
  border: 1px solid var(--hair);
  border-radius: 11px;
  overflow: hidden;
  background: var(--elevated);
  margin-bottom: 11px;
}
.bc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) { .bc-row { grid-template-columns: 1fr; } }
.bc-cell { padding: 13px 15px; }
.bc-cell.them {
  border-right: 1px solid var(--hair);
  background: var(--red-dim);
}
.bc-cell.you { background: var(--green-dim); }
@media (max-width: 640px) {
  .bc-cell.them { border-right: none; border-bottom: 1px solid var(--hair); }
}
.bc-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .14em;
  display: inline-block;
  margin-bottom: 6px;
}
.bc-cell.them .bc-tag { color: var(--red); }
.bc-cell.you .bc-tag { color: var(--green); }
.bc-cell .bc-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--steel);
}

/* ---------- wedge ---------- */
.wedge {
  border: 1px solid rgba(245, 166, 35, .35);
  background: linear-gradient(135deg, var(--amber-dim), rgba(245, 166, 35, .04));
  border-radius: 13px;
  padding: 17px 19px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 0 30px rgba(245, 166, 35, .1) inset;
}
.wedge .w-ico {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(145deg, var(--amber), #ffcf6b);
  box-shadow: 0 0 18px rgba(245, 166, 35, .4);
}
.wedge .w-body .w-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--amber);
  margin-bottom: 4px;
}
.wedge .w-body .w-text {
  font-size: 15px;
  line-height: 1.6;
  color: #f0f4fa;
}

/* ---------- footers ---------- */
.usage {
  margin-top: 22px;
  text-align: center;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}
.disclaimer {
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
  text-align: center;
}
.foot-note {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .03em;
  margin-top: 38px;
  text-align: center;
  line-height: 1.7;
}
