/* =========================================================
   Qsas Technical Proposal — interactive site
   Bhr Solutions
   Brand colors:
     space-cadet: #2b2d4c    teal: #1ea3a6
     violet: #604CC3         mint: #CBE8E0
     white-smoke: #E3E2E2    clear: #FCFBFB
   ========================================================= */

:root {
  --cadet: #2b2d4c;
  --cadet-2: #3a3d6b;
  --teal: #1ea3a6;
  --teal-dark: #15858a;
  --violet: #604CC3;
  --mint: #CBE8E0;
  --white-smoke: #E3E2E2;
  --clear: #FCFBFB;
  --ink: #16172a;
  --ink-2: #4a4c63;
  --muted: #6c6e85;
  --line: #e6e7ee;

  --maxw: 1180px;
  --pad: clamp(1rem, 3vw, 2.25rem);
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20,20,40,.04), 0 2px 4px rgba(20,20,40,.04);
  --shadow-md: 0 6px 24px -8px rgba(43,45,76,.18);
  --shadow-lg: 0 24px 60px -22px rgba(43,45,76,.30);

  --ff-display: 'Changa', 'Inter', system-ui, sans-serif;
  --ff-body: 'Inter', 'Calibri', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--clear);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--teal); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--teal-dark); }

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

h1, h2, h3, h4 { font-family: var(--ff-display); color: var(--cadet); margin: 0 0 .5em; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; margin-top: 1.2em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---------------- progress bar ---------------- */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--violet));
  z-index: 1001;
  transition: width .1s linear;
}

