@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/geist-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f4ef;
  --surface: #fbfbf7;
  --surface-2: #e8e8e1;
  --text: #171715;
  --muted: #666660;
  --line: #d4d4cc;
  --accent: #b83d25;
  --radius: 14px;
  --header-height: 68px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button, a { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 10;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
}

.header-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.header-link:hover { color: var(--text); }

main, footer {
  width: min(100%, 1440px);
  margin-inline: auto;
}

.results {
  padding: clamp(44px, 6vw, 84px) clamp(20px, 4vw, 64px) clamp(100px, 13vw, 188px);
}

.section-intro {
  max-width: 760px;
  margin-bottom: clamp(76px, 10vw, 140px);
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.section-intro > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
}

.project-block { scroll-margin-top: calc(var(--header-height) + 28px); }
.project-block + .project-block { margin-top: clamp(110px, 14vw, 190px); }

.project-heading {
  max-width: 720px;
  margin-bottom: 36px;
}

.project-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 680;
  letter-spacing: -0.055em;
  line-height: 1;
}

.project-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 46px);
}

.build { min-width: 0; }

.build h3 {
  margin-bottom: 14px;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 680;
  letter-spacing: -0.035em;
}

.preview-shell {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.preview-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 20%, rgba(23, 23, 21, 0.07) 45%, transparent 70%);
  background-size: 220% 100%;
}

.preview-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-shell:hover img { transform: scale(1.012); }

.preview-error {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.preview-shell.has-error img { display: none; }
.preview-shell.has-error .preview-error { display: grid; }

.text-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 4px;
}

.preview-shell:focus-visible,
.text-link:focus-visible,
.copy-button:focus-visible,
.prompt-disclosure summary:focus-visible,
.prompt-reference a:focus-visible,
.header-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.prompt-disclosure {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.prompt-disclosure summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
  list-style: none;
}

.prompt-disclosure summary::-webkit-details-marker { display: none; }

.prompt-disclosure summary::after {
  content: "+";
  margin-left: auto;
  color: var(--text);
  font-size: 21px;
  font-weight: 400;
}

.prompt-disclosure[open] summary::after { content: "−"; }
.prompt-body { padding: 0 0 24px; }

.prompt-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.copy-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

pre {
  max-height: min(65dvh, 720px);
  margin: 0;
  overflow: auto;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.prompt-reference {
  position: relative;
  z-index: 1;
  width: 160px;
  max-width: 100%;
  margin: 22px 0 0;
}

.prompt-reference-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1921 / 1069;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms ease;
  transform-origin: left top;
}

.prompt-reference-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) and (min-width: 768px) {
  .prompt-reference-preview:hover,
  .prompt-reference-preview:focus-visible {
    z-index: 2;
    transform: scale(2.5);
    box-shadow: 0 18px 48px rgba(23, 23, 21, 0.2);
  }
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 4vw, 64px) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .preview-shell:not(.is-loaded)::before { animation: shimmer 1.4s ease-in-out infinite; }
}

@keyframes shimmer {
  from { background-position: 130% 0; }
  to { background-position: -130% 0; }
}

@media (max-width: 767px) {
  :root { --header-height: 62px; }
  .site-header { padding: 10px 16px; }
  .brand span:last-child { display: none; }
  .results { padding-left: 16px; padding-right: 16px; }
  .section-intro { margin-bottom: 76px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .comparison-grid { gap: 52px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .header-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
