/*
 * Flagrant AI — marketing site.
 *
 * Same world as TownEye: black and white doing the work, heavy tight display
 * type, full-bleed bands rather than boxed cards, one action repeated. Where
 * TownEye spends its colour on category pins, Flagrant spends its character on
 * monospace metadata — the language of a camera feed, used only for machine
 * output: timestamps, classes, confidence scores.
 *
 * Plain CSS, no build step.
 */

:root {
  --black: #000000;
  --white: #ffffff;
  --grey-50: #f6f6f6;
  --grey-100: #eeeeee;
  --grey-300: #cbcbcb;
  --grey-500: #757575;
  --grey-600: #545454;
  --grey-800: #1f1f1f;
  --grey-900: #141414;

  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --text: Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --page: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
  --band: clamp(88px, 11vw, 168px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--black); color: var(--white); }
.on-dark ::selection { background: var(--white); color: var(--black); }

img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--white); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: calc(var(--page) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }
.on-dark { background: var(--black); color: var(--white); }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }

.display {
  font-size: clamp(52px, 8.2vw, 104px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.032em;
}

.headline {
  font-size: clamp(36px, 5vw, 66px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.title { font-size: clamp(22px, 2.1vw, 28px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }

.lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; max-width: 36ch; margin: 28px 0 0; }
.on-dark .lead { color: var(--grey-300); }

p { margin: 0; }
.body { color: var(--grey-600); max-width: 48ch; }
.body + .body { margin-top: 16px; }
.on-dark .body { color: var(--grey-300); }

/* Machine output only: never used for prose. */
.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.on-dark .mono { color: var(--grey-300); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: 600 17px/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.button:active { transform: scale(0.98); }
.button--black { background: var(--black); color: var(--white); }
.button--black:hover { background: var(--grey-800); }
.button--white { background: var(--white); color: var(--black); }
.button--white:hover { background: var(--grey-100); }
.button--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.button--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.button[disabled] { opacity: 0.55; cursor: progress; }

/* ---------- Nav ---------- */

.nav { position: sticky; top: 0; z-index: 30; background: var(--black); color: var(--white); }
.nav .wrap { display: flex; align-items: center; gap: 36px; min-height: 76px; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/*
 * The mark carries the corner brackets now, so the AI badge drops its own —
 * repeating the device twice in one lockup made it read as decoration.
 */
.wordmark-mark { flex: none; }
.wordmark .wm { font: 800 21px/1 var(--display); letter-spacing: -0.02em; }
.wordmark .ai { font: 500 12px/1 var(--text); letter-spacing: 0.2em; color: var(--grey-300); align-self: center; }

.footer .wordmark-mark { width: 34px; height: 34px; }
.footer .wordmark .wm { font-size: 24px; }

.nav-links { display: flex; gap: 4px; margin-right: auto; }

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
}

.nav-links a:hover { background: var(--grey-800); }
.nav .button { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; isolation: isolate; }

/*
 * The photograph puts the camera pole hard left against empty sky. Mirrored,
 * the cameras sit opposite the headline and face into it, and the sky becomes
 * the quiet half rather than a dead one. The scrim is a separate layer so it
 * is not flipped with the image.
 */
.hero-photo { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--black); }

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/band-camerapole-2600.jpg") 38% center / cover no-repeat;
  transform: scaleX(-1);
  filter: grayscale(1) contrast(1.08) brightness(0.92);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.86) 34%, rgba(0, 0, 0, 0.55) 68%, rgba(0, 0, 0, 0.35) 100%);
}

.hero .wrap { padding-block: clamp(80px, 12vw, 180px); }
.hero-title { max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* A row of plain facts, not a stats template: no numbers, no icons. */
.spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(28px, 4vw, 56px);
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.spec div + div { padding-left: clamp(28px, 4vw, 56px); border-left: 1px solid rgba(255, 255, 255, 0.22); }
.spec dt { font: 400 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-300); }
.spec dd { margin: 8px 0 0; font: 500 15px/1.4 var(--text); color: var(--white); white-space: nowrap; }

/* ---------- Bands ---------- */

.band { padding-block: var(--band); }
.band--grey { background: var(--grey-50); }
.statement { max-width: 15ch; }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(40px, 6vw, 96px); align-items: end; }

/* ---------- Pipeline ---------- */

.steps { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; counter-reset: step; display: grid; gap: 0; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 32px;
  padding-block: 40px;
  border-top: 1px solid var(--grey-100);
  align-items: start;
}

.steps li:last-child { border-bottom: 1px solid var(--grey-100); }

.steps li::before {
  content: "0" counter(step);
  grid-row: span 2;
  font: 400 13px/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--grey-500);
  padding-top: 8px;
}

.steps p { color: var(--grey-600); font-size: 17px; }

/* ---------- Frame: a photograph with machine output over it ---------- */

.frame { position: relative; background: var(--black); }
.frame img { width: 100%; height: auto; filter: grayscale(1) contrast(1.05); }

.frame-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-300);
  background: var(--grey-900);
}

.frame-tag {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  background: var(--white);
  color: var(--black);
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.frame-tag span { color: var(--grey-500); font-weight: 400; }
.frame-box { position: absolute; border: 2px solid rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }

/* ---------- Sectors ---------- */

.sectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: clamp(40px, 5vw, 64px); }

