/* BoroughLets marketing site.
 *
 * One stylesheet, no framework, no build step. The content security policy on the
 * distribution forbids unsafe-inline, so every rule lives here: no <style> blocks
 * and no style="" attributes anywhere in the HTML.
 *
 * The palette is the product's own design tokens (frontend/src/styles/variables.css)
 * for light surfaces, and the demo film's gradient (compose.py) for dark ones. They
 * are one system: the film's ground is the app's primary blue pushed darker.
 *
 * Three contrast rules, measured rather than assumed:
 *   the brand green #5CB85C is 2.48:1 on white, so it is decoration on light
 *     surfaces and never text, and never a button fill with white text;
 *   the app's muted grey #7a7a8a is 4.22:1 on white, which fails AA for body text,
 *     so this site uses #5f5f70 (6.25:1);
 *   the app's focus ring colour is 1.12:1, so focus here is a solid 3px ring.
 */

/* ---------------------------------------------------------------- tokens --- */
:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f8f8fa;
  --c-bg-tint: #E8F4F8;
  --c-border: #e2e2e8;
  --c-border-strong: #8a8a99;

  --c-ink-900: #0B2238;
  --c-ink-800: #081C2E;
  --c-ink-700: #134766;
  --c-ink-600: #1D5A86;

  --c-text: #1a1a2e;
  --c-text-2: #4a4a5a;
  --c-text-3: #5f5f70;
  --c-text-dk: #ffffff;
  --c-text-dk-2: #D3E6F5;

  --c-primary: #1B5E8A;
  --c-primary-dk: #134766;
  --c-accent: #5CB85C;
  --c-accent-film: #7CBE42;
  --c-accent-text: #0d7a3e;

  --grad-ground: linear-gradient(135deg, #0B2238 0%, #1D5A86 100%);

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 6px;
  --r-media: 10px;

  --sh-1: 0 1px 2px rgba(26, 26, 46, .04);
  --sh-2: 0 2px 8px rgba(26, 26, 46, .06);
  --sh-media: 0 1px 2px rgba(26, 26, 46, .04), 0 10px 28px rgba(26, 26, 46, .08), 0 28px 56px rgba(26, 26, 46, .05);
  --sh-media-dark: 0 24px 60px rgba(2, 9, 17, .5);

  --w-page: 1160px;
  --w-prose: 680px;
  --header-h: 68px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2018-201D, U+2026, U+2192;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}

h1 { font-size: 52px; line-height: 1.08; letter-spacing: -.022em; }
h2 { font-size: 34px; line-height: 1.18; }
h3 { font-size: 21px; line-height: 1.35; letter-spacing: -.012em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dk); text-decoration-thickness: 2px; }

img, video { max-width: 100%; height: auto; display: block; }

ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .4em; }

/* A visible ring on every background the site uses. Never removed. */
:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.band--dark :focus-visible, .site-footer :focus-visible { outline-color: #ffffff; }

/* The sticky header must never hide what the keyboard just moved to. */
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-bg);
  color: var(--c-primary);
  padding: 12px 20px;
  z-index: 100;
}
.skip:focus { left: 0; }

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

/* --------------------------------------------------------------- layout --- */
.wrap { width: 100%; max-width: var(--w-page); margin: 0 auto; padding: 0 24px; }
.wrap--prose { max-width: var(--w-prose); }

.band { padding: 96px 0; }
.band--alt { background: var(--c-bg-alt); }
.band--tight { padding: 64px 0; }

.band--dark {
  background: var(--grad-ground);
  color: var(--c-text-dk-2);
  padding: 112px 0;
}
.band--dark h1, .band--dark h2, .band--dark h3 { color: var(--c-text-dk); }
.band--dark a { color: var(--c-text-dk); }

.eyebrow {
  display: block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-primary);
}
.band--dark .eyebrow { color: var(--c-accent-film); }

.lead { font-size: 20px; line-height: 1.55; color: var(--c-text-2); }
.band--dark .lead { color: var(--c-text-dk-2); }

.small { font-size: 14px; line-height: 1.55; color: var(--c-text-3); }
.band--dark .small { color: var(--c-text-dk-2); opacity: .85; }

