/* stageclearapp.com — the only stylesheet. Every page loads this file. */

:root {
  --paper: #f5f4f0;   /* page background */
  --ink:   #161616;   /* text */
  --muted: #5c5b57;   /* secondary text */
  --rule:  #d8d6cf;   /* thin lines */
  --link:  #0E5FD8;   /* links, and nothing else; same blue as the mark */

  --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter-left:  clamp(1.25rem, 8vw, 10rem);
  --gutter-right: 1.25rem;
  --column:  42rem;   /* the single column */
  --measure: 60ch;    /* longest line of running text */
}

html {
  font-size: 106.25%;                 /* 17px */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (min-width: 48em) {
  html { font-size: 112.5%; }         /* 18px */
}

body {
  margin: 0;
  padding: 0 var(--gutter-right) 0 var(--gutter-left);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-wrap: break-word;
}

body > * { max-width: var(--column); }

/* Links */

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
  padding-top: 1.75rem;
  font-size: 0.9375rem;
}

.site-header a {
  color: var(--muted);
  text-decoration: none;
}

.site-header .brand {
  color: var(--ink);
  font-weight: 600;
}

.site-header a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-header a[aria-current="page"] { color: var(--ink); }

/* Headings and running text */

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: var(--measure);
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.5rem); }

.home h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.125rem);
  display: flex;
  align-items: center;
  gap: 0.35em;
}

.home h1 .mark {
  width: 0.85em;
  height: 0.85em;
  flex: none;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal h2 { font-size: 1.25rem; }

main { padding-top: 3.5rem; }

@media (min-width: 48em) {
  main { padding-top: 5rem; }
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.5rem);
  line-height: 1.3;
  margin: 0.75rem 0 0;
}

p {
  margin: 0 0 1.2rem;
  max-width: var(--measure);
}

h1 + p { margin-top: 1.75rem; }

.lede + p { margin-top: 2.5rem; }

.block { margin-top: 3.5rem; }

.legal .block { margin-top: 2.5rem; }

/* Inline list of links: "View on the App Store · cleanxapp.com" */

ul.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

ul.links li:not(:last-child)::after {
  content: "\00B7";
  margin: 0 0.6rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  margin-top: 5.5rem;
  padding: 1.75rem 0 3.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  max-width: none;
}

.site-footer .name {
  color: var(--ink);
  font-weight: 600;
}

.site-footer dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 1.5rem;
  row-gap: 0.4rem;
  margin: 1.25rem 0;
}

.site-footer dt,
.site-footer dd { margin: 0; }

.site-footer dd { color: var(--ink); }

@media (max-width: 36em) {
  .site-footer dl {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }
  .site-footer dt { margin-top: 0.75rem; }
  .site-footer dt:first-child { margin-top: 0; }
}

/* Keeps a product name from breaking at its hyphen */

.nobr { white-space: nowrap; }

/* Company mark in the header */

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header .mark {
  width: 1.35em;
  height: 1.35em;
  flex: none;
}

/* Product entry: real App Store icon beside the name */

.product h2 {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.app-icon {
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
  border-radius: 22.5%;             /* iOS icon shape */
  box-shadow: 0 0 0 1px var(--rule);
}
