:root {
  --bg: #f4f1ea;
  --glow: #ffd8cb;
  --fg: #1a1815;
  --muted: #5f5a51;
  --faint: #8d8473;
  --line: #ddd6c8;
  --accent: #e5502c;
  /* The paper and the tray look the same in both modes, like in the app. */
  --sheet: #f4efe4;
  --ink: #2a2620;
  --rule: #cfc5b2;
  --tray: #1f1c19;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0c0b;
    --glow: #2b1610;
    --fg: #ffffff;
    --muted: #b5aea2;
    --faint: #6f685d;
    --line: #26231f;
    --accent: #ff6b45;
    --tray: #1a1816;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 25% -10%, var(--glow), transparent 70%) no-repeat, var(--bg);
  color: var(--fg);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Header */

.top { display: flex; align-items: center; gap: 10px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.top nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); }

/* Landing */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 56px 0 72px;
}

h1 {
  font-size: clamp(44px, 7.4vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 0;
}
h1 em { display: block; font-style: normal; color: var(--accent); }

.lead { color: var(--muted); font-size: 19px; max-width: 30ch; margin: 24px 0 28px; }

.price { display: flex; align-items: baseline; gap: 14px; margin: 0 0 22px; }
.price strong { font-size: 36px; letter-spacing: -0.03em; }
.price span { color: var(--muted); font-size: 15px; }

/* Apple's official badge: black in light mode, white in dark mode (see the picture source). */
.badge { display: inline-block; }
.badge img { display: block; width: auto; height: 52px; }

/* The tray: a dark panel of paper cards, drawn after the app's shelf (Sources/Klipp/Shelf/Paper.swift). */
.tray {
  display: flex;
  gap: 18px;
  padding: 26px 22px 22px;
  margin-right: -160px;
  background: var(--tray);
  border-radius: 22px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: rotate(-2deg);
  overflow: hidden;
}
.rail { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.rail span { width: 10px; height: 10px; border-radius: 50%; }
.rail span:nth-child(1) { background: #ff6b45; box-shadow: 0 0 0 3px rgba(255, 107, 69, 0.25); }
.rail span:nth-child(2) { background: #e9b949; }
.rail span:nth-child(3) { background: #5aa36a; }
.rail span:nth-child(4) { background: #5b8fd8; }
.cards { display: flex; gap: 14px; }

.card {
  flex: none;
  display: flex;
  flex-direction: column;
  width: 150px;
  height: 188px;
  background: var(--sheet);
  color: var(--ink);
  border-radius: 3px 3px 6px 6px;
  /* The row of punched holes along the top edge. */
  -webkit-mask: radial-gradient(circle 3.5px at 5px 0, transparent 3.5px, #000 3.8px) 0 0 / 10px 100% repeat-x;
  mask: radial-gradient(circle 3.5px at 5px 0, transparent 3.5px, #000 3.8px) 0 0 / 10px 100% repeat-x;
}
.card p { flex: 1; margin: 0; padding: 14px 10px 0; font-size: 10.5px; line-height: 1.45; overflow: hidden; }
.card code { font: 10px/1.45 ui-monospace, Menlo, monospace; }
.card footer {
  display: flex;
  justify-content: space-between;
  margin: 0 10px;
  padding: 7px 0 9px;
  border-top: 1px dashed var(--rule);
  font-size: 9.5px;
  color: #8d8473;
}
.card footer b { color: var(--ink); font-weight: 600; }
.swatch { display: block; height: 92px; margin-bottom: 8px; border-radius: 3px; background: #ff6b45; }
.print { display: block; margin-top: 8px; padding: 5px; background: #fffdf8; border: 1px solid #e2d8c6; border-radius: 2px; }
.print i { display: block; height: 44px; margin-bottom: 4px; background: linear-gradient(135deg, #2f5d50, #8fb59a 60%, #e9d8a6); }
.photo {
  display: block;
  position: relative;
  height: 118px;
  overflow: hidden;
  border-radius: 2px;
  background: linear-gradient(180deg, #f6c27a 0%, #ef8d5a 38%, #6c4a6e 70%, #2c2a3b 100%);
}
.photo::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -30px;
  height: 70px;
  background: #1d2a26;
  border-radius: 50% 50% 0 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.features div { padding: 28px 28px 32px 0; }
.features div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.features h2 { font-size: 17px; margin: 0 0 6px; }
.features p { color: var(--muted); font-size: 15px; margin: 0; }

.once { border-top: 1px solid var(--line); padding: 32px 0; }
.once h2 { font-size: 17px; margin: 0 0 6px; }
.once p { color: var(--muted); font-size: 15px; margin: 0; max-width: 60ch; }

/* Legal and support pages */

.prose { max-width: 680px; padding: 40px 0 64px; }
.prose h1 { font-size: clamp(40px, 7vw, 56px); margin-bottom: 8px; }
.prose .updated { color: var(--faint); font-size: 14px; margin: 0 0 32px; }
.prose h2 { font-size: 19px; margin: 32px 0 6px; }
.prose p { color: var(--muted); margin: 0 0 12px; }
.prose a { color: var(--accent); }

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  border-top: 1px solid var(--line);
  padding: 20px 0 32px;
  font-size: 13px;
  color: var(--faint);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot .end { margin-left: auto; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .top nav { gap: 14px; }
  .hero { grid-template-columns: 1fr; margin: 24px 0 48px; gap: 40px; }
  .tray { margin-right: -16px; border-radius: 22px 0 0 22px; transform: none; }
  .features { grid-template-columns: 1fr; }
  .features div, .features div + div { padding: 20px 0; border-left: 0; }
  .features div + div { border-top: 1px solid var(--line); }
  .foot .end { margin-left: 0; }
}
