
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --background: #111310;
  --surface: #191c17;
  --surface-hover: #23271f;
  --text: #f1f2e9;
  --muted: #92988b;
  --accent: #d7ff55;
  --border: #30352b;
  --font-main: 'Space Grotesk', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, #22291b 0%, transparent 42%),
    var(--background);
  color: var(--text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.page-shell {
  width: min(100% - 64px, 1240px);
  margin-inline: auto;
}

/* Header */

.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: -2px;
}

.brand-mark span {
  margin-left: -2px;
}

.brand-dot,
.results-topline h2 span {
  color: var(--accent);
}

.header-note,
.header-link,
.eyebrow,
.popular-label,
.section-kicker,
.result-count,
.empty-index,
.site-footer > p {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px #d7ff5570;
}

.header-link {
  color: var(--text);
}

.header-link span {
  color: var(--accent);
  font-size: 16px;
  margin-left: 5px;
}

/* Hero */

.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 94px 0 84px;
  text-align: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.eyebrow-line {
  width: 24px;
  height: 1px;
  background: var(--accent);
}

h1 {
  margin: 25px 0 18px;
  font-size: clamp(52px, 8vw, 94px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -6px;
}

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

.hero-description {
  max-width: 440px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

/* Search form */

.search-form {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 620px;
  min-height: 68px;
  margin: 0 auto;
  padding: 8px 9px 8px 20px;
  background: #1a1d17;
  border: 1px solid #3b4232;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 16px 50px #00000025;
}

.search-icon {
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.search-form input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 14px;
}

.search-form input::placeholder {
  color: #777e70;
}

.search-form input:focus-visible {
  outline: none;
}

.search-form:focus-within {
  border-color: var(--accent);
}

.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  flex-shrink: 0;
  min-height: 48px;
  padding: 0 19px;
  color: #15180f;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.search-form button:hover {
  background: #e5ff8d;
  transform: translateY(-1px);
}

.popular-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.popular-label {
  margin-right: 5px;
  color: #777e70;
  font-size: 9px;
}

.topic-chip {
  padding: 8px 12px;
  color: #b7bdad;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  cursor: default;
  transition: color 160ms ease, border-color 160ms ease,
    background 160ms ease;
}

.topic-chip:hover {
  color: var(--accent);
  border-color: #78894b;
  background: #d7ff550a;
}

/* Results area */

.results-section {
  padding: 28px 0 80px;
  border-top: 1px solid var(--border);
}

.results-topline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-kicker {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 9px;
}

.results-topline h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  letter-spacing: -1px;
}

.result-count {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 9px;
}

/* Original empty state */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 35px 20px;
  overflow: hidden;
  background:
    linear-gradient(#ffffff04 1px, transparent 1px),
    linear-gradient(90deg, #ffffff04 1px, transparent 1px),
    #151713;
  background-size: 32px 32px;
  border: 1px solid var(--border);
  border-radius: 15px;
  text-align: center;
}

.empty-art {
  position: relative;
  width: 112px;
  height: 94px;
  margin-bottom: 22px;
}

.art-frame {
  position: absolute;
  display: block;
  width: 64px;
  height: 78px;
  border: 1px solid #64704c;
  border-radius: 5px;
  transform: rotate(-12deg);
}

.frame-one {
  top: 5px;
  left: 12px;
}

.frame-two {
  top: 9px;
  left: 34px;
  background: #22291b;
  transform: rotate(10deg);
}

.art-sun {
  position: absolute;
  top: 26px;
  left: 56px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
}

.art-mountain {
  position: absolute;
  bottom: 18px;
  display: block;
  width: 0;
  height: 0;
  border-right: 27px solid transparent;
  border-bottom: 34px solid #65794a;
  border-left: 27px solid transparent;
}

.mountain-one {
  left: 21px;
}

.mountain-two {
  left: 46px;
  border-right-width: 22px;
  border-bottom-color: #35442a;
  border-left-width: 22px;
}

.art-star {
  position: absolute;
  top: 0;
  right: 2px;
  color: var(--accent);
  font-size: 21px;
}

.empty-index {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 9px;
}

.empty-state h3 {
  margin: 0;
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -1.3px;
}

.empty-description {
  max-width: 340px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Part 2 will populate this grid. It must remain empty in Part 1. */

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* Footer */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  border-top: 1px solid var(--border);
}

.footer-brand {
  font-size: 11px;
}

.footer-brand .brand-mark {
  width: 29px;
  height: 29px;
  font-size: 10px;
}

.site-footer > p {
  color: #777e70;
  font-size: 9px;
}

/* Accessibility */

.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;
}

/* Responsive layout */

@media (max-width: 650px) {
  .page-shell {
    width: min(100% - 32px, 1240px);
  }

  .site-header {
    min-height: 70px;
  }

  .header-note {
    display: none;
  }

  h1 {
    letter-spacing: -3px;
  }

  .hero {
    padding: 70px 0 60px;
  }

  .hero-description {
    font-size: 14px;
  }

  .search-form {
    gap: 9px;
    padding-left: 13px;
  }

  .search-form button {
    gap: 8px;
    padding: 0 13px;
  }

  .popular-row {
    gap: 7px;
  }

  .popular-label {
    width: 100%;
    margin: 0 0 4px;
  }

  .results-topline {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .empty-state {
    min-height: 310px;
  }

  .site-footer {
    flex-wrap: wrap;
    padding: 20px 0;
  }

  .site-footer > p {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Part 2: fetched image cards */

.empty-state[hidden] {
  display: none;
}

.image-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.image-card:hover {
  transform: translateY(-4px);
  border-color: #78894b;
}

.image-link {
  display: block;
  overflow: hidden;
  background: #22251f;
}

.image-card img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 250ms ease;
}

.image-card:hover img {
  transform: scale(1.035);
}

.image-caption {
  padding: 13px;
}

.image-title {
  margin: 0 0 7px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.image-credit {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.source-link {
  display: inline-block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.7px;
}

.load-more-button {
  display: block;
  margin: 30px auto 0;
  padding: 14px 22px;
  color: var(--background);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.load-more-button:hover {
  background: #e5ff8d;
}

.load-more-button:disabled,
.search-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 650px) {
  .image-card img {
    height: 190px;
  }
}
