/* Terms of use (terms.html) and Privacy policy (privacy.html).
   Each section is a <details> that the browser opens and closes by itself. */

/* ---------- colours: day, then night ---------- */
:root {
  --bg: #fffbf0;
  --card: #ffffff;
  --text: #1a1714;
  --muted: #5b5045;
  --line: #e3d8c0;
  --edge: #1a1714;
  --red: #db2e27;
  --yellow: #ffd731;
  --blue: #2f8fff;
  --green: #1fb36a;
  --purple: #9542fb;
}
[data-mode="night"] {
  --bg: #14171b;
  --card: #171030;
  --text: #f0ebff;
  --muted: #b3a8d6;
  --line: #33285a;
  --edge: #f0ebff;
  --red: #ff5b52;
  --blue: #4fa6ff;
  --green: #35e08b;
  --purple: #b977ff;
}

/* ---------- page ---------- */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    17px/1.65 "Space Grotesk",
    system-ui,
    sans-serif;
}
a {
  color: inherit;
}
header > div,
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- title band: yellow by day; dark with dots and a five-colour stripe at night ---------- */
header {
  padding: 22px 0 34px;
  background: var(--yellow);
  color: #1a1714;
  border-bottom: 3px solid #1a1714;
}
[data-mode="night"] header {
  background: #140c26 radial-gradient(rgba(240, 235, 255, 0.09) 1px, transparent 1.5px) 0 0 / 18px 18px;
  color: #f0ebff;
  border-bottom: 6px solid;
  border-image: linear-gradient(
      90deg,
      var(--red) 20%,
      var(--yellow) 20% 40%,
      var(--blue) 40% 60%,
      var(--green) 60% 80%,
      var(--purple) 80%
    )
    1;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font:
    900 40px/1 "Big Shoulders Display",
    sans-serif;
  text-decoration: none;
}
/* by day an ink edge round the logo letters and big numbers, so the yellow ones show on yellow and ivory */
.logo,
.number {
  -webkit-text-stroke: 3px #1a1714;
  paint-order: stroke fill;
}
[data-mode="night"] .logo,
[data-mode="night"] .number {
  -webkit-text-stroke: 0;
}
.other-page {
  padding: 6px 12px;
  border: 2px solid;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
h1 {
  margin: 18px 0 10px;
  font:
    900 clamp(60px, 12vw, 140px) / 0.9 "Big Shoulders Display",
    sans-serif;
}
.updated {
  margin: 0;
  font-weight: 600;
}

/* ---------- sections ---------- */
.intro {
  margin: 32px 0;
  font-size: 1.1rem;
}
details {
  border-bottom: 1.5px solid var(--line);
}
details:first-of-type {
  border-top: 3px solid var(--edge);
}
/* the big numbers take the five colours in turn */
details:nth-of-type(5n + 1) {
  --colour: var(--red);
}
details:nth-of-type(5n + 2) {
  --colour: var(--yellow);
}
details:nth-of-type(5n + 3) {
  --colour: var(--blue);
}
details:nth-of-type(5n + 4) {
  --colour: var(--green);
}
details:nth-of-type(5n + 5) {
  --colour: var(--purple);
}
summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none; /* hides the browser's own triangle */
}
summary::-webkit-details-marker {
  display: none; /* the same, for Safari */
}
.number {
  width: 84px;
  flex: none;
  font:
    900 76px/0.85 "Big Shoulders Display",
    sans-serif;
  color: var(--colour);
}
summary h2 {
  flex: 1;
  margin: 0;
  font-size: 1.3rem;
}
summary:hover h2 {
  text-decoration: underline;
}
/* the yellow plus, which turns into an x while the section is open */
summary::after {
  content: "+";
  width: 38px;
  height: 38px;
  flex: none;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--yellow);
  color: #1a1714;
  font: 700 28px/34px sans-serif;
  text-align: center;
}
[data-mode="night"] summary::after {
  border-color: var(--yellow);
  background: none;
  color: var(--yellow);
}
details[open] summary::after {
  transform: rotate(45deg);
}
details > :not(summary) {
  margin: 0 0 1em 100px; /* lines the text up under the title */
  max-width: 66ch;
}

/* ---------- privacy policy: what we collect ---------- */
.collect {
  padding: 0;
  list-style: none;
  max-width: none;
}
.collect li {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1.5px dashed var(--line);
  font-size: 0.93rem;
}
.collect h3,
.collect p {
  margin: 0;
  font-size: inherit;
}
.collect b {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- contact card ---------- */
.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 40px 0 70px;
  padding: 22px 24px;
  border: 3px solid var(--edge);
  border-radius: 14px;
  background: var(--card);
}
[data-mode="night"] .contact {
  border: 1.5px solid var(--line);
}
.contact h2 {
  margin: 0;
  font-size: 1.25rem;
}
.contact p {
  margin: 0;
}
.copy {
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--red);
  color: #ffffff;
  font:
    600 1rem "Space Grotesk",
    sans-serif;
  cursor: pointer;
}
[data-mode="night"] .copy {
  color: #0b0717; /* dark text on the brighter night red */
}
.copy.copied {
  background: var(--green);
  color: #1a1714;
}

/* ---------- footer ---------- */
footer {
  padding: 22px 20px 32px;
  border-top: 1.5px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .number {
    width: 58px;
    font-size: 54px;
  }
  details > :not(summary) {
    margin-left: 0;
  }
  .collect li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
