:root {
  color-scheme: light dark;

  --paper: #f4f6f5;
  --surface: #ffffff;
  --ink: #18302c;
  --muted: #55625e;
  --rule: #d6ddda;
  --headwise: #0b7a75;
  --framekeep: #5546d6;
  --on-accent: #ffffff;
  --focus: #0b7a75;

  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --column: 38rem;
  --frame: 62rem;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121817;
    --surface: #18201f;
    --ink: #e2e9e7;
    --muted: #9eaba7;
    --rule: #2c3735;
    --headwise: #4cc3ba;
    --framekeep: #a59cff;
    --on-accent: #0f1716;
    --focus: #4cc3ba;
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--serif);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
}

::selection {
  background: color-mix(in srgb, var(--headwise) 28%, transparent);
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

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

code {
  font-family: var(--mono);
  font-size: 0.84em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  overflow-wrap: anywhere;
}

.frame {
  width: min(100% - 2 * var(--gutter), var(--frame));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.9375rem/1.2 var(--sans);
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* Header */

.site-header {
  padding-block: 1.25rem;
}

.site-header .frame {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.375rem;
  color: var(--ink);
  font: 650 1.0625rem/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 1.625rem;
  height: 1.625rem;
}

.brand svg line {
  stroke: var(--headwise);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 0.9375rem/1.2 var(--sans);
}

.site-nav a {
  display: inline-block;
  padding-block: 0.625rem;
  color: var(--muted);
  text-decoration: none;
}

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

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* Home */

.hero {
  padding-top: clamp(2.75rem, 8vw, 6.5rem);
}

.hero h1 {
  max-width: 13ch;
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.625rem, 1.4rem + 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero .lede {
  max-width: 33rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* A half rest: the musical sign for silence, a block resting on a line. */
.rest {
  position: relative;
  height: 2px;
  margin: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 2.75rem);
  border: 0;
  background: var(--ink);
  overflow: visible;
}

.rest::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 2.75rem;
  height: 1.125rem;
  border-radius: 2px 2px 0 0;
  background: var(--ink);
}

.tools {
  display: grid;
  gap: 1.25rem;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

@media (min-width: 50rem) {
  .tools {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.tool {
  --accent: var(--headwise);
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: 1.125rem;
  background: var(--surface);
}

.tool--framekeep {
  --accent: var(--framekeep);
}

.tool__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.5rem;
}

.tool h2 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.tool__kind {
  margin: 0.375rem 0 0;
  color: var(--accent);
  font: 600 1rem/1.4 var(--sans);
}

.tool p {
  text-wrap: pretty;
}

.tool__about {
  margin: 1.125rem 0 0;
}

.tool__price {
  margin: 1rem 0 0;
  color: var(--muted);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: auto 0 0;
  padding: 1.75rem 0 0;
  list-style: none;
}

.store,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid transparent;
  border-radius: 0.625rem;
  font: 600 0.9375rem/1.2 var(--sans);
  text-decoration: none;
}

a.store {
  background: var(--accent);
  color: var(--on-accent);
}

a.store:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
}

/* Dashed outline = not available yet, on both store links and the Pro button. */
.store--soon,
.button:disabled {
  border: 1px dashed color-mix(in srgb, var(--muted) 60%, transparent);
  background: transparent;
  color: var(--muted);
}

/* Inner pages */

.page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 5.5rem);
}

.prose {
  max-width: var(--column);
}

.prose h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.prose .meta {
  margin: 0.875rem 0 0;
  color: var(--muted);
  font: 400 0.9375rem/1.5 var(--sans);
}

.prose .lede {
  margin: 1.25rem 0 0;
  font-size: 1.25rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.prose > .meta + p,
.prose > .lede + p {
  margin-top: 2rem;
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.prose p,
.prose ul,
.prose dl {
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.prose li::marker {
  color: var(--muted);
}

.mail {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Headwise Pro */

.price {
  margin: 2.25rem 0 0.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: 1.125rem;
  background: var(--surface);
}

.price__amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0;
}

.price__amount strong {
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.price__amount span {
  color: var(--muted);
  font: 500 1rem/1.4 var(--sans);
}

.price__launch {
  margin: 1rem 0 0;
  color: var(--headwise);
  font: 600 1rem/1.4 var(--sans);
}

.price__note {
  margin: 0.375rem 0 0;
  color: var(--muted);
  font: 400 0.9375rem/1.5 var(--sans);
}

.button {
  min-height: 3rem;
  margin-top: 1.5rem;
  padding-inline: 1.5rem;
  background: var(--headwise);
  color: var(--on-accent);
  font-size: 1rem;
  cursor: pointer;
}

a.button:hover {
  background: color-mix(in srgb, var(--headwise) 86%, var(--ink));
}

.button:disabled {
  cursor: not-allowed;
}

.features dt {
  margin-top: 1.25rem;
  font-weight: 700;
}

.features dd {
  margin: 0.25rem 0 0;
}

/* Footer */

.site-footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 400 0.9375rem/1.5 var(--sans);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding-block: 0.375rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}
