/*
 * Styling for the static landing pages (content/landing/**), generated by
 * scripts/build-landing.mjs. These pages live outside the Angular app and
 * cannot use Tailwind, so the app's look is rebuilt here: the same blue, the
 * same heavy headings, the same rounded cards.
 *
 * Amber is reserved for one thing: anything about a deadline running out. It is
 * meaning, not decoration.
 */

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --amber-line: #fde68a;
  --ink: #111827;
  --body: #4b5563;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f3f4f6;
  --surface: #f9fafb;
  --radius: 1.5rem;
}

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}

p {
  margin: 0 0 1.125rem;
}

a {
  color: var(--blue);
}

svg {
  display: block;
}

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

/* ---------- Structure ---------- */

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.band {
  padding: 3rem 0;
}

.band-soft {
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.band-hero {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.measure {
  max-width: 42rem;
}

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

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
}

.brand span {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-plain {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
}

.link-plain:hover {
  color: var(--blue);
}

.site-header .btn {
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: none;
}

@media (max-width: 479px) {
  .site-header .link-plain {
    display: none;
  }

  .brand span {
    font-size: 1.125rem;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  padding: 1.125rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 20px -6px rgba(37, 99, 235, 0.45);
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: var(--blue-dark);
}

.btn-on-blue {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 10px 20px -6px rgba(0, 0, 0, 0.25);
}

.btn-on-blue:hover {
  background: var(--blue-soft);
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--faint);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--faint);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.breadcrumb span {
  margin: 0 0.35rem;
  color: var(--line);
}

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

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: 2.125rem;
  margin-bottom: 1.25rem;
}

.hero .lead {
  font-size: 1.125rem;
  color: var(--body);
  font-weight: 500;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.hero-note {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

/* Screenshots of the app in a phone frame. The images come from
   `make screenshots`; see scripts/screenshots/. */

.phone {
  max-width: 16.5rem;
  margin: 0 auto;
  padding: 0.5rem;
  background: #111827;
  border-radius: 2.25rem;
  box-shadow: 0 30px 60px -30px rgba(17, 24, 39, 0.65);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.75rem;
}

/* Text beside a screenshot */

.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.split .prose {
  max-width: none;
}

/* ---------- Prose ---------- */

.prose {
  max-width: 42rem;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 1rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.125rem;
  margin: 2rem 0 0.625rem;
}

.prose p,
.prose li {
  color: var(--body);
  font-weight: 450;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1.125rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 800;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  vertical-align: top;
}

.prose th.col-product,
.prose td.col-product {
  background: #f0fdf4;
  color: #065f46;
  font-weight: 600;
}

.prose thead th.col-product {
  color: #047857;
  border-bottom-color: #a7f3d0;
}

.prose tbody tr:last-child td.col-product {
  border-bottom-color: #a7f3d0;
}

.prose thead th {
  font-weight: 800;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
}

/* ---------- Section intro ---------- */

.section-head {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--body);
  font-weight: 500;
  margin: 0;
}

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

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.grid > * {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.band-soft .grid > * {
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.grid h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
}

.grid p {
  color: var(--body);
  font-weight: 450;
  margin: 0;
  font-size: 0.9375rem;
}

/* The whole card is the click target; the link keeps its own text so screen
   readers and the keyboard still announce the page it leads to. */

.grid li.linked {
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.grid li.linked:hover {
  border-color: #bfdbfe;
  box-shadow: 0 6px 16px -8px rgba(17, 24, 39, 0.25);
}

.grid li.linked h3 a {
  color: inherit;
  text-decoration: none;
}

.grid li.linked:hover h3 a {
  color: var(--blue);
}

.grid li.linked h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.grid li.linked:focus-within {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.grid li.linked h3 a:focus-visible {
  outline: none;
}

.icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.875rem;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Steps carry a number because the content really is a sequence. */

.steps {
  counter-reset: step;
}

.steps > li {
  position: relative;
  padding-top: 1.75rem;
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--line);
  letter-spacing: -0.05em;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  max-width: 42rem;
}

.checks li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  color: var(--body);
  font-weight: 500;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--blue-soft) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}

.note {
  max-width: 42rem;
  background: var(--blue-soft);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  color: var(--ink);
  font-weight: 500;
}

.note > :last-child {
  margin-bottom: 0;
}

.note-amber {
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  color: #78350f;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 42rem;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.125rem 2.5rem 1.125rem 0;
  font-weight: 800;
  font-size: 1.0625rem;
  position: relative;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  top: 1.5rem;
  width: 0.625rem;
  height: 0.625rem;
  border-right: 2.5px solid var(--faint);
  border-bottom: 2.5px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  top: 1.75rem;
}

.faq details p {
  color: var(--body);
  font-weight: 450;
  margin: 0 0 1.125rem;
  padding-right: 2rem;
}

/* ---------- Call to action ---------- */

.cta {
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.cta .icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1.25rem;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cta .icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.cta h2 {
  color: #fff;
  font-size: 1.625rem;
  margin-bottom: 0.75rem;
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  max-width: 32rem;
  margin: 0 auto 1.75rem;
}

/* ---------- Related ---------- */

.related h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.related a {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}

.related a:hover {
  border-color: #bfdbfe;
  color: var(--blue);
}

.updated {
  font-size: 0.8125rem;
  color: var(--faint);
  font-weight: 500;
  margin-top: 2rem;
}

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

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line-soft);
  padding: 2.5rem 0;
}

.site-footer p {
  margin: 0 0 0.625rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.site-footer nav a {
  color: var(--faint);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--blue);
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .wrap {
    padding: 0 1.5rem;
  }

  .band {
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero .lead {
    font-size: 1.1875rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta {
    padding: 3.5rem;
  }

  .site-header .btn {
    padding: 0.75rem 1.375rem;
    font-size: 0.8125rem;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
  }

  .hero h1 {
    font-size: 3.125rem;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }

  .phone {
    max-width: 19rem;
  }

  .related ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