/* ---------------- top nav ---------------- */
.topnav {
  position: sticky; top: 0; left: 0; right: 0;
  background: rgba(252, 251, 251, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.topnav.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.topnav__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: .85rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand { display: flex; align-items: center; gap: .75rem; }
.brand__logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
.brand__divider { width: 1px; height: 22px; background: var(--line); }
.brand__title { font-family: var(--ff-display); font-weight: 600; color: var(--cadet); font-size: .95rem; }

@media (max-width: 480px) {
  .brand__logo { height: 26px; }
}

.primary-nav { display: flex; gap: .25rem; }
.primary-nav a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: .92rem;
  padding: .5rem .85rem;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.primary-nav a:hover, .primary-nav a.is-active {
  color: var(--cadet);
  background: var(--mint);
}

.hamburger {
  display: none;
  width: 42px; height: 42px;
  background: transparent; border: 0; cursor: pointer; padding: 0;
  border-radius: 8px;
}
.hamburger span {
  display: block; height: 2px; width: 22px; margin: 4px auto;
  background: var(--cadet); border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer {
  position: fixed; top: 64px; right: 0;
  width: min(320px, 90vw);
  background: #fff; box-shadow: var(--shadow-lg);
  padding: 1rem; display: flex; flex-direction: column; gap: .25rem;
  border-radius: 14px 0 0 14px;
  transform: translateX(110%); transition: transform .3s ease;
  z-index: 999;
}
.drawer.is-open { transform: translateX(0); }
.drawer a {
  color: var(--cadet); font-weight: 500;
  padding: .7rem .9rem; border-radius: 10px;
}
.drawer a:hover { background: var(--mint); }

/* ---------------- hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 92vh;
  display: flex; align-items: center;
  background: linear-gradient(180deg, #fff 0%, var(--clear) 100%);
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .55;
  animation: float 12s ease-in-out infinite;
}
.blob--1 { width: 520px; height: 520px; background: var(--mint); top: -120px; right: -120px; }
.blob--2 { width: 420px; height: 420px; background: rgba(96,76,195,.18); bottom: -120px; left: -120px; animation-delay: 3s; }
.blob--3 { width: 320px; height: 320px; background: rgba(30,163,166,.18); top: 40%; left: 35%; animation-delay: 6s; }

@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.hero__inner {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: 5rem var(--pad) 4rem;
  width: 100%;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-display); font-weight: 600;
  color: var(--teal-dark);
  background: var(--mint);
  padding: .35rem .85rem; border-radius: 999px;
  font-size: .85rem; letter-spacing: .04em;
  text-transform: uppercase;
}
.hero__title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.05; letter-spacing: -.025em;
  margin: 1rem 0 1.25rem;
  color: var(--cadet);
}
.hero__title .accent {
  background: linear-gradient(120deg, var(--teal) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__title .muted { color: var(--ink-2); font-weight: 600; }

.hero__subtitle {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 0 2rem;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  color: var(--muted); font-size: .92rem;
  margin-bottom: 2.25rem;
}
.hero__meta strong { color: var(--cadet); }

.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .9rem 1.5rem;
  border-radius: 999px;
  font-family: var(--ff-display); font-weight: 600;
  font-size: .98rem;
  cursor: pointer; border: 0;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--primary {
  background: var(--cadet); color: #fff;
  box-shadow: 0 8px 24px -8px rgba(43,45,76,.5);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); background: #1f2140; }
.btn--ghost {
  background: transparent; color: var(--cadet);
  border: 1px solid var(--cadet);
}
.btn--ghost:hover { background: var(--cadet); color: #fff; }

.hero__scrolldown {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 44px; border: 2px solid var(--cadet);
  border-radius: 16px;
  display: flex; justify-content: center; padding-top: 6px;
}
.hero__scrolldown span {
  width: 4px; height: 8px; background: var(--cadet); border-radius: 2px;
  animation: scroll-cue 1.6s ease-in-out infinite;
}
@keyframes scroll-cue {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------------- sections ---------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--alt { background: linear-gradient(180deg, #fff, var(--clear)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--dark { background: var(--cadet); color: #fff; }
.section--dark .section__title { color: #fff; }
.section--dark a { color: var(--mint); }

.section__head {
  display: flex; align-items: baseline; gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.section__head--center { justify-content: center; text-align: center; }
.section__num {
  font-family: var(--ff-display); font-weight: 700;
  color: var(--teal);
  font-size: 1.05rem;
  background: var(--mint);
  padding: .25rem .7rem;
  border-radius: 999px;
}
.section__title { margin: 0; }
.section__intro { font-size: 1.05rem; color: var(--ink-2); max-width: 820px; margin: 0 0 2rem; }
.subsection {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  margin-top: 2.5rem; margin-bottom: 1rem;
  color: var(--cadet);
  display: inline-block; padding-bottom: .35rem;
  border-bottom: 3px solid var(--teal);
}

.prose p { color: var(--ink-2); margin: 0 0 1.1em; max-width: 78ch; }
.prose .lead { color: var(--cadet); font-size: 1.15rem; font-weight: 500; }
.prose strong { color: var(--cadet); }

/* ---------------- scope cards ---------------- */
.scope-grid { display: grid; gap: 1rem; }
.scope-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.scope-card:hover { box-shadow: var(--shadow-md); border-color: #d0d4e0; }
.scope-card[open] { box-shadow: var(--shadow-md); }
.scope-card summary {
  list-style: none; cursor: pointer;
  padding: 1.15rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--ff-display); font-weight: 600;
  color: var(--cadet);
  user-select: none;
}
.scope-card summary::-webkit-details-marker { display: none; }
.scope-card__num {
  font-size: .85rem;
  background: var(--cadet);
  color: #fff;
  padding: .25rem .55rem;
  border-radius: 6px;
  letter-spacing: .04em;
}
.scope-card__title { flex: 1; font-size: 1.08rem; }
.scope-card__chev {
  width: 12px; height: 12px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.scope-card[open] .scope-card__chev { transform: rotate(-135deg); }

.scope-card__body {
  padding: 0 1.25rem 1.5rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  margin-top: -1px;
  animation: cardOpen .3s ease both;
}
.scope-card__body h4 { color: var(--cadet); margin-top: 1.4em; }
.scope-card__body p { margin: 0 0 .9em; max-width: 78ch; }
.scope-card__body strong { color: var(--cadet); }
.scope-card__body code {
  background: var(--mint); color: var(--cadet);
  padding: 0 .35rem; border-radius: 5px;
  font-size: .92em;
}

@keyframes cardOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* lists with custom bullets */
.bullets { list-style: none; padding-left: 0; margin: 0 0 1em; }
.bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .55rem;
  color: var(--ink-2);
}
.bullets li::before {
  content: "";
  position: absolute; left: 0; top: .65em;
  width: 8px; height: 8px;
  background: var(--teal);
  transform: rotate(45deg);
  border-radius: 1px;
}

/* chips */
.chip-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.chip {
  background: var(--mint);
  color: var(--cadet);
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .92rem; font-weight: 500;
  border: 1px solid transparent;
  transition: all .2s ease;
}
.chip:hover { border-color: var(--teal); transform: translateY(-1px); }
.chip--lg { padding: .8rem 1.4rem; font-size: 1rem; }

/* metrics */
.metrics {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 1.5rem 0 2rem;
}
.metric {
  background: linear-gradient(135deg, var(--cadet) 0%, var(--cadet-2) 100%);
  color: #fff;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  position: relative; overflow: hidden;
}
.metric::after {
  content: ""; position: absolute; top: -50%; right: -30%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,163,166,.4) 0%, transparent 70%);
}
.metric__num {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.6rem;
  position: relative; z-index: 1;
}
.metric__label { font-size: .82rem; color: var(--mint); margin-top: .25rem; position: relative; z-index: 1; }

/* tech layers */
.tech-layers {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 1.5rem 0 1.5rem;
}
.layer {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative; overflow: hidden;
}
.layer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--violet));
}
.layer__num {
  font-family: var(--ff-display); font-weight: 700; color: var(--teal);
  font-size: .9rem;
}
.layer__title {
  font-family: var(--ff-display); font-weight: 700;
  color: var(--cadet); font-size: 1.15rem;
  margin: .25rem 0 .5rem;
}
.layer__text { color: var(--ink-2); font-size: .95rem; }

