/*
 * Guard AI website.
 *
 * The brief in one line: this should read like a build result, not a brochure.
 *
 * The audience is lead engineers who have been sold to by every security vendor in existence.
 * The thing that separates this page from those is that it shows the product's actual output
 * rather than describing its capabilities, so the hero is a blocked pull request and the copy
 * sits around it.
 *
 * Rules that hold everywhere:
 *   Blue, white, grey, dark grey and black. Nothing else.
 *   No gradients and no shadows. Depth comes from fill weight and hairlines.
 *   Monospace only where a string is literally a machine identifier.
 *   Numbered markers only where the content is genuinely a sequence.
 */

:root {
  --ink:      #0b0f14;
  --ink-700:  #1c2530;
  --ink-500:  #4a5765;
  --ink-300:  #8a96a3;
  --line:     #d6dce3;
  --line-2:   #e8ecf0;
  --surface:  #ffffff;
  --surface-2:#f4f6f8;
  --navy:     #0a2540;
  --blue:     #14508c;
  --blue-500: #2c6fb5;
  --blue-100: #e4edf6;

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --s0: 0.875rem;
  --s1: 1.0625rem;
  --s2: 1.3125rem;
  --s3: 1.75rem;
  --s4: 2.375rem;
  --s5: 3.25rem;

  --gap: 28px;
  --radius: 6px;
  --page: 1120px;
  --prose: 62ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s1);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }

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

/* ---------------------------------------------------------------- type */

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: var(--s5); line-height: 1.08; }
h2 { font-size: var(--s3); line-height: 1.2; margin-bottom: 14px; }
h3 { font-size: var(--s2); line-height: 1.3; margin-bottom: 8px; letter-spacing: -0.01em; }

p { margin: 0 0 16px; max-width: var(--prose); }
p:last-child { margin-bottom: 0; }

.lede { font-size: var(--s2); line-height: 1.5; color: var(--ink-500); max-width: 56ch; }
.muted { color: var(--ink-500); }
.small { font-size: var(--s0); }
.mono  { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- shell */

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 28px; }
/* Narrow sections stay LEFT aligned with everything else. Centring a narrow column inside an
   already centred wrapper shifts it right and breaks the single left edge the page is built on,
   which reads as a different template rather than a narrower measure. */
.narrow { max-width: 760px; margin-left: 0; margin-right: auto; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}
header.site .wrap { display: flex; align-items: center; gap: 30px; height: 66px; }

/* The mark sits at 30px against 19px text. At 24 it read as an icon beside a word rather than
   a logo: the two were competing at similar weight and neither led. */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

