:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --line: #dce2ec;
  --text: #13161d;
  --text-secondary: #394150;
  --muted: #687386;
  --accent: #0052ff;
  --accent-hover: #0046d8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button { font: inherit; }

.page-shell {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  padding: 26px clamp(20px, 4vw, 56px);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.wordmark,
.github-link { text-decoration: none; }

.wordmark {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.github-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.github-link:hover { color: var(--accent); }
.github-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.main {
  display: grid;
  width: min(100%, 1500px);
  align-self: center;
  justify-self: center;
  padding-block: clamp(64px, 11vh, 120px);
}

.disclaimer {
  width: min(100%, 1500px);
  justify-self: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.disclaimer p { margin: 0; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(36px, 4vw, 68px);
}

h1 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(52px, 5vw, 80px);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.96;
}

h1 > span { display: block; }

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

.dek {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.45;
}

.prompt-block {
  width: min(calc(100% + 40px), 720px);
  margin-top: 34px;
}

.setup-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.seg[hidden] { display: none; }
.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 inherit;
  font-family: inherit;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-checked="true"] { background: var(--text); color: var(--bg); }
.seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.setup-hint {
  margin: 0 10px 10px;
  min-height: 1.4em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.prompt-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.prompt-card code {
  min-width: 0;
  padding: 6px 12px;
  overflow: hidden;
  color: var(--text-secondary);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #8f98a4;
  border-radius: 50%;
  background: linear-gradient(180deg, #b7bec8 0%, #d9dde3 100%);
  box-shadow:
    0 8px 13px rgba(38, 46, 59, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
  color: #303640;
  cursor: pointer;
  transition: box-shadow 160ms ease;
}

.copy-button::before {
  position: absolute;
  inset: 3px;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 46% 28%, #ffffff 0%, #f0f1f3 42%, #d9dde2 74%, #c8cdd4 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(85, 94, 107, 0.18),
    0 3px 0 #aab1bb,
    0 5px 7px rgba(44, 52, 64, 0.2);
  content: "";
  pointer-events: none;
  transform: translateY(-1px);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.copy-button:hover {
  box-shadow:
    0 8px 13px rgba(38, 46, 59, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.copy-button:hover::before,
.copy-button:active::before {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(85, 94, 107, 0.19);
}

.copy-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.copy-icon,
.check-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
  transition: transform 160ms ease;
}

.copy-button:hover .copy-icon,
.copy-button:hover .check-icon,
.copy-button:active .copy-icon,
.copy-button:active .check-icon { transform: translateY(0); }

.check-icon { display: none; }
.copy-button.copied .copy-icon { display: none; }
.copy-button.copied .check-icon { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.prompt-block > p {
  margin: 10px 10px 0;
  color: var(--muted);
  font-size: 12px;
}

.demo-frame {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(31, 43, 66, 0.12);
}

.demo-frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 8px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-frame-header a {
  color: inherit;
  text-decoration: none;
}

.demo-frame-header a:hover { color: var(--accent); }
.demo-frame-header a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.demo-video {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0b0d12;
  aspect-ratio: 16 / 9;
}

.demo-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 980px) {
  .intro { grid-template-columns: 1fr; }
  .demo-frame { width: min(100%, 760px); }
  h1 { font-size: clamp(52px, 8vw, 80px); }
}

@media (max-width: 640px) {
  .page-shell { padding: 22px 18px; }
  .main { padding-block: 58px; }
  h1 { font-size: clamp(50px, 17vw, 76px); }
  .dek { margin-top: 22px; }
  .prompt-block { width: 100%; margin-top: 28px; }
  .prompt-card { grid-template-columns: 1fr; padding: 12px; }
  .prompt-card code { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  .copy-button { width: 42px; justify-self: end; }
}

@media (min-width: 900px) {
  .hero-accent { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .copy-button { transition: none; }
}
