/* The IT Value Check — page styles. Brand tokens live in /assets/css/brand.css */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Decorative background ------------------------------------------------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 90% at 0% 100%, #0c1d45 0%, var(--midnight) 60%);
}
.bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.bg__glow--a {
  width: 46vw; height: 46vw;
  right: -12vw; top: -14vw;
  background: radial-gradient(circle, rgba(20, 196, 174, 0.55), transparent 65%);
}
.bg__glow--b {
  width: 40vw; height: 40vw;
  right: 8vw; top: 18vh;
  background: radial-gradient(circle, rgba(61, 107, 255, 0.45), transparent 65%);
}
.bg__arcs {
  position: absolute;
  right: -8vw;
  top: -6vh;
  width: min(900px, 90vw);
  height: auto;
  aspect-ratio: 1;
}
@media (max-width: 760px) {
  .bg__arcs { opacity: 0.45; right: -40vw; }
}

/* Header / footer ------------------------------------------------------- */

.site-header,
.site-footer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px var(--gutter);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}
.logo__mark { width: 34px; height: 35px; flex: none; }
.logo__word {
  font: 700 1.45rem/1 var(--display);
  letter-spacing: -0.03em;
}
.logo__it { color: var(--teal); }

.site-header__title {
  font-size: var(--fs-sm);
  color: var(--mist);
}

.site-footer {
  font-size: var(--fs-xs);
  color: var(--mist);
  padding-top: 32px;
  padding-bottom: 32px;
}

/* Main column ----------------------------------------------------------- */

.check {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 96px) var(--gutter) 40px;
  outline: none;
}
.check[data-view="result"] { padding-bottom: 0; }

.screen { animation: screen-in 0.4s ease both; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.kicker {
  font: 600 var(--fs-sm)/1.3 var(--sans);
  color: var(--teal);
  margin-bottom: 1rem;
}

/* Intro ------------------------------------------------------------------ */

.intro { max-width: 760px; }
.intro__title {
  font-size: var(--fs-xxl);
  font-weight: 600;
}
.intro__lede {
  margin-top: 1.5rem;
  font-size: var(--fs-md);
  color: #d5ddee;
  max-width: 36em;
}
.intro__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2.5rem;
}
.intro__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.intro__facts li {
  padding: 0.45rem 0.9rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: #d5ddee;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}
.intro__note { margin-top: 2rem; font-size: var(--fs-xs); color: var(--mist); }

/* Question --------------------------------------------------------------- */

.q { max-width: 820px; }

.progress {
  height: 6px;
  max-width: 560px;
  margin-bottom: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--gradient);
  transition: width 0.45s cubic-bezier(.2,.7,.2,1);
}

.q__count { font-size: var(--fs-sm); font-weight: 600; color: var(--teal); }
.q__text {
  margin-top: 0.85rem;
  font-size: var(--fs-xl);
  max-width: 26ch;
}
.q__text:focus { outline: none; }
.q__hint {
  margin-top: 1rem;
  color: var(--mist);
  max-width: 40em;
}
.q__hint:empty { display: none; }

.q__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 2.25rem;
  max-width: 640px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 14px 20px;
  font: 600 var(--fs-md)/1.2 var(--sans);
  color: var(--white);
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--line-dark);
  border-radius: var(--radius);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.opt:hover { border-color: var(--teal); background: rgba(20, 196, 174, 0.08); }
.opt__key {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--mist);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
}
.opt[aria-checked="true"] {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--midnight);
}
.opt[aria-checked="true"] .opt__key { color: var(--midnight); border-color: rgba(8, 20, 48, 0.3); }

.q__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.25rem;
  max-width: 640px;
  min-height: 54px;
}
.q__keys { margin-top: 2.5rem; font-size: var(--fs-xs); color: var(--mist); }
@media (hover: none) { .q__keys { display: none; } }

@media (max-width: 560px) {
  .q__options { grid-template-columns: 1fr; }
  .opt { min-height: 60px; }
}

/* Result: dark hero ------------------------------------------------------ */

.r__hero { max-width: 820px; padding-bottom: clamp(48px, 8vh, 80px); }
.r__title { font-size: var(--fs-xxl); }
.r__summary {
  margin-top: 1.25rem;
  font-size: var(--fs-md);
  color: #d5ddee;
  max-width: 36em;
}
.r__unsure { margin-top: 1rem; max-width: 40em; color: var(--mist); }

