/* Trekster landing page (design: Trekster Landing.dc.html). */

@font-face {
  font-family: 'Bebas Neue';
  src: url('/fonts/bebas-neue-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
/* Inter only downloads where Helvetica Neue isn't installed (not on Apple
   devices). */
@font-face {
  font-family: Inter;
  src: url('/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('/fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('/fonts/inter-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --sand: #e8e4d8;
  --canvas: #f2efe6;
  --sand-strong: #ddd7c4;
  --ink: #24221b;
  --stone: #565243;
  --hairline: rgba(74, 70, 56, .28);
  --moss: #3c5a3e;
  --blaze: #e8630a;
  /* Blaze is 2.7:1 on sand; this shade is 4.9:1, for text and link hovers
     on the light sections. */
  --blaze-text: #a34400;
  --hivis: #d7ff3f;
  --hivis-dark: #b8d936;
  --night: #11100c;
  --dark-muted: #a8a28d;
  --dark-border: #6b6553;
  --dark-text: #e6e1d3;

  --display: 'Bebas Neue', Impact, sans-serif;
  --body: 'Helvetica Neue', Inter, Arial, sans-serif;
  --pad: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 16px/1.5 var(--body);
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}
h1 { font-size: clamp(56px, 8vw, 104px); line-height: .92; }
h2 { font-size: clamp(40px, 5vw, 64px); line-height: 1; }
.h2-xl { font-size: clamp(48px, 7vw, 88px); line-height: .95; }
h3 { font-size: 30px; line-height: 1; }

p { text-wrap: pretty; }

a { color: var(--moss); }
a:hover { color: var(--blaze-text); }

/* Ink outline around a hi-vis ring: one of the two shows on every
   background. */
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--hivis);
  border-radius: 2px;
}

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-28 { width: 28px; height: 28px; }
.icon-20 { width: 20px; height: 20px; }

/* Layout */

.wrap {
  max-width: calc(1200px + 2 * var(--pad));
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
  align-items: center;
}

.stack { display: flex; flex-direction: column; }
.stack-16 { gap: 16px; }
.stack-20 { gap: 20px; }
.stack-24 { gap: 24px; }

.section { padding-top: 88px; padding-bottom: 88px; }

.band-night { background: var(--night); color: var(--dark-text); }
.band-ink { background: var(--ink); color: var(--dark-text); }

.rule { display: block; width: 48px; height: 6px; }
.rule-blaze { background: var(--blaze); }
.rule-hivis { background: var(--hivis); }

.label {
  font: 600 12px/1.2 var(--body);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.label-blaze { color: var(--blaze-text); }
.label-hivis { color: var(--hivis-dark); }

.lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--stone);
  max-width: 460px;
}
.band .lead { color: var(--dark-muted); }

.phone { display: flex; justify-content: center; }
/* The images include the iPhone frame; the shadow is the design's
   (0 40px 80px at the page's .78 scale), drawn here so it costs no bytes. */
.phone img {
  display: block;
  width: 332px;
  max-width: 100%;
  height: auto;
  border-radius: 13.9% / 6.6%;
  box-shadow: 0 31px 62px rgba(0, 0, 0, .18);
}

/* Header */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.brand {
  font: 400 32px/1 var(--display);
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-small { font-size: 24px; }

.btn {
  font: 700 12px/1 var(--body);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--canvas);
}
.btn:hover { color: var(--ink); background: var(--sand-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: 3px 3px 0 var(--ink), 0 0 0 3px var(--hivis); border-radius: 4px; }

/* Store badges. Apple asks for clear space of a quarter of the badge's
   height around it: 14px at 56px. */

.stores { display: flex; flex-wrap: wrap; gap: 16px; }
.badge { display: block; border-radius: 8px; }
.badge img { display: block; height: 56px; width: auto; }
.badge:active { transform: translateY(1px); }
.soon { font-weight: 600; }

/* Hero */

.hero { padding-top: 24px; padding-bottom: 72px; }

/* Features */

.features {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 88px;
  padding-bottom: 88px;
}
.features-head { max-width: 640px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  border-top: 1px solid var(--dark-text);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 28px 8px 0;
}
.feature svg { color: var(--hivis-dark); }
.feature p { font-size: 16px; line-height: 1.55; color: var(--dark-muted); }

/* Hazards: the text comes first, so it leads on phones; side by side, the
   phone goes on the left. Two columns fit from 966px (2 × 420 + 48 plus
   the side padding). */

@media (min-width: 966px) {
  .hazards .phone { order: -1; }
}

/* Offline */

.offline { padding-top: 96px; padding-bottom: 96px; }
.offline .lead { max-width: 480px; }

/* Icon lists */

.perks { list-style: none; padding: 0; display: flex; flex-direction: column; }
.perks li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  font-size: 15px;
  line-height: 1.5;
}
.perks svg { margin-top: 2px; }
.perks strong { display: block; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }

.perks-dark { max-width: 480px; border-top: 1px solid var(--dark-text); color: var(--dark-muted); }
.perks-dark li { border-bottom: 1px solid var(--dark-border); }
.perks-dark svg { color: var(--hivis); }
.perks-dark strong { color: var(--dark-text); }

.perks-light { max-width: 460px; border-top: 2px solid var(--ink); color: var(--stone); }
.perks-light li { border-bottom: 1px solid var(--hairline); }
.perks-light svg { color: var(--moss); }
.perks-light strong { color: var(--ink); }

/* Download */

.download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding-top: 96px;
  padding-bottom: 72px;
}
.download h2 { max-width: 820px; }
.download .lead { max-width: 520px; }

/* Footer */

.site-footer { border-top: 2px solid var(--ink); }
.site-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 13px; font-weight: 600; }
.site-footer-brand { display: flex; flex-direction: column; gap: 6px; }
.copyright { font-size: 13px; color: var(--stone); }

/* Privacy, Terms and Support */

.page { padding-top: 24px; padding-bottom: 96px; }

.page-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 760px;
  margin-bottom: 24px;
}
.page-head h1 { font-size: clamp(48px, 7vw, 88px); line-height: .95; }
.page-head .lead { max-width: 640px; }
.page-head .label { color: var(--stone); }

.prose { max-width: 680px; font-size: 17px; line-height: 1.6; color: var(--stone); }
.prose h2 { font-size: clamp(32px, 4vw, 40px); line-height: 1; color: var(--ink); margin: 56px 0 16px; }
.prose h3 {
  font: 600 17px/1.4 var(--body);
  color: var(--ink);
  margin: 32px 0 8px;
}
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
/* Room above a heading reached by a link like /support#delete-account. */
.prose [id] { scroll-margin-top: 24px; }

/* Wording still to be confirmed. build.mjs refuses to deploy a page that
   has any. */
mark.todo { background: var(--hivis); color: var(--ink); padding: 0 2px; }

/* 404 */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 96px;
}

/* Scroll reveal: reveal.js adds .reveal, so without JavaScript nothing is
   hidden. */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .btn:active, .badge:active { transform: none; }
}