/* -------------------------------------------------------------- buttons --- */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dk); color: #fff; text-decoration: none; }
.btn--secondary { background: transparent; border-color: var(--c-primary); color: var(--c-primary); }
.btn--secondary:hover { background: var(--c-bg-tint); text-decoration: none; }

.band--dark .btn--primary { background: #fff; color: var(--c-ink-900); }
.band--dark .btn--primary:hover { background: var(--c-text-dk-2); color: var(--c-ink-900); }
.band--dark .btn--secondary { border-color: rgba(255, 255, 255, .45); color: #fff; }
.band--dark .btn--secondary:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

/* --------------------------------------------------------------- header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--c-border); }

.site-header .wrap { display: flex; align-items: center; gap: 24px; }

.wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--c-primary);
  white-space: nowrap;
}
.wordmark span { color: var(--c-accent-text); }
.wordmark:hover { text-decoration: none; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; align-items: center; }
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text-2);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--c-primary); }
.site-nav a[aria-current='page'] { font-weight: 600; }
.site-nav .btn { padding: 10px 18px; font-size: 15px; color: #fff; }

.nav-toggle { display: none; }

/* ----------------------------------------------------------------- hero --- */
.hero { padding: 88px 0 96px; }
.hero .lead { max-width: 40em; }
.hero__support { margin-top: 16px; max-width: 40em; color: var(--c-text-dk-2); }

.hero__media { margin-top: 56px; }

.player {
  position: relative;
  margin: 0;
  border-radius: var(--r-media);
  overflow: hidden;
  box-shadow: var(--sh-media-dark);
  background: var(--c-ink-800);
  aspect-ratio: 16 / 9;
}
.player img, .player video { width: 100%; height: 100%; object-fit: cover; }

.player__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  background: rgba(11, 34, 56, .28);
  cursor: pointer;
}
.player__play:hover { background: rgba(11, 34, 56, .16); }
.player__play span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: rgba(11, 34, 56, .82);
  border: 2px solid rgba(255, 255, 255, .9);
}
.player__play:hover span { border-color: var(--c-accent-film); }
.player__play svg { width: 30px; height: 34px; margin-left: 5px; fill: #fff; }

.player__note { margin-top: 16px; }

/* ---------------------------------------------------------------- proof --- */
.proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.proof > div { padding: 0 28px; border-left: 1px solid var(--c-border); }
.proof > div:first-child { padding-left: 0; border-left: 0; }
.proof b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: var(--c-primary); }
.proof span { display: block; margin-top: 6px; font-size: 15px; color: var(--c-text-2); }

/* -------------------------------------------------------------- feature --- */
.feature { display: grid; grid-template-columns: 46fr 54fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 96px; }
/* Flipping the row swaps which side the screenshot sits on. The track sizes swap with
 * it, or the screenshot would be the narrower column on every other row. */
.feature--flip { grid-template-columns: 54fr 46fr; }
.feature--flip .feature__copy { order: 2; }

.shot { margin: 0; }
.shot img {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: var(--r-media);
  box-shadow: var(--sh-media);
  background: #fff;
}
.band--dark .shot img { border: 0; box-shadow: var(--sh-media-dark); }
.shot figcaption { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--c-text-3); }
.band--dark .shot figcaption { color: var(--c-text-dk-2); opacity: .85; }

/* A green rule is the accent on light surfaces, because the green itself is not
 * readable as text there. */
.ruled { padding-left: 20px; border-left: 3px solid var(--c-accent); }
.ruled + .ruled { margin-top: 24px; }

/* ---------------------------------------------------------------- stats --- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.stat b {
  display: block;
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--c-accent-film);
}
.stat span { display: block; margin-top: 14px; font-size: 16px; color: var(--c-text-dk-2); }

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--c-bg-tint);
  color: var(--c-ink-700);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.band--dark .pill { background: rgba(255, 255, 255, .14); color: var(--c-text-dk-2); }

/* --------------------------------------------------------------- panels --- */
.panel {
  margin-top: 32px;
  padding: 28px 32px;
  background: var(--c-ink-800);
  color: var(--c-text-dk-2);
  border-left: 3px solid var(--c-accent-film);
  border-radius: var(--r-media);
}
.panel strong { display: block; margin-bottom: 8px; color: #fff; font-size: 19px; font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.card {
  padding: 24px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.band--dark .card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); box-shadow: none; }