.sector { position: relative; overflow: hidden; background: var(--black); aspect-ratio: 4 / 3; display: flex; }
.sector img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: grayscale(1); transition: transform 600ms var(--ease-out); }
.sector:hover img { transform: scale(1.03); }

.sector-body {
  position: relative;
  margin-top: auto;
  padding: 28px;
  width: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.82) 55%, rgba(0, 0, 0, 0.95) 100%);
  color: var(--white);
}

.sector-body h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.025em; }
.sector-body p { margin-top: 10px; color: var(--grey-300); font-size: 16px; max-width: 42ch; }

/* ---------- Promises ---------- */

.promises { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.promises li { padding: 34px 0; border-top: 1px solid var(--grey-800); display: grid; grid-template-columns: 34px 1fr; gap: 6px 18px; }
.promises li:nth-child(odd) { padding-right: 48px; }
.promises li:nth-child(even) { padding-left: 48px; border-left: 1px solid var(--grey-800); }
.promises svg { grid-row: span 2; margin-top: 4px; }
.promises h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.promises p { color: var(--grey-300); font-size: 16px; max-width: 40ch; }

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

.demo .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 0.85fr); gap: clamp(40px, 6vw, 96px); align-items: start; }

.demo-card { background: var(--white); color: var(--black); border-radius: 20px; padding: clamp(28px, 3vw, 40px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.demo-card h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.demo-card > p { color: var(--grey-600); font-size: 16px; margin-top: 10px; }

.form { display: grid; gap: 14px; margin-top: 24px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field .optional { font-weight: 400; color: var(--grey-600); }

.field input, .field select, .field textarea {
  width: 100%;
  min-height: 54px;
  padding: 15px 16px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--grey-50);
  color: var(--black);
  font: 400 17px/1.4 var(--text);
  caret-color: var(--black);
  transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

.field textarea { min-height: 110px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--grey-500); }
.field input:hover, .field select:hover, .field textarea:hover { background: var(--grey-100); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--black); background: var(--white); }
.field input[aria-invalid="true"] { border-color: #de1135; }

.form .button { width: 100%; margin-top: 4px; }
.form-message { font-size: 15px; min-height: 0; color: var(--grey-600); }
.form-message[data-state="error"] { color: #b10c2a; }

.form-success { display: grid; gap: 10px; }
.form-success h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.form-success p { color: var(--grey-600); font-size: 16px; }

.fine-print { font-size: 13px; color: var(--grey-600); margin-top: 16px; line-height: 1.5; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */

.footer { background: var(--black); color: var(--white); border-top: 1px solid var(--grey-800); }
.footer .wrap { padding-block: 72px 48px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-tag { color: var(--grey-300); font-size: 16px; margin-top: 14px; max-width: 30ch; }
.footer h2 { font: 600 15px/1 var(--text); color: var(--grey-300); margin-bottom: 14px; letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li a, .footer li span { display: inline-flex; align-items: center; min-height: 40px; font-size: 16px; text-decoration: none; }
.footer li span { color: var(--grey-300); }
.footer li a:hover { text-decoration: underline; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--grey-800);
  font-size: 14px; color: var(--grey-300);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .demo .wrap, .split { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 70px minmax(0, 1fr); }
  .steps li .step-media { grid-column: 2; }
  .spec { gap: 24px 40px; }
  .spec div + div { padding-left: 40px; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }

  /* Stacked copy needs a vertical scrim, and the cameras should sit above the
     headline rather than behind it. */
  .hero-photo::before { background: url("images/band-camerapole-1400.jpg") 32% top / cover no-repeat; }
  .hero-photo::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.82) 38%, rgba(0, 0, 0, 0.94) 70%);
  }
  .nav-links { display: none; }
  .nav .wrap { justify-content: space-between; gap: 16px; }
  .sectors, .promises { grid-template-columns: 1fr; }
  .promises li:nth-child(odd) { padding-right: 0; }
  .promises li:nth-child(even) { padding-left: 0; border-left: 0; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
  .spec div + div { padding-left: 0; border-left: 0; }
  .spec dd { white-space: normal; }
}

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

/* ---------- Legal pages ---------- */

.policy-hero .wrap { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px); }
.policy-hero .mono { margin-bottom: 18px; }
.policy-hero .display { font-size: clamp(40px, 6vw, 76px); }
.policy-hero .lead { margin-top: 20px; }

.policy { padding-block: clamp(56px, 7vw, 96px); }
.policy .wrap { max-width: calc(760px + var(--gutter) * 2); }
.policy h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-top: 56px;
}
.policy h2:first-child { margin-top: 0; }
.policy h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-top: 32px; }
.policy p { margin-top: 16px; color: var(--grey-600); max-width: 68ch; }
.policy strong { color: var(--black); font-weight: 600; }
.policy a { color: var(--black); }
.policy ul, .policy ol { margin: 16px 0 0; padding-left: 22px; color: var(--grey-600); max-width: 68ch; }
.policy li { margin-top: 10px; }
.policy li::marker { color: var(--black); }
.policy table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.policy td, .policy th { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--grey-100); font-size: 16px; vertical-align: top; }
.policy th { font-weight: 600; }
