/* Tracta site. Tokens come from design_handoff_tracta_app/README.md. */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/Archivo100-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/Archivo100-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/Archivo100-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
/* The app's condensed display cut (stretch 75%) and wide wordmark cut (stretch 112%). */
@font-face {
  font-family: 'Archivo Display';
  src: url('/assets/fonts/Archivo75-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Wordmark';
  src: url('/assets/fonts/Archivo112-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --brand: #d8613c;
  --brand-text: #b4482a;
  --brand-tint: #fbe5dc;
  --brand-on-dark: #f0a487;
  --ink: #1a1a17;
  --bg: #f2eee6;
  --surface: #ffffff;
  --fill: #e8e2d6;
  --text-2: #6b6a63;
  --on-ink-2: #bdbbb2;
  --warn-text: #8a6100;
  --warn-bg: #fbf1d6;
  --divider: rgba(26, 26, 23, 0.1);
  --gutter: 20px;
  --width: 1120px;
  --display: 'Archivo Display', 'Archivo', system-ui, sans-serif;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-text);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
}

.skip:focus {
  left: 8px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(242, 238, 230, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--divider);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Archivo Wordmark', 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.03em;
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 600;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--brand-text);
}

/* Shared pieces ------------------------------------------------------------ */

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
  padding: 10px 24px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  line-height: 1.2;
}

.store small {
  font-size: 12px;
  color: var(--on-ink-2);
}

.store strong {
  font-size: 18px;
  font-weight: 700;
}

.on-ink .store {
  background: var(--bg);
  color: var(--ink);
}

.on-ink .store small {
  color: var(--text-2);
}

.phone {
  position: relative;
  margin: 0;
  padding: 7px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(26, 26, 23, 0.22);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 37px;
}

/* The captures leave the sensor area empty, as a real iPhone shows it. */
.phone::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 50%;
  width: 28%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: var(--ink);
}

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

.hero .wrap {
  display: grid;
  gap: 48px;
  padding-block: 56px 0;
}

.hero-copy {
  padding-bottom: 8px;
}

.questions {
  list-style: none;
  padding: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 12.5vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.01em;
}

.questions li:nth-child(1) {
  color: var(--text-2);
}

.questions li:nth-child(2) {
  color: var(--ink);
}

.questions li:nth-child(3) {
  color: var(--brand-text);
}

.hero h1 {
  margin-top: 28px;
  max-width: 30em;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 400;
}

.hero h1 strong {
  font-weight: 700;
}

.hero .store {
  margin-top: 28px;
}

.hero-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-2);
}

.hero-phone {
  width: min(78%, 340px);
  margin-inline: auto;
  margin-bottom: -96px;
}

/* Questions ----------------------------------------------------------------- */

.chapter {
  padding-block: 88px;
}

.hero + .chapter {
  padding-top: 160px;
}

.chapter + .chapter {
  border-top: 1px solid var(--divider);
}

.chapter .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}

.bars {
  width: 28px;
  height: 34px;
  margin-bottom: 18px;
  fill: var(--fill);
}

.bars .on {
  fill: var(--brand);
}

.chapter h2,
.band h2,
.closing h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 8vw, 60px);
  line-height: 1;
}

.lede {
  margin-top: 16px;
  max-width: 32em;
  font-size: 19px;
  line-height: 1.45;
}

.points {
  margin-top: 24px;
  padding: 0;
  list-style: none;
  max-width: 32em;
}

.points li {
  padding-block: 12px;
  border-top: 1px solid var(--divider);
  color: var(--text-2);
  font-size: 16px;
}

.points strong {
  color: var(--ink);
  font-weight: 600;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}

.pair .phone {
  padding: 4px;
  border-radius: 28px;
}

.pair .phone img {
  border-radius: 24px;
}

.pair .phone::before {
  top: 11px;
  height: 13px;
}

.pair .phone:last-child {
  margin-top: 32px;
}

.single {
  width: min(70%, 300px);
  margin-inline: auto;
}

.single.phone {
  padding: 6px;
  border-radius: 38px;
}

.single.phone img {
  border-radius: 32px;
}

.chapter .wrap.stack {
  display: block;
}

/* Dark band ----------------------------------------------------------------- */

.band {
  background: var(--ink);
  color: var(--bg);
  padding-block: 80px;
}

.band .lede {
  color: var(--on-ink-2);
}

.band-grid {
  display: grid;
  gap: 40px;
}

.status {
  display: grid;
  gap: 10px;
  align-content: center;
  font-size: 16px;
}

.status div {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(242, 238, 230, 0.08);
}

.status strong {
  display: block;
  font-weight: 600;
}

.status span {
  color: var(--on-ink-2);
}

.status .tag {
  display: block;
  margin-bottom: 2px;
  color: var(--brand-on-dark);
  font-size: 13px;
  font-weight: 600;
}

/* Privacy ------------------------------------------------------------------- */

.promises {
  display: grid;
  gap: 12px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.promises li {
  padding: 20px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 15px;
}

.promises strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.more {
  margin-top: 24px;
  font-weight: 600;
}

/* Closing ------------------------------------------------------------------- */

.closing {
  padding-block: 88px;
  background: var(--ink);
  color: var(--bg);
  text-align: center;
}

.closing img {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 17px;
  outline: 1px solid rgba(242, 238, 230, 0.2);
}

.closing p {
  margin: 14px auto 28px;
  max-width: 28em;
  color: var(--on-ink-2);
}

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

.site-footer {
  padding-block: 32px;
  border-top: 1px solid var(--divider);
  color: var(--text-2);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
}

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

.legal {
  padding-block: 48px 72px;
}

.legal .wrap {
  max-width: 760px;
}

.legal h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(42px, 9vw, 64px);
  line-height: 1;
}

.updated {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 15px;
}

.summary {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--surface);
}

.legal .summary h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-family: inherit;
  font-weight: 700;
}

.summary ul {
  padding-left: 20px;
  font-size: 16px;
}

.summary li + li {
  margin-top: 6px;
}

.toc {
  margin-top: 32px;
  font-size: 15px;
}

.legal .toc h2 {
  margin: 0 0 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
}

.toc ol {
  padding-left: 22px;
  columns: 2 240px;
  column-gap: 24px;
}

.toc li {
  padding-block: 3px;
  break-inside: avoid;
}

.legal h2 {
  margin-top: 44px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
}

.legal h3 {
  margin-top: 24px;
  font-size: 17px;
  font-weight: 700;
}

.legal p,
.legal ul {
  margin-top: 12px;
}

.legal ul {
  padding-left: 22px;
}

.legal li + li {
  margin-top: 6px;
}

.summary ul,
.toc ol {
  margin-top: 0;
}

.data-table {
  overflow: hidden;
  margin-top: 16px;
  border-radius: 16px;
  background: var(--surface);
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  font-weight: 700;
}

.data-table tr > :first-child {
  width: 36%;
}

.data-table tbody tr,
.data-table tbody th {
  border-top: 1px solid var(--divider);
}

/* A blank the owner must fill in before publishing (see apps/web/README.md). */
.pending {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-weight: 600;
}

/* Layout -------------------------------------------------------------------- */

@media (max-width: 560px) {
  .site-nav .optional {
    display: none;
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }

  .promises {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.25fr 0.75fr;
    align-items: start;
    padding-top: 72px;
  }

  .hero-copy {
    padding-top: 28px;
  }

  .hero-phone {
    width: 100%;
    max-width: 340px;
    margin-right: 0;
  }

  .chapter .wrap,
  .band-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .chapter.flip .pair,
  .chapter.flip .single {
    order: -1;
  }

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