.card h3 { margin-bottom: 8px; font-size: 18px; }
.card p { font-size: 16px; color: var(--c-text-2); }
.band--dark .card p { color: var(--c-text-dk-2); }

/* ------------------------------------------------------------ questions --- */
.qa { border-top: 1px solid var(--c-border); }
.qa details { border-bottom: 1px solid var(--c-border); }
.qa summary {
  padding: 22px 40px 22px 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '';
  position: absolute;
  right: 8px; top: 30px;
  width: 10px; height: 10px;
  border-right: 2px solid var(--c-primary);
  border-bottom: 2px solid var(--c-primary);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.qa details[open] summary::after { transform: rotate(-135deg); top: 34px; }
.qa .qa__body { padding: 0 40px 24px 0; color: var(--c-text-2); }

/* ----------------------------------------------------------------- form --- */
.form { margin-top: 32px; }
.form__row { margin-bottom: 20px; }
.form label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.form input, .form textarea, .form select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form__hint { margin-top: 6px; font-size: 14px; color: var(--c-text-3); }

.band--dark .form label { color: #fff; }
.band--dark .form__hint { color: var(--c-text-dk-2); }

.form__error {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #b31b1b;
}
.band--dark .form__error { color: #ffc9c9; }
.form [aria-invalid='true'] { border-color: #b31b1b; border-width: 2px; }

.form__status { margin-top: 20px; padding: 16px 20px; border-radius: var(--r-md); font-weight: 500; }
.form__status:empty { display: none; }
.form__status--ok { background: #e6f5ec; color: #0d5c31; border-left: 3px solid var(--c-accent-text); }
.form__status--bad { background: #fef2f2; color: #8f1616; border-left: 3px solid #b31b1b; }

/* --------------------------------------------------------------- footer --- */
.site-footer { background: var(--c-ink-900); color: var(--c-text-dk-2); padding: 64px 0 40px; }
.site-footer a { color: var(--c-text-dk-2); }
.site-footer a:hover { color: #fff; }
.site-footer .wordmark { color: #fff; font-size: 20px; }
.site-footer .wordmark span { color: var(--c-accent-film); }

.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-cols h2 { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 10px; }
.footer-cols a { font-size: 15px; text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }

.footer-base {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 14px;
  opacity: .85;
}

/* ------------------------------------------------------------ 404, misc --- */
.center { text-align: center; }
.center .btn-row { justify-content: center; }

.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 32px; font-size: 19px; }
.prose dl { margin: 24px 0; }
.prose dt { font-weight: 600; margin-top: 16px; }
.prose dd { margin: 4px 0 0; color: var(--c-text-2); }

/* ------------------------------------------------------------ responsive --- */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  /* Stacked, the copy leads on every row: its heading is what introduces the
   * screenshot, so a reader should never meet the picture first. */
  .feature__copy { order: 0; }
  .feature--flip .feature__copy { order: 0; }
  .proof { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .proof > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  h3 { font-size: 19px; }
  body { font-size: 16px; }
  .lead { font-size: 18px; }
  .band { padding: 56px 0; }
  .band--dark { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .hero__media { margin-top: 36px; }
  .stat b { font-size: 34px; }
  .btn-row .btn { width: 100%; text-align: center; }

  /* The nav becomes a disclosure, so it needs no JavaScript at all. */
  .site-nav { position: static; margin-left: auto; }
  .nav-toggle { display: block; }
  .nav-toggle > summary {
    list-style: none;
    padding: 10px 14px;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: var(--c-text);
  }
  .nav-toggle > summary::-webkit-details-marker { display: none; }
  .nav-toggle ul {
    position: absolute;
    left: 0; right: 0;
    top: var(--header-h);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
  }
  .nav-toggle a { padding: 14px 0; font-size: 17px; }
  .nav-toggle .btn { margin-top: 10px; text-align: center; }
  .footer-cols { grid-template-columns: 1fr; }
}

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