/* foundrie.dev landing — plain CSS, no build step.
   Design tokens are copied from dashboard/src/styles/globals.css (the
   dashboard's whole design system); keep the two palettes in sync by hand —
   this page deliberately has no toolchain to share them through. Fonts come
   from Google Fonts (the dashboard uses the same families via @fontsource). */

:root {
  /* Warm paper + ink + molten-copper accent: the foundry palette. */
  --paper: #f6f2ea;
  --paper-raised: #fffdf8;
  --paper-sunken: #efe9dd;
  --ink: #1c1712;
  --ink-soft: #6f6558;
  --ink-faint: #a29786;
  --line: #e1d8c8;
  --line-strong: #c9bda7;
  --ember: #b4430e;
  --ember-deep: #8a2f05;
  --ember-wash: #f7e4d9;
  /* Landing-only: light ink tones for text on the dark command plate. */
  --plate-ink: #f3ede2;
  --plate-ink-soft: #b5a894;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
  --font-mono: "Spline Sans Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Grain: the same fixed feTurbulence wash that gives the dashboard's paper
   its tooth. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--ember);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.full-stop {
  color: var(--ember);
}

main,
.topbar,
.footer {
  width: min(880px, 100% - 48px);
  margin-inline: auto;
}

/* ---- top bar ------------------------------------------------------------ */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.topbar-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---- hero ---------------------------------------------------------------- */

.hero {
  padding: 88px 0 56px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ember);
  margin: 0 0 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 560;
  font-variation-settings: "opsz" 100;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0 0 26px;
  max-width: 16ch;
}

.hero h1 em {
  font-style: italic;
  color: var(--ember);
}

.lede {
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 58ch;
  margin: 0;
}

/* ---- connect block (tabs + command plate) -------------------------------- */

.connect {
  padding: 24px 0 8px;
}

/* Radio inputs drive the CSS-only tabs; visually gone, still focusable via
   their labels. */
.connect > input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.connect-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.connect-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin: 0;
}

.agent-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-tabs label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 13px;
  cursor: pointer;
  transition:
    background 120ms ease,
    color 120ms ease;
}

.agent-tabs label:hover {
  color: var(--ink);
  background: var(--paper-sunken);
}

#agent-claude:checked ~ .connect-head .agent-tabs label[for="agent-claude"],
#agent-cursor:checked ~ .connect-head .agent-tabs label[for="agent-cursor"],
#agent-vscode:checked ~ .connect-head .agent-tabs label[for="agent-vscode"],
#agent-codex:checked ~ .connect-head .agent-tabs label[for="agent-codex"],
#agent-gemini:checked ~ .connect-head .agent-tabs label[for="agent-gemini"] {
  color: var(--paper-raised);
  background: var(--ink);
  border-color: var(--ink);
}

.agent-panel {
  display: none;
}

#agent-claude:checked ~ .agent-panel[data-agent="claude"],
#agent-cursor:checked ~ .agent-panel[data-agent="cursor"],
#agent-vscode:checked ~ .agent-panel[data-agent="vscode"],
#agent-codex:checked ~ .agent-panel[data-agent="codex"],
#agent-gemini:checked ~ .agent-panel[data-agent="gemini"] {
  display: block;
}

/* The plate: the one-liner cast as a dark ingot. */
.plate {
  position: relative;
  background: var(--ink);
  border-radius: 8px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 18px 40px -24px rgba(28, 23, 18, 0.55);
}

.plate pre {
  margin: 0;
  padding: 22px 108px 22px 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.plate code {
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--plate-ink);
  white-space: pre;
}

.plate .prompt {
  color: var(--plate-ink-soft);
  user-select: none;
}

.copy {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--plate-ink-soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  transition:
    color 120ms ease,
    border-color 120ms ease;
}

.copy:hover {
  color: var(--plate-ink);
  border-color: rgba(255, 255, 255, 0.4);
}

.copy.copied {
  color: var(--paper);
  border-color: transparent;
  background: var(--ember);
}

.plate-hint {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 12px 2px 0;
}

.plate-hint code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--paper-sunken);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
}

.connect-footnote {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin: 22px 2px 0;
}

.connect-footnote abbr {
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-faint);
}

/* ---- steps strip ---------------------------------------------------------- */

.steps {
  padding: 72px 0 24px;
}

.steps-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 550;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
}

.steps-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.steps-row li {
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}

.ordinal {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ember);
  letter-spacing: 0.08em;
}

.steps-row h3 {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 570;
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin: 10px 0 8px;
}

.steps-row p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.steps-row code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--paper-sunken);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* ---- footer ---------------------------------------------------------------- */

.footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 22px 0 40px;
}

.wordmark-small {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ---- load-in: staggered fade-up, one orchestrated moment ------------------ */

.hero > *,
.connect,
.steps,
.footer {
  animation: fade-up 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero .kicker {
  animation-delay: 0ms;
}

.hero h1 {
  animation-delay: 70ms;
}

.hero .lede {
  animation-delay: 140ms;
}

.connect {
  animation-delay: 230ms;
}

.steps {
  animation-delay: 320ms;
}

.footer {
  animation-delay: 380ms;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero > *,
  .connect,
  .steps,
  .footer {
    animation: none;
  }
}

/* ---- small screens --------------------------------------------------------- */

@media (max-width: 760px) {
  .hero {
    padding-top: 56px;
  }

  .steps-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .plate pre {
    padding-right: 24px;
    padding-top: 52px; /* clear the copy button once it can't sit beside short lines */
  }
}
