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

:root {
  --paper: #f4f1ea;
  --paper-elevated: #ebe6dc;
  --ink: #1a1a18;
  --ink-muted: #5c5a54;
  --ink-faint: #8a877e;
  --accent: #2d4a3e;
  --line: rgba(26, 26, 24, 0.12);
  --radius: 10px;
  font-size: clamp(17px, 0.45vw + 16px, 18px);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

h1,
h2,
h3,
.eyebrow,
.tagline {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin: 0 0 0.85rem;
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  margin: 0 0 0.6rem;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
}

.wrap {
  width: min(960px, 92vw);
  margin-inline: auto;
}

.eyebrow {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.65rem;
}

.tagline {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  color: var(--ink-muted);
  margin: 0 0 1.25rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-muted);
  max-width: 44ch;
}

.lede--wide {
  max-width: 56ch;
}

.muted {
  color: var(--ink-muted);
}

.divider {
  border: none;
  height: 1px;
  margin: 0;
  background: var(--line);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  font-family: "Libre Baskerville", serif;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.92rem;
}

.nav__links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.nav__links a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  display: grid;
  gap: 2.5rem;
  padding: 3rem 0 2.5rem;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
}

.hero__device {
  justify-self: center;
  width: min(280px, 80vw);
  aspect-ratio: 3 / 4;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: linear-gradient(145deg, #faf8f4 0%, #e8e4db 100%);
  box-shadow: 8px 12px 0 rgba(26, 26, 24, 0.08);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__screen {
  flex: 1;
  border: 1px dashed var(--ink-faint);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.75rem;
  font-family: "Libre Baskerville", serif;
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero__screen time {
  display: block;
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}

.hero__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section--alt {
  background: var(--paper-elevated);
  border-block: 1px solid var(--line);
}

.grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.section--alt .card {
  background: var(--paper);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Code */
pre {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  background: var(--ink);
  color: #e8e6df;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
}

p code,
li code {
  background: var(--paper-elevated);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

/* Lists */
ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.35rem;
}

/* Footer */
.footer {
  padding: 2rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--ink-muted);
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ink);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
