:root {
  color-scheme: dark;
  --bg: #0b1020;
  --card: #141b2e;
  --fg: #e7ecf5;
  --muted: #8b97ad;
  --accent: #f6821f; /* Cloudflare orange */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2340, var(--bg));
  color: var(--fg);
}

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 24px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.02em;
}

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

.tagline {
  margin: 12px auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.gallery figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid #24304d;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
}

.gallery figcaption {
  padding: 14px 16px 18px;
}

.gallery figcaption strong {
  display: block;
  font-size: 1.05rem;
}

.gallery figcaption span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.transforms {
  margin-top: 64px;
}

.transforms h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

.section-note {
  max-width: 62ch;
  margin: 0 auto 28px;
  text-align: center;
  color: var(--muted);
}

.section-note code {
  background: #0c1226;
  color: var(--fg);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.85em;
}

.variations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.variations figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid #24304d;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
}

.variations img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.variations figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.variations figcaption code {
  background: #0c1226;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Format cards: stack title / code / measured size. */
.variations.formats figcaption.fmt {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.variations.formats .size {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.variations.formats .size:empty::before {
  content: "measuring…";
  color: var(--muted);
}

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px 56px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

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