/* ---------------------------------------------------------
   Promptfolio — token system
   Canvas:  #15130F   Surface: #1E1B16   Surface-2: #24201A
   Line:    #34302A   Ink:     #F2EDE4   Ink-muted: #A69C8D
   Accent (site-wide, used sparingly): #E8B94B (darkroom amber)
   Each model section carries its own --m-accent / --m-accent2
--------------------------------------------------------- */

:root {
  --canvas: #15130f;
  --surface: #1e1b16;
  --surface-2: #24201a;
  --line: #35302a;
  --ink: #f2ede4;
  --ink-muted: #a69c8d;
  --gold: #e8b94b;
  --gold-soft: #f0cd7c;
  --header-bg: rgba(21, 19, 15, 0.92);
  --radius: 10px;
  --content-width: 1180px;
  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-ui: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="light"] {
  --canvas: #f7f3eb;
  --surface: #ffffff;
  --surface-2: #f0eadf;
  --line: #d8cebf;
  --ink: #26221d;
  --ink-muted: #6d6256;
  --gold: #9a6510;
  --gold-soft: #80530c;
  --header-bg: rgba(247, 243, 235, 0.92);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--content-width);
  min-width: 0;
  margin: 0 auto;
  padding: 0 28px;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.wordmark-link { color: inherit; text-decoration: none; }

.wordmark span {
  color: var(--gold);
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-menu-icon { font-size: 16px; line-height: 1; }

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  min-width: 180px;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  width: 100%;
  outline: none;
}

.search-box svg { flex-shrink: 0; color: var(--ink-muted); }

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

.category-pills { width: 100%; }

.pill {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pill:hover { color: var(--ink); border-color: var(--gold); }

.pill.active {
  color: var(--canvas);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--gold); }
.theme-toggle-icon { font-size: 15px; line-height: 1; }

/* ---------------- Hero ---------------- */

.hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.05;
  margin: 0 0 20px;
  max-width: 15ch;
}

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

.hero p {
  color: var(--ink-muted);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 0 34px;
}

/* Ticking strip: one deliberate motion moment on the page */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 48px;
  animation: scroll-left 42s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-muted);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- Model sections ---------------- */

.model-section {
  padding: 52px 0;
  border-bottom: 1px solid var(--line);
}

.model-section:last-of-type { border-bottom: none; }

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

.model-head-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.model-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--m-accent), var(--m-accent2));
  flex-shrink: 0;
  position: relative;
  top: -2px;
}

.model-head h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  margin: 0;
}

.model-maker {
  color: var(--ink-muted);
  font-size: 14px;
}

.model-count {
  color: var(--ink-muted);
  font-size: 13px;
  white-space: nowrap;
}

.model-blurb {
  color: var(--ink-muted);
  max-width: 60ch;
  margin: 6px 0 28px;
  font-size: 15px;
}

.model-rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--m-accent);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-preview {
  line-height: 0;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}

.card-preview-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-sample-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.card-body {
  padding: 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  display: inline;
  overflow-wrap: anywhere;
  margin: 0;
  font-weight: 600;
  font-size: 15.5px;
}

.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.prompt-badge {
  display: inline-block;
  margin: 0 0 0 7px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #15130f;
  background: var(--gold-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
  vertical-align: middle;
}

.tag-chip {
  font-size: 11.5px;
  color: var(--m-accent);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-text {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  overflow-wrap: anywhere;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.copy-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.copy-btn:hover { border-color: var(--gold); }

.copy-btn.copied {
  color: var(--canvas);
  background: var(--gold);
  border-color: var(--gold);
}

.copy-btn.copy-failed {
  color: #d6685f;
  border-color: #d6685f;
}

.copy-status {
  color: var(--ink-muted);
  font-size: 12px;
}

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

.no-results {
  color: var(--ink-muted);
  font-size: 15px;
  padding: 12px 0 4px;
  display: none;
}

.noscript-prompts { padding-top: 40px; padding-bottom: 12px; }
.noscript-prompts h2 { font-family: var(--font-display); }
.noscript-prompts li { margin: 8px 0; }

/* ---------------- Footer ---------------- */

.site-footer {
  padding: 40px 0 60px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--gold); }

.not-found {
  display: grid;
  min-height: 70vh;
  place-items: center;
  padding: 48px 0;
  text-align: center;
}

.not-found-content { max-width: 560px; }
.not-found-code { color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: .12em; }
.not-found h1 { font-family: var(--font-display); font-size: clamp(42px, 8vw, 72px); line-height: 1; margin: 12px 0; }
.not-found p { color: var(--ink-muted); }
.not-found-link { display: inline-block; margin-top: 18px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 640px) {
  .wrap { width: 100%; padding: 0 18px; }
  .hero { padding: 44px 0 30px; }
  .site-header .wrap { flex-wrap: wrap; justify-content: space-between; gap: 12px; }
  .mobile-menu-toggle { display: inline-flex; }
  .header-controls { display: none; flex-direction: column; align-items: stretch; justify-content: flex-start; width: 100%; }
  .header-controls.is-open { display: flex; }
  .category-pills { justify-content: flex-start; }
  .search-box { width: 100%; min-width: 0; }
  .model-head { flex-direction: column; align-items: flex-start; }
  .card-grid { grid-template-columns: 1fr; }
  .model-head-left { flex-wrap: wrap; }
  .prompt-page { padding: 36px 0 48px; }
  .prompt-box { padding: 18px; }
  .prompt-text { overflow-wrap: anywhere; }
  .site-footer { padding: 30px 0 40px; }
}
