:root {
  --bg: #131313;
  --line: #2a2a2a;
  --soft: #a6a6a6;
  --ink: #f4f4f4;
  --pink: #ff3d99;
  --pad: clamp(16px, 5vw, 72px);
  /* the chat's size: the app's points times k */
  --k: 1.1;
}

/* the fonts, from fonts/ (SIL Open Font License, its text beside each):
   Schibsted Grotesk for the page; Inter for the chat's words and Roboto Mono
   for its timers (digits and colon only), as stand-ins for the app's SF Pro
   and SF Mono */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 800;
  font-display: block;
}
@font-face {
  font-family: Inter;
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 400 500;
  font-display: block;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/roboto-mono-digits.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}

html.waiting body { visibility: hidden; }

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
}

.wrap {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

a { color: inherit; }

/* a word joined by a hyphen, or a line's last two words, kept whole */
.whole { white-space: nowrap; }

/* ---------- the top: the words, then the chat ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
  padding-top: clamp(48px, 8vw, 112px);
  padding-bottom: clamp(56px, 8vw, 112px);
}

h1 { margin: 0; line-height: 0; }

.brand .mark { display: block; width: auto; height: clamp(64px, 6.4vw, 92px); }

/* the tagline, a word a line */
.tag {
  margin: 36px 0 0;
  font-size: clamp(44px, 5.4vw, 80px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--pink);
}

.tag span { display: block; }

.about {
  margin: 32px 0 0;
  max-width: 32em;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--soft);
}

/* a status, not a button: outlined, so it doesn't look pressable, and
   square-cornered, so it never reads as a message bubble */
.soon {
  display: inline-block;
  margin: 32px 0 0;
  padding: 12px 20px;
  border: 1.5px solid var(--pink);
  border-radius: 12px;
  color: var(--pink);
  font-size: 17px;
  font-weight: 600;
  cursor: default;
}

/* the app's chat, measured on its screenshots: 17pt words in 40pt bubbles,
   48pt kept clear on a bubble's far side */
.chat {
  display: flex;
  flex-direction: column;
  padding: 30px 26px 22px;
  border-radius: 30px;
  background: #000;
}

.bubble {
  max-width: calc(100% - 48px * var(--k));
  padding: calc(9.15px * var(--k)) calc(15.7px * var(--k));
  border-radius: calc(19px * var(--k));
  font-family: Inter, system-ui, sans-serif;
  font-size: calc(17px * var(--k));
  line-height: calc(22px * var(--k));
  letter-spacing: -0.0216em;
}