/* tech stack cards */
.tech-stack {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.stack-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.stack-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stack-card__head {
  background: var(--cadet); color: #fff;
  padding: 1rem 1.25rem;
}
.stack-card__head h4 { color: #fff; margin: 0; font-size: 1.05rem; }
.stack-card__items {
  list-style: none; margin: 0; padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.stack-card__items li {
  padding: .35rem 0;
  color: var(--ink-2);
  position: relative; padding-left: 1.4rem;
  font-size: .95rem;
}
.stack-card__items li::before {
  content: "▸"; position: absolute; left: 0;
  color: var(--teal); font-weight: 700;
}
.stack-card__why {
  padding: 1rem 1.25rem;
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
  background: var(--clear);
}

/* deliverables */
.delivery-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.delivery-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
.delivery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.delivery-card__pill {
  display: inline-block;
  background: var(--violet); color: #fff;
  font-family: var(--ff-display); font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .85rem;
  margin-bottom: .5rem;
}
.delivery-card h3 { margin: .25rem 0 1rem; color: var(--cadet); }
.delivery-card ul { padding-left: 1.2rem; margin: 0; color: var(--ink-2); }
.delivery-card ul li { margin-bottom: .4rem; }
.delivery-card p { color: var(--ink-2); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 1rem 0 1.5rem; }
.data-table {
  width: 100%; border-collapse: collapse;
  background: #fff;
  font-size: .94rem;
}
.data-table thead th {
  background: var(--cadet); color: #fff;
  text-align: left;
  padding: .85rem 1rem;
  font-family: var(--ff-display); font-weight: 600;
  font-size: .92rem;
}
.data-table tbody td {
  padding: .8rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}
.data-table tbody tr:nth-child(even) { background: var(--clear); }

/* gantt */
.callout {
  background: linear-gradient(135deg, var(--mint) 0%, rgba(203,232,224,.4) 100%);
  border-left: 4px solid var(--teal);
  padding: 1.1rem 1.3rem;
  border-radius: 8px;
  margin: 1rem 0 1.5rem;
  color: var(--ink);
  line-height: 1.55;
}
.gantt-wrap { overflow-x: auto; margin: 1.5rem 0; }
.gantt {
  width: 100%; border-collapse: collapse;
  table-layout: fixed; min-width: 720px;
  font-size: .95rem;
}
.gantt thead th {
  background: var(--cadet); color: #fff;
  font-family: var(--ff-display); font-weight: 600;
  text-align: center;
  padding: .85rem .5rem;
  font-size: .92rem;
}
.gantt thead th:first-child { text-align: left; padding-left: 1rem; }
.gantt tbody td {
  border: 1px solid var(--line);
  padding: .8rem .65rem;
  background: #fff;
  height: 50px;
}
.gantt tbody td:first-child { font-weight: 500; color: var(--cadet); padding-left: 1rem; width: 40%; }
.gantt tbody td.on {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  position: relative;
}
.gantt tbody td.on::after {
  content: ""; position: absolute; inset: 8px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
}

/* severity */
.severity { display: grid; gap: .65rem; margin: 1rem 0 1.5rem; }
.sev {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  color: var(--ink-2);
}
.sev__tag {
  display: inline-block;
  font-family: var(--ff-display); font-weight: 700;
  padding: .15rem .6rem; border-radius: 6px;
  margin-right: .75rem;
  font-size: .82rem;
}
.sev--1 { border-left-color: #d62b4e; }
.sev--1 .sev__tag { background: #fce5ec; color: #d62b4e; }
.sev--2 { border-left-color: #f08c1c; }
.sev--2 .sev__tag { background: #fff0db; color: #b6680f; }
.sev--3 { border-left-color: var(--teal); }
.sev--3 .sev__tag { background: var(--mint); color: var(--teal-dark); }
.sev--4 { border-left-color: var(--violet); }
.sev--4 .sev__tag { background: rgba(96,76,195,.12); color: var(--violet); }

.note { color: var(--muted); font-size: .92rem; font-style: italic; }

/* contact */
.contact-lead {
  text-align: center; max-width: 720px; margin: 0 auto 2.5rem;
  color: rgba(255,255,255,.85); font-size: 1.08rem;
}
.contact-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 900px; margin: 0 auto;
}
.contact-item {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.contact-item:is(a):hover {
  background: rgba(255,255,255,.1);
  border-color: var(--teal);
  transform: translateY(-2px);
  color: #fff;
}
.contact-item__label {
  font-family: var(--ff-display); font-weight: 600;
  color: var(--mint);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.contact-item__value { margin-top: .35rem; font-size: 1.05rem; }
.contact-meta { text-align: center; color: rgba(255,255,255,.55); margin-top: 2rem; font-size: .9rem; }

/* footer */
.footer {
  background: #1a1b30;
  color: rgba(255,255,255,.7);
  padding: 1.5rem 0;
  font-size: .9rem;
}
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer__links a { color: var(--mint); }
.footer__links a:hover { color: #fff; }

/* back to top */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  background: var(--cadet); color: #fff;
  border: 0; border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem; font-weight: 700;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(20px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 100;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--teal); }

/* -------- responsive -------- */
@media (max-width: 860px) {
  .primary-nav { display: none; }
  .hamburger { display: block; }
  .brand__title { display: none; }
  .hero__title { font-size: clamp(2rem, 9vw, 3rem); }
  .hero__meta { gap: .75rem; }
  .scope-card summary { padding: 1rem; gap: .75rem; }
  .scope-card__title { font-size: 1rem; }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 520px) {
  .hero { min-height: 88vh; }
  .hero__inner { padding-top: 3rem; padding-bottom: 3rem; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .section { padding: 3rem 0; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* print */
@media print {
  .topnav, .hamburger, .drawer, .back-to-top, .progress-bar, .hero__scrolldown { display: none !important; }
  .hero { min-height: auto; }
  .scope-card { break-inside: avoid; }
}
