/* Relay — Modernist site styles.
   Tokens mirror design/HANDOFF.md and the app's ui/theme/Color.kt.
   Static light theme on purpose: the app has no dark mode, and the site matches it. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #201e1d;
  --ground: #f3f2f2;
  --surface-2: #f8f4f4;
  --surface-tint: #eae7e7;
  --accent: #ec3013;
  --accent-700: #ae1800;
  --muted: #7d7979;
  --muted-700: #605d5d;
  --faint: #9b9797;
  --divider: rgba(32, 30, 29, 0.4);
  --hairline: rgba(32, 30, 29, 0.18);

  --gutter: 32px;
  --measure: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  font-variant-ligatures: none;
}

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

a {
  color: var(--accent-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent);
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 56px 0;
  border-bottom: 2px solid var(--divider);
}

section:last-of-type {
  border-bottom: 0;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 2px solid var(--divider);
}

.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark,
.masthead nav a {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
}

.masthead nav {
  display: flex;
  gap: 20px;
}

.masthead nav a {
  color: var(--muted-700);
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  background: var(--accent);
  color: #fff;
  border-bottom: 2px solid var(--ink);
  padding: 0;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

/* The <h1> is the app name, deliberately. Google's OAuth branding verification compares the
   consent-screen app name against the homepage heading, and a tagline here reads as a
   mismatch. Keep "Relay" as the h1; the tagline lives in .hero-sub. */
.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(52px, 9vw, 92px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero .hero-sub {
  margin: 0 0 20px;
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: none;
}

.hero p {
  margin: 0;
  max-width: 30em;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.hero .kicker {
  display: block;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  background: #fff;
  flex: none;
}

.icon-tile svg {
  width: 104px;
  height: 104px;
  display: block;
}

/* ---------- headings ---------- */

.section-head {
  margin: 0 0 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--divider);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

h2.display {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 16px;
}

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

.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.45;
  max-width: 34em;
}

.muted {
  color: var(--muted-700);
}

/* ---------- feature grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 2px solid var(--divider);
  border-left: 2px solid var(--divider);
}

.grid > div {
  padding: 24px;
  border-right: 2px solid var(--divider);
  border-bottom: 2px solid var(--divider);
}

.grid p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted-700);
}

.grid .index {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* ---------- ruled list ---------- */

.ruled {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.ruled li {
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 16px;
}

.ruled li strong {
  font-weight: 800;
}

/* ---------- callout ---------- */

.callout {
  padding: 24px;
  background: var(--surface-tint);
  border-left: 4px solid var(--accent);
}

.callout p {
  font-size: 16px;
}

/* ---------- tables ---------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 520px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 13px 16px 13px 0;
  border-bottom: 1px solid var(--hairline);
}

th {
  border-bottom: 2px solid var(--divider);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-700);
}

td:last-child,
th:last-child {
  padding-right: 0;
}

/* ---------- policy document ---------- */

.doc {
  max-width: 46em;
}

.doc h2 {
  margin: 44px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--divider);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.doc h2:first-of-type {
  margin-top: 0;
}

.doc ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.doc li {
  margin-bottom: 9px;
}

.doc code {
  padding: 2px 5px;
  background: var(--surface-tint);
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 0.88em;
}

.page-title {
  margin: 0 0 6px;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.025em;
}

.updated {
  margin: 0 0 40px;
  padding-top: 12px;
  border-top: 2px solid var(--divider);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- footer ---------- */

footer {
  border-top: 2px solid var(--ink);
  padding: 32px 0 48px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  align-items: baseline;
}

footer a,
footer span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

footer span {
  color: var(--muted);
}

footer a {
  color: var(--muted-700);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .icon-tile {
    width: 116px;
    height: 116px;
  }

  .icon-tile svg {
    width: 72px;
    height: 72px;
  }

  section {
    padding: 40px 0;
  }
}
