/*
 * The landing site. Colours and type are copied from the app's design tokens
 * (apps/web/src/app/globals.css) so the page and the screenshots match; keep
 * them in step by hand.
 */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/ibm-plex-sans-latin.woff2') format('woff2');
  font-weight: 100 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --line: #c9d3e0;
  --ink: #0f172a;
  --muted: #475569;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --on-primary: #ffffff;
  --focus: #1d4ed8;
  --phone-frame: #1e293b;
  --shadow: 0 8px 24px rgb(0 0 0 / 0.16);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #0b1120;
    --surface: #131c2e;
    --line: #334155;
    --ink: #f1f5f9;
    --muted: #a3b1c6;
    --primary: #60a5fa;
    --primary-hover: #93c5fd;
    --on-primary: #0b1120;
    --focus: #60a5fa;
    --shadow: 0 8px 24px rgb(0 0 0 / 0.6);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font:
    1rem/1.5 'IBM Plex Sans',
    ui-sans-serif,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
img {
  display: block;
  width: 100%;
  height: auto;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 64rem) {
  .section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}
.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}
.link {
  font-weight: 500;
  text-underline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
.skip-link:focus {
  top: 0.5rem;
}

/* Bar */
.top-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 3.5rem;
  font-size: 0.875rem;
}
.brand {
  margin-right: auto;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.brand::before {
  content: '';
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.5rem;
  background: var(--primary);
}
.bar-link {
  display: none;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.bar-link:hover {
  color: var(--ink);
}
@media (min-width: 40rem) {
  .bar-link {
    display: inline;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.25rem 1.25rem;
  border-radius: 0.1875rem;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.btn:hover {
  background: var(--primary-hover);
}
.btn-big {
  min-height: 3rem;
  padding: 0.25rem 1.5rem;
  font-size: 1rem;
}

/* Type */
h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.h2-small {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
}
.intro {
  max-width: 42rem;
  margin-top: 0.75rem;
}

/* Hero */
.hero {
  display: grid;
  align-items: center;
  gap: 3rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
}
@media (min-width: 64rem) {
  .hero {
    grid-template-columns: 1fr 1fr;
    padding-top: 5rem;
  }
}
.hero-text {
  max-width: 36rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.6;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}
.actions + .small {
  margin-top: 1rem;
}
/* The invoice with the phone in front of it, clear of the invoice's figures. */
.hero-shots {
  position: relative;
  padding-bottom: 1.5rem;
}
.hero-desk {
  width: 78%;
}
.hero-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28%;
}

/* Screenshot frames: a window or a phone. */
.shot {
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.shot.desk {
  border: 1px solid var(--line);
  border-radius: 0.25rem;
}
.shot.phone {
  border: 6px solid var(--phone-frame);
  border-radius: 1.75rem;
}

/* Walkthrough: text and picture side by side, alternating sides. */
.steps {
  display: grid;
  gap: 4rem;
  margin-top: 3rem;
}
.steps > li {
  display: grid;
  align-items: center;
  gap: 2rem;
}
.steps > li > .shot.phone {
  width: 100%;
  max-width: 16rem;
  margin: 0 auto;
}
.steps p.muted {
  max-width: 28rem;
  margin-top: 0.75rem;
  font-size: 1.125rem;
}
.step-count {
  margin-bottom: 0.25rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
}
@media (min-width: 48rem) {
  .steps > li {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
  .steps > li:nth-child(even) > :first-child {
    order: 2;
  }
}
@media (min-width: 64rem) {
  .steps {
    gap: 6rem;
  }
}

/* Lists with a tick */
.ticks {
  display: grid;
  gap: 0.5rem;
}
.ticks > li {
  position: relative;
  padding-left: 1.75rem;
}
.ticks > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1rem;
  height: 1rem;
  background: var(--primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.ticks-grid {
  margin-top: 1.5rem;
  gap: 0.75rem 2.5rem;
}
@media (min-width: 40rem) {
  .ticks-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 64rem) {
  .ticks-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Prices */
.plans {
  display: grid;
  gap: 3rem 3.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 48rem) {
  .plans {
    grid-template-columns: 1fr 1fr;
  }
}
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ink);
}
.price {
  font-size: 2.25rem;
  font-weight: 600;
}
.plan-who {
  margin: 0.75rem 0;
  font-weight: 500;
}
.plans .btn {
  margin-top: 1.5rem;
}
.addon {
  max-width: 42rem;
  margin-top: 3rem;
}
.addon strong {
  color: var(--ink);
  font-weight: 600;
}

/* Questions: the list is narrow, the heading lines up with the other sections. */
.faq-list {
  max-width: 48rem;
  margin-top: 2rem;
  border-bottom: 1px solid var(--line);
}
.faq-list details {
  border-top: 1px solid var(--line);
}
.faq-list summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.125rem;
  font-weight: 500;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: '+';
  margin-left: auto;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
}
.faq-list details p {
  padding-bottom: 1.25rem;
  color: var(--muted);
}

/* Last call and footer */
.closer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.closer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.closer-inner p {
  margin-top: 0.25rem;
}
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
/* Tall enough to tap on a phone. */
.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-underline-offset: 4px;
}
.footer a:hover {
  color: var(--ink);
}
@media (min-width: 48rem) {
  .footer nav {
    margin-left: auto;
  }
}

/* Terms and privacy: one readable column, lined up with the bar's left edge. */
.legal > * {
  max-width: 44rem;
}
.legal .updated {
  margin-top: 0.75rem;
}
.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.375rem;
}
.legal h3 {
  margin-top: 1.5rem;
  font-size: 1.125rem;
}
.legal p,
.legal ul {
  margin-top: 0.75rem;
}
.legal ul {
  padding-left: 1.25rem;
  list-style: disc;
}
.legal li + li {
  margin-top: 0.375rem;
}
.legal a {
  text-underline-offset: 3px;
}
.legal .lead {
  margin-top: 1.5rem;
  font-size: 1.125rem;
}