.bubble.in { background: #2b2b2b; color: #fff; align-self: flex-start; }
.bubble.out { background: var(--pink); color: #000; align-self: flex-end; }

.timer {
  display: flex;
  align-items: center;
  gap: calc(4px * var(--k));
  height: calc(13px * var(--k));
  margin: calc(2.3px * var(--k)) calc(6px * var(--k)) calc(5.3px * var(--k));
  font-family: "Roboto Mono", monospace;
  font-size: calc(11px * var(--k));
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.018em;
  color: #999;
  align-self: flex-start;
}

.timer.mine { align-self: flex-end; }

.timer svg {
  width: calc(10px * var(--k));
  height: calc(10px * var(--k));
  overflow: visible;
}

.timer circle {
  fill: none;
  stroke: var(--pink);
  stroke-width: 2;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 5px 5px;
}

/* ---------- sections: the heading beside what it heads ---------- */

/* a rule across the top, within the page's margins */
.split,
.policy {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px clamp(40px, 6vw, 96px);
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2 * var(--pad)) 1px no-repeat;
}

.split > h2 {
  margin: 0;
  font-size: clamp(30px, 2.8vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* the points as the app's explainer sets them: on a black panel, a pink icon
   beside each title and its words */
.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px clamp(32px, 4vw, 56px);
  padding: clamp(28px, 3.4vw, 44px);
  border-radius: 30px;
  background: #000;
}

/* the card's title across the top, as in the app */
.points-title {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.point {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.point svg { width: 26px; height: 26px; margin-top: 1px; color: var(--pink); }

.icon-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-courier { fill: currentColor; }

/* "Courier": pink, as in the app, and stays pink pressed */
.point .pink { color: var(--pink); text-decoration: none; }

/* each app's section: its icon over its name, what it does beside */
.app-head { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.app-head .icon { width: 72px; height: 72px; display: block; }

/* "Tempo Messenger" on one line, as "Tempo Courier" */
.app-head h2 {
  margin: 0;
  white-space: nowrap;
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.courier-words { align-self: center; }

/* arriving from "Courier" above: the lines above and below the section draw
   themselves in pink, left to right, then fade back to the gray hairlines
   (script.js) */
#courier { position: relative; }

#courier::before,
#courier::after {
  content: "";
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  pointer-events: none;
}

#courier::before { top: -0.5px; }
/* over the next section's top line */
#courier::after { bottom: -1.5px; }

#courier.noticed::before,
#courier.noticed::after { animation: noticed 1.9s cubic-bezier(0.3, 0, 0.2, 1); }

@keyframes noticed {
  0% { transform: scaleX(0); opacity: 1; }
  45% { transform: scaleX(1); opacity: 1; }
  70% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

.courier-words p:not(.soon) {
  margin: 0;
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--soft);
}

.courier-words .soon { margin-top: 24px; }

/* filled parts, as in the app's lock.fill and camera.viewfinder */
.icon-line .solid { fill: currentColor; stroke: none; }

.point h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.point p {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--soft);
}

.mail {
  margin: 0;
  align-self: center;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.45;
  color: var(--soft);
}

/* links in the text: white among the gray, pink when pointed at or pressed */
.mail a,
.lede a,
.sections a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.mail a:active,
.lede a:active,
.sections a:active { color: var(--pink); }

@media (hover: hover) {
  .mail a:hover,
  .lede a:hover,
  .sections a:hover { color: var(--pink); }
}

.copy {
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  width: 36px;
  height: 36px;
  margin: -4px 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #777;
  cursor: pointer;
}

.copy:active { color: var(--ink); }

@media (hover: hover) {
  .copy:hover { color: var(--ink); }
}

.copy svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy .done { display: none; color: var(--pink); }
.copy.copied .idle { display: none; }
.copy.copied .done { display: block; }

/* the check says it; the note is for screen readers */
.copy-note {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 40px;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2 * var(--pad)) 1px no-repeat;
  font-size: 15px;
  color: var(--soft);
}

footer a {
  text-decoration: none;
  border-bottom: 1px solid #444;
}

/* the pages beside this one, together on the right */
.footer-links { display: flex; gap: 24px; }

footer a:active { color: var(--ink); border-bottom-color: var(--ink); }

@media (hover: hover) {
  footer a:hover { color: var(--ink); border-bottom-color: var(--ink); }
}

/* ---------- the policy pages ---------- */

.topbar { padding-top: 28px; }

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.home-link .mark { width: auto; height: 34px; display: block; }

.policy-head {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.policy-head h1 {
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.updated {
  margin: 16px 0 0;
  font-size: 15px;
  color: #8a8a8a;
}

.lede {
  max-width: 30em;
  margin: 28px 0 0;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* the intro is white already, so its links are underlined, faintly */
.lede a {
  text-decoration: underline;
  text-decoration-color: #555;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* the policy closer to the left: a narrower contents column */
.policy {
  grid-template-columns: 210px minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 56px);
}

/* the contents, kept in view beside the policy; the section being read is
   white (script.js) */
.toc-in { position: sticky; top: 32px; }

.toc-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* a thin line down the list; the section being read marks it pink */
.toc ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: #7a7a7a;
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
}

.toc a.on { color: var(--ink); border-left-color: var(--pink); }

.toc a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (hover: hover) {
  .toc a:hover { color: var(--ink); }
}

.sections { max-width: 760px; }

.sections section { scroll-margin-top: 24px; }

/* each section a row, a hairline between */
.sections section + section {
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.sections h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sections p,
.sections li {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: #c2c2c2;
}

.sections p + p,
.sections ul + p { margin-top: 16px; }

.sections ul { margin: 0; padding-left: 20px; }
.sections li + li { margin-top: 10px; }
.sections li::marker { color: var(--pink); }
.sections b { color: var(--ink); font-weight: 600; }

/* the facts a reader looks for (how long, how old, what never happens): white
   among the gray, not italic */
.sections em { font-style: normal; color: var(--ink); }

/* ---------- narrower screens ---------- */

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 380px; }
  .chat { --k: 0.95; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .policy { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .chat { --k: 1; width: 100%; max-width: 480px; }
  .split, .policy { grid-template-columns: minmax(0, 1fr); }
  /* the contents, on a phone, a list above the policy */
  .toc-in { position: static; }
  .toc ol { margin-top: 10px; }
  .toc a.on { color: #7a7a7a; border-left-color: transparent; }
}

@media (max-width: 640px) {
  .brand .mark { height: min(64px, 16vw); }
  .tag { margin-top: 28px; font-size: min(13vw, 64px); }
  .chat { padding: 24px 18px 16px; border-radius: 26px; }
  .points { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 26px 20px; border-radius: 26px; }
  .point { grid-template-columns: 24px minmax(0, 1fr); gap: 14px; }
  .app-head { flex-direction: row; align-items: center; gap: 16px; }
  .app-head .icon { width: 56px; height: 56px; }
  .point svg { width: 24px; height: 24px; }
  .point h3 { font-size: 19px; }
  .sections p, .sections li { font-size: 17px; }
  .sections section + section { margin-top: 36px; padding-top: 32px; }
}

@media (max-width: 360px) {
  .chat { --k: 0.88; padding: 20px 14px 12px; }
  .app-head h2 { font-size: 24px; }

}

/* printed or saved as a PDF: the policy alone, black on white */
@media print {
  html, body { background: #fff; color: #000; }
  .topbar, .toc, footer, .copy { display: none; }
  .wrap { max-width: none; padding: 0; }
  .policy, .split { display: block; background: none; padding: 0; }
  .policy-head { padding: 0 0 16px; }
  .policy-head h1 { font-size: 30px; }
  .lede { font-size: 15px; }
  .updated, .lede, .lede a, .sections p, .sections li, .sections b, .sections em, .sections a { color: #000; }
  .sections { max-width: none; }
  .sections h2 { font-size: 17px; margin-bottom: 6px; }
  .sections p, .sections li { font-size: 11.5pt; line-height: 1.45; }
  .sections section + section { margin-top: 14px; padding-top: 12px; border-top-color: #ccc; }
  .sections section { break-inside: avoid; }
  .sections li::marker { color: #000; }
}
