/* Mimulus holding site (Phase 6, stage A). Colours, type and spacing come from tokens.css,
   which brand/scripts/site.py copies from brand/tokens/tokens.css. */

@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("/fonts/poppins-700.woff2") format("woff2"); }

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--mm-bg);
  color: var(--mm-fg);
  font-family: var(--mm-font);
  font-weight: var(--mm-weight-body);
  font-size: var(--mm-size-body);
  line-height: var(--mm-leading-body);
}

/* ---------- Page frame ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-8);
}

.site-header { margin-bottom: var(--space-7); }
/* Clear space: the dot's diameter (29% of the mark's height) on every side. */
.site-header a { display: inline-block; padding: 12px; margin: -12px; }
.site-header img { display: block; height: 40px; width: auto; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-weight: var(--mm-weight-heading);
  line-height: var(--mm-leading-heading);
  margin: 0 0 var(--space-5);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--mm-size-h2); }
h2 { font-size: var(--mm-size-h4); margin-top: var(--space-7); }
h3 { font-size: var(--mm-size-lead); margin-top: var(--space-6); margin-bottom: var(--space-3); }

p, ul { margin: 0 0 var(--space-4); }
strong { font-weight: var(--mm-weight-strong); }
.lead { font-size: var(--mm-size-lead); }

a { color: var(--mm-link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--mm-focus); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---------- Holding page ---------- */

.intro > * { max-width: var(--measure); }

/* Services: each bullet is the brand dot, in the strong colours in turn. */
.services { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.services li { position: relative; padding-left: 1.4em; margin-bottom: var(--space-2); }
.services li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--mm-teal);
}
.services li:nth-child(4n+2)::before { background: var(--mm-blue); }
.services li:nth-child(4n+3)::before { background: var(--mm-red); }
.services li:nth-child(4n+4)::before { background: var(--mm-green); }

.button {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--mm-accent-fill);
  color: var(--mm-on-accent);
  font-weight: var(--mm-weight-ui);
  text-decoration: none;
}
.button:hover { background: var(--mm-blue); }
.button:focus-visible { border-radius: var(--radius-pill); }

/* The close-up only shows beside the text on wide screens; its 3:4 frame is the one the rules were checked in. */
.closeup { display: none; }

/* ---------- Text pages (privacy) ---------- */

.text-page { max-width: var(--measure); }
.text-page ul { padding-left: 1.2em; }
.text-page li { margin-bottom: var(--space-2); }
.text-page h2 { padding-top: var(--space-6); border-top: var(--rule-hair) solid var(--mm-rule); }
.text-page .updated { margin-top: var(--space-7); color: var(--mm-fg-soft); }

/* ---------- Footer and band ---------- */

.site-footer {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-6);
  font-size: var(--mm-size-small);
  color: var(--mm-fg-soft);
}
.site-footer p {
  margin: 0;
  padding-top: var(--space-4);
  border-top: var(--rule-hair) solid var(--mm-rule);
  position: relative;
}
/* Dot and rule divider: a small whole dot starts the hairline. */
.site-footer p::before {
  content: ""; position: absolute; top: -4px; left: 0;
  width: 8px; height: 8px; border-radius: 50%; background: var(--mm-teal);
}
.site-footer strong { color: var(--mm-fg); font-weight: var(--mm-weight-heading); }

/* The band's frame ratio is fixed (10:1, or 5:1 on narrow screens): the device rules were checked at those ratios. */
.band { display: block; width: 100%; }
.band img { display: block; width: 100%; height: auto; }

/* ---------- Wider screens ---------- */

@media (min-width: 600px) {
  .page { padding: var(--space-7) var(--space-6) var(--space-9); }
  .site-footer { padding: 0 var(--space-6) var(--space-6); }
  .site-header img { height: 48px; }
  h1 { font-size: var(--mm-size-h1); }
  .services { columns: 2; column-gap: var(--space-7); }
  .services li { break-inside: avoid; }
}

@media (min-width: 960px) {
  .page { padding-top: var(--space-8); }
  .site-header { margin-bottom: var(--space-8); }
  .site-header img { height: 56px; }
  .home h1 { font-size: var(--mm-size-display); }
  .home .content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
    gap: var(--space-9);
    align-items: start;
  }
  .closeup { display: block; }
  .closeup img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
}

/* ---------- Error pages ---------- */

.error-code { margin-top: var(--space-6); font-size: var(--mm-size-small); color: var(--mm-fg-soft); }