nav.main { display: flex; gap: 24px; margin-left: 8px; }
nav.main a { color: var(--ink-500); font-size: var(--s0); }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--ink); text-decoration: none; }
nav.main a[aria-current="page"] { font-weight: 600; }
header.site .spacer { margin-left: auto; }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line-2); }
section.dark { background: var(--navy); color: var(--surface); border-top: 0; }
section.dark h2, section.dark h3 { color: var(--surface); }
section.dark p { color: #c7d6e4; }
section.tint { background: var(--surface-2); border-top: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- hero */

.hero { padding: 76px 0 72px; background: var(--navy); color: var(--surface); }
.hero h1 { color: var(--surface); max-width: 17ch; }
.hero .lede { color: #c7d6e4; margin-top: 20px; }
.hero .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}
.hero .actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* The artifact. A pull request comment, rendered rather than described. */
.pr {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}
.pr .bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 13px 18px;
  font-size: var(--s0);
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pr .bar .dot {
  width: 9px; height: 9px; border-radius: 5px; background: var(--ink-300);
  flex: 0 0 auto;
}
.pr[data-state="running"] .bar .dot { background: var(--blue-500); }
.pr[data-state="failed"]  .bar .dot { background: var(--navy); }
.pr[data-state="passed"]  .bar .dot { background: var(--blue); }

.pr .row {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-2);
  font-size: var(--s0);
}
.pr .row:last-of-type { border-bottom: 0; }
.pr .row .id { font-family: var(--mono); color: var(--blue); font-size: 0.92em; }
.pr .row .ref { color: var(--ink-500); display: block; margin-top: 3px; }
.pr .foot {
  border-top: 1px solid var(--line-2);
  padding: 13px 18px;
  font-size: var(--s0);
  color: var(--ink-500);
  background: var(--surface-2);
}
.pr .fix { display: none; }
.pr[data-state="passed"] .fix { display: block; }
.pr[data-state="passed"] .fail { display: none; }

.pr .status {
  padding: 13px 18px;
  font-size: var(--s0);
  font-weight: 600;
  border-bottom: 1px solid var(--line-2);
}
.pr[data-state="running"] .status { color: var(--blue); }
.pr[data-state="failed"]  .status { color: var(--navy); }
.pr[data-state="passed"]  .status { color: var(--blue); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--surface);
  font: inherit;
  font-size: var(--s1);
  font-weight: 500;
  cursor: pointer;
}
.btn:hover { background: var(--blue); border-color: var(--blue); text-decoration: none; }
.btn.light { background: var(--surface); color: var(--navy); border-color: var(--surface); }
.btn.light:hover { background: var(--blue-100); border-color: var(--blue-100); color: var(--navy); }
.btn.quiet { background: transparent; color: var(--surface); border-color: rgba(255,255,255,.45); }
.btn.quiet:hover { background: rgba(255,255,255,.1); border-color: var(--surface); }
.btn.outline { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn.outline:hover { background: var(--surface-2); border-color: var(--ink-300); color: var(--navy); }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------------------------------------------------------------- blocks */

.cols { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
section.dark .panel {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.2);
}

/* A step in a real sequence. Numbered because it is ordered, not for decoration. */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-2);
  align-items: start;
}
.step:last-child { border-bottom: 0; }
.step .n {
  counter-increment: step;
  width: 34px; height: 34px; border-radius: 17px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: var(--s0); color: var(--ink-500);
}
.step .n::before { content: counter(step); }
section.dark .step { border-color: rgba(255,255,255,.16); }
section.dark .step .n { border-color: rgba(255,255,255,.3); color: #c7d6e4; }

/* A list where order carries no meaning: hairline rows, no numbers. */
.rows { border-top: 1px solid var(--line-2); }
.rows > div { padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.rows h3 { margin-bottom: 4px; }

/* What we are never given. Stated as a list because it is the objection. */
.never { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.never li {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start;
  font-size: var(--s1);
}
.never .mark { color: var(--blue-500); font-weight: 700; line-height: 1.4; }
section.dark .never .mark { color: #7fb3e8; }

/* ---------------------------------------------------------------- pricing */

.price { font-size: var(--s4); font-weight: 600; letter-spacing: -0.03em; margin: 10px 0 4px; }
.price .per { font-size: var(--s1); font-weight: 400; color: var(--ink-500); letter-spacing: 0; }
.plan ul { margin: 16px 0 0; padding-left: 20px; color: var(--ink-500); font-size: var(--s0); }
.plan li { margin-bottom: 7px; }
.plan.feature { background: var(--navy); border-color: var(--navy); color: var(--surface); }
.plan.feature .price, .plan.feature h3 { color: var(--surface); }
.plan.feature .price .per, .plan.feature ul, .plan.feature p { color: #c7d6e4; }

/* ---------------------------------------------------------------- form */

label { display: block; font-size: var(--s0); font-weight: 600; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--s1);
  background: var(--surface);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy);
  border-width: 2px;
  padding: 10px 12px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.note {
  display: flex; gap: 12px;
  margin-top: 16px; padding: 13px 16px;
  background: var(--blue-100);
  border-left: 3px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--s0);
  color: var(--navy);
}

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

footer.site {
  background: var(--navy);
  color: #c7d6e4;
  padding: 48px 0 40px;
  font-size: var(--s0);
}
footer.site a { color: var(--surface); }
footer.site .grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: var(--gap);
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
footer.site h3 { font-size: var(--s0); color: var(--surface); margin-bottom: 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 7px; }
footer.site .base { padding-top: 22px; display: flex; gap: 18px; flex-wrap: wrap; }
footer.site .base .spacer { margin-left: auto; }

/* ---------------------------------------------------------------- motion
 *
 * One sequence, on the hero, once. It is the product doing its job rather than
 * an entrance effect, and it is the only motion on the site.
 */
@keyframes barfill { from { width: 0; } to { width: 100%; } }
.pr .progress { height: 2px; background: var(--line-2); }
.pr[data-state="running"] .progress::after {
  content: ""; display: block; height: 2px; background: var(--blue-500);
  animation: barfill 1.1s linear forwards;
}

/* ---------------------------------------------------------------- responsive */

/* ---------------------------------------------------------------- mobile menu
 *
 * A disclosure button rather than hiding the navigation. The first version hid it entirely,
 * which left a phone visitor with no way to reach any page except the call to action: a
 * marketing site that cannot be navigated on the device most people open a link on.
 */
.menu-toggle { display: none; }

@media (max-width: 900px) {
  :root { --s5: 2.4rem; --s4: 1.9rem; --s3: 1.5rem; }
  .hero .grid { grid-template-columns: 1fr; gap: 36px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  footer.site .grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }

  header.site .wrap { gap: 14px; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: var(--s0);
    cursor: pointer;
  }
  .menu-toggle .bars { display: grid; gap: 3px; }
  .menu-toggle .bars span { display: block; width: 15px; height: 1.5px; background: currentColor; }

  nav.main {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  nav.main[data-open="true"] { display: flex; }
  nav.main a {
    padding: 15px 28px;
    border-top: 1px solid var(--line-2);
    font-size: var(--s1);
  }

  header.site .btn { padding: 9px 15px; font-size: var(--s0); }
}

@media (max-width: 460px) {
  header.site .brand span { display: none; }
}

/* ---------------------------------------------------------------- small screens
 *
 * Below 560 the page is read one thumb at a time, so two column rows become stacked blocks and
 * anything that was side by side goes full width.
 *
 * The artifact is the case that mattered. Its identifier column is a fixed 124 pixels, which is
 * right on a laptop and leaves about 150 pixels for the description on a small phone: the text
 * wrapped to five lines with breaks in the middle of phrases. Stacking the identifier above the
 * description gives the sentence the full width and costs one line of height.
 */
@media (max-width: 560px) {
  :root { --s5: 2.05rem; --s4: 1.65rem; --s3: 1.35rem; --s2: 1.1875rem; }

  .wrap { padding: 0 20px; }
  section { padding: 44px 0; }

  /* Identifier above the text it labels, rather than beside it in a narrow column. */
  .pr .row { grid-template-columns: 1fr; gap: 4px; padding: 12px 15px; }
  .pr .row .id { font-size: var(--s0); }
  .pr .bar, .pr .status, .pr .foot { padding: 12px 15px; }

  /* Both buttons full width and equal. Two different widths stacked reads as an accident. */
  .hero .actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero .actions .btn { width: 100%; }

  /* Anything laid out as columns of text, including the control to framework trace. */
  .panel { padding: 20px; }
  .panel .row { grid-template-columns: 1fr !important; gap: 4px !important; }

  /* The numbered steps keep their numbers, which carry the sequence, but tighten. */
  .step { grid-template-columns: 34px 1fr; gap: 14px; padding: 20px 0; }
  .step .n { width: 28px; height: 28px; border-radius: 14px; }

  /* Code blocks scroll horizontally rather than forcing the page to. */
  pre { font-size: 0.78rem; }

  .footer-stack, footer.site .base { flex-direction: column; gap: 8px; }
  footer.site .base .spacer { display: none; }

  /* Tap targets. A 44 pixel minimum is the smallest a thumb hits reliably. */
  nav.main a { padding: 16px 20px; }
  .btn { padding: 13px 20px; }
}

@media (max-width: 380px) {
  :root { --s5: 1.85rem; }
  .wrap { padding: 0 16px; }
  header.site .wrap { gap: 10px; }
  .menu-toggle { padding: 9px 11px; }
}

/* A short viewport is a phone held sideways, where a sticky header costs a fifth of the screen
   for something the reader is not using. It scrolls away and comes back at the top. */
@media (max-height: 460px) and (max-width: 900px) {
  header.site { position: static; }
  header.site .wrap { height: 56px; }
  nav.main { top: 56px; }
}