/* The value strip: eight tiles in four pairs, one pair per theme */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 18px);
  margin-top: 2.75rem;
}
.strip__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.tile {
  display: block;
  height: clamp(44px, 8vw, 64px);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  animation: tile-in 0.5s cubic-bezier(.2,.7,.2,1) both;
}
.strip__group:nth-child(2) .tile { animation-delay: 0.08s; }
.strip__group:nth-child(3) .tile { animation-delay: 0.16s; }
.strip__group:nth-child(4) .tile { animation-delay: 0.24s; }
@keyframes tile-in {
  from { transform: scaleY(0.2); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.tile--strong { background: var(--strong); }
.tile--partial { background: var(--partial); }
.tile--gap { background: var(--gap); }
.tile--unknown {
  background: repeating-linear-gradient(135deg, var(--unknown) 0 5px, #6b7794 5px 10px);
}

.strip__label {
  display: block;
  margin-top: 10px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--white);
}
.strip__status { display: block; font-weight: 400; color: var(--mist); font-size: var(--fs-xs); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 1.5rem;
  font-size: var(--fs-xs);
  color: var(--mist);
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* Result: light sheet ---------------------------------------------------- */
/* Breaks out of the centred column to run full width, like the white sections on the reference sites */

.r__sheet {
  margin-inline: calc(50% - 50vw);
  background: var(--cloud);
  color: var(--ink);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.r__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 88px) var(--gutter) clamp(56px, 8vh, 96px);
}

.r__section-title { font-size: var(--fs-lg); }

.r__pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 1.75rem;
}

.pillar {
  position: relative;
  padding: 28px 28px 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--status-color, var(--line));
}
.pillar--strong { --status-color: var(--strong); }
.pillar--partial { --status-color: var(--partial); }
.pillar--gap { --status-color: var(--gap); }

.pillar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.pillar__head h3 { font-size: var(--fs-md); }
.pillar__question { margin-top: 0.2rem; font-size: var(--fs-sm); color: var(--slate); }
.pillar__status {
  flex: none;
  padding: 0.3rem 0.75rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: 999px;
}
.pillar__status--strong { color: #0b6b4c; background: #d9f6ea; }
.pillar__status--partial { color: #8a5a00; background: #fdf0d2; }
.pillar__status--gap { color: #b33221; background: #ffe3de; }
.pillar__body { margin-top: 1rem; color: var(--ink); }

.r__priority {
  position: relative;
  margin-top: 28px;
  padding: clamp(28px, 4vw, 44px);
  color: var(--white);
  background: var(--midnight);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}
.r__priority::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px; height: 420px;
  right: -140px; top: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 196, 174, 0.45), rgba(61, 107, 255, 0.2) 45%, transparent 70%);
}
.r__priority .kicker { margin-bottom: 0.6rem; }
.r__priority h2 { font-size: var(--fs-xl); max-width: 22ch; }
.r__priority p.r__priority-text { margin-top: 1rem; max-width: 40em; color: #d5ddee; font-size: var(--fs-md); }

/* Lead capture ----------------------------------------------------------- */

.lead {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  margin-top: 28px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.lead__title { font-size: var(--fs-lg); }
.lead__text { margin-top: 0.85rem; color: var(--slate); }

.lead__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 18px;
}
.lead__form .check-opt,
.lead__form .form-error,
.lead__form button { grid-column: 1 / -1; }
.lead__form button { justify-self: start; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  font: 400 var(--fs-base)/1.3 var(--sans);
  color: var(--ink);
  background: var(--cloud);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.field input:focus,
.field select:focus {
  border-color: var(--teal);
  background: var(--white);
  outline: 3px solid rgba(20, 196, 174, 0.25);
  outline-offset: 0;
}
.field input[aria-invalid="true"] { border-color: var(--gap); }

.check-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--slate);
}
.check-opt input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal-ink); flex: none; }

.form-error { color: #b33221; font-weight: 600; font-size: var(--fs-sm); }

.lead__done { grid-column: 1 / -1; outline: none; }

.r__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.5rem;
  color: var(--ink);
}

/* When the light sheet is showing, the footer continues it */
body:has(.check[data-view="result"]) .site-footer {
  max-width: none;
  background: var(--cloud);
  color: var(--slate);
  border-top: 1px solid var(--line);
  padding-inline: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter)));
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 860px) {
  .r__pillars { grid-template-columns: 1fr; }
  .lead { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header__title { display: none; }
  .lead__form { grid-template-columns: 1fr; }
  .strip__label { font-size: var(--fs-xs); }
  .pillar { padding: 24px 20px; }
}
