/* Homepage: one job. Get the prompt into the attendee's agent.
   Shares the deck's system: ink + one orange accent, Big Shoulders + Martian Mono. */

:root {
  --ink: #0c0b09;
  --paper: #f2f0ec;
  --paper-dim: #d3cfc7;
  --muted: #9a958c;
  --orange: #f7931a;
  --line: rgba(242, 240, 236, 0.16);

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --text: "Big Shoulders Text", "Arial Narrow", sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(20px, 6vw, 96px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--ink); }

body {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text); font-weight: 500; font-size: 18px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: ""; position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sun {
  position: fixed; z-index: 0; pointer-events: none;
  width: min(120vw, 1300px); aspect-ratio: 1;
  right: max(-60vw, -650px); top: max(-55vw, -560px);
  color: var(--orange); opacity: 0.3;
}

.sun svg { width: 100%; height: 100%; animation: spin 180s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.bar {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 32px var(--gutter) 0;
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}

.home {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  max-width: 1100px;
  padding: 64px var(--gutter) clamp(48px, 10vh, 120px);
}

h1 { font-family: var(--display); font-weight: 900; line-height: 0.9; }
/* Sized from the available width so each line always fits on one line */
.h-small { display: block; font-size: min(120px, calc((100vw - 2 * var(--gutter)) / 5.9)); }
.h-big { display: block; font-size: min(280px, calc((100vw - 2 * var(--gutter)) / 4.3)); color: var(--orange); }

.lede {
  max-width: 34ch; margin-top: 48px;
  font-size: clamp(22px, 2.6vw, 34px); line-height: 1.3; color: var(--paper-dim);
  text-wrap: pretty;
}

.prompt {
  display: flex; align-items: center; gap: 16px;
  max-width: 760px; margin-top: 28px; padding: 16px 16px 16px 22px;
  border: 2px solid var(--orange); border-radius: 8px;
  background: rgba(12, 11, 9, 0.7);
}

.prompt code {
  flex: 1; min-width: 0; overflow-wrap: anywhere;
  font-family: var(--mono); font-size: 16px; line-height: 1.5;
}

.prompt button {
  flex: none; min-height: 44px; padding: 0 22px;
  border: 0; border-radius: 6px;
  background: var(--orange); color: var(--ink);
  font-family: var(--mono); font-size: 15px; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer;
  transition: transform 150ms var(--ease-out);
}

.prompt button:hover { transform: translateY(-1px); }
.prompt button:active { transform: scale(0.96); }

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

.fallback { margin-top: 16px; font-size: 18px; color: var(--muted); }

.fallback .link {
  padding: 0; border: 0; background: none;
  color: var(--paper-dim); font: inherit;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange);
  cursor: pointer;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Gentle entrance; content is visible by default if animations don't run */
@media (prefers-reduced-motion: no-preference) {
  .home > * { animation: rise 700ms var(--ease-out) both; }
  .home > :nth-child(2) { animation-delay: 90ms; }
  .home > :nth-child(3) { animation-delay: 180ms; }
  .home > :nth-child(4) { animation-delay: 270ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }
}

@media (prefers-reduced-motion: reduce) {
  .sun svg { animation: none; }
}

@media (max-width: 560px) {
  .bar span:last-child { display: none; }
  .prompt { flex-direction: column; align-items: stretch; }
  .prompt button { width: 100%; }
}
