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

:root {
  --gold: #8B6914;
  --gold-hover: #7A5C10;
  --gold-soft: rgba(139, 105, 20, 0.06);
  --gold-line: rgba(139, 105, 20, 0.18);
  --bg: #F5F4ED;
  --bg-card: #FFFFFF;
  --bg-inset: #EDECE3;
  --text: #1F1B16;
  --text-soft: #555048;
  --text-mute: #8A857A;
  --line: rgba(139, 105, 20, 0.14);
  --line-soft: rgba(139, 105, 20, 0.08);
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { font-family: var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; }
::selection { background: var(--gold); color: #FFFFFF; }
a { color: inherit; text-decoration: none; }

.frame {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 32px 48px;
  flex: 1;
}

/* ── Header ─────────────────────────────────────────── */
.head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 56px;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--gold);
}
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* ── Env toggle ─────────────────────────────────────── */
.env {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px;
  position: relative;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.env-opt {
  position: relative;
  z-index: 1;
  padding: 6px 14px;
  border-radius: 100px;
  color: var(--text-mute);
  cursor: pointer;
  transition: color 0.2s;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.env-opt[aria-pressed="true"] { color: #FFFFFF; }
.env-knob {
  position: absolute;
  top: 3px; bottom: 3px;
  width: calc(50% - 3px);
  border-radius: 100px;
  background: var(--gold);
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 0;
}
.env[data-env="dev"] .env-knob { transform: translateX(100%); }

/* ── Hero ───────────────────────────────────────────── */
.hero { margin-bottom: 56px; }
.hero-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 5px 12px; border-radius: 100px;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 18px;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p {
  font-size: 16px; line-height: 1.7;
  color: var(--text-soft);
  max-width: 580px;
}

/* ── Cards ──────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 22px 20px;
  position: relative;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, opacity 0.2s;
}
.card:hover {
  border-color: var(--gold-line);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139, 105, 20, 0.08);
}
.card-tag {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.card-name {
  font-family: var(--serif);
  font-size: 19px; font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}
.card-name em { font-style: italic; color: var(--gold); }
.card-desc {
  font-size: 13px; line-height: 1.55;
  color: var(--text-soft);
  margin-bottom: 16px;
  min-height: 40px;
}
.card-url {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  color: var(--gold);
  display: flex; align-items: center; gap: 6px;
  word-break: break-all;
}
.card-url::after {
  content: '→';
  margin-left: auto;
  color: var(--text-mute);
  transition: transform 0.15s, color 0.15s;
}
.card:hover .card-url::after {
  color: var(--gold);
  transform: translateX(3px);
}

/* Dev-only card hidden in prod mode */
body[data-env="prod"] .card-dev-only { display: none; }

/* ── Footer ─────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line-soft);
  padding: 22px 32px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}
.foot em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0;
}

@media (max-width: 600px) {
  .frame { padding: 40px 20px 36px; }
  .head { margin-bottom: 40px; flex-direction: column; align-items: flex-start; }
  .hero { margin-bottom: 48px; }
}
