/* ============================================
   Internet Farmer's Market — Curated Directory
   ============================================ */

/* --- Color Palette --- */
:root {
  --cream:       #faf6f0;
  --parchment:   #f2ead8;
  --warm-white:  #fefcf8;
  --brown-dark:  #3d2c1e;
  --brown-mid:   #6b4f3a;
  --brown-light: #a07d5c;
  --terracotta:  #c4704b;
  --terracotta-light: #e8956e;
  --sage:        #7a9a6d;
  --sage-light:  #a3c293;
  --sage-dark:   #4e6b42;
  --ink:         #2c2420;
  --muted:       #8a7e72;
  --divider:     #d9ccb8;
  --shadow:      rgba(61, 44, 30, 0.08);
  /* Hall of Fame palette */
  --amber:        #c9922b;
  --amber-light:  #e8b84a;
  --amber-pale:   #fdf4e0;
  --amber-glow:   rgba(201, 146, 43, 0.12);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  color: var(--brown-dark);
  background-color: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(194, 112, 75, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(122, 154, 109, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(160, 125, 92, 0.04) 0%, transparent 50%);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--sage-dark);
}

img {
  max-width: 100%;
  height: auto;
}

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

/* --- Sketch Borders --- */
.sketch-border-top,
.sketch-border-bottom {
  color: var(--divider);
  line-height: 0;
}

.sketch-border-top svg,
.sketch-border-bottom svg {
  width: 100%;
  height: 12px;
  display: block;
}

/* --- Header --- */
.site-header {
  padding: 20px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brown-dark);
}

.logo-icon {
  color: var(--terracotta);
}

.logo-text {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brown-mid);
  letter-spacing: 0.02em;
}

.nav a:hover {
  color: var(--terracotta);
}

.nav-submit {
  background: var(--parchment);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px dashed var(--divider);
  transition: all 0.2s;
}

.nav-submit:hover {
  background: var(--terracotta);
  color: var(--warm-white) !important;
  border-color: var(--terracotta);
}

/* --- Hero (slim) --- */
.hero {
  padding: 50px 0 30px;
  text-align: center;
}

.hero h1 {
  font-family: 'Caveat', cursive;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 16px;
  font-weight: 700;
}

.hero-accent {
  color: var(--terracotta);
  position: relative;
}

.hero-accent::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -4px;
  right: -4px;
  height: 8px;
  background: rgba(196, 112, 75, 0.15);
  border-radius: 4px;
  transform: rotate(-0.5deg);
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--brown-mid);
  line-height: 1.75;
}

/* --- Stumble Button --- */
.stumble-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 12px 28px;
  background: var(--warm-white);
  color: var(--brown-dark);
  border: 2px dashed var(--divider);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.02em;
}

.stumble-btn:hover {
  background: var(--terracotta);
  color: var(--warm-white);
  border-color: var(--terracotta);
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
}

.stumble-btn:active {
  transform: translateY(0);
}

.stumble-icon {
  color: var(--terracotta);
  transition: color 0.25s;
}

.stumble-btn:hover .stumble-icon {
  color: var(--warm-white);
}

/* --- Section Divider --- */
.section-divider {
  text-align: center;
  padding: 10px 0;
  color: var(--divider);
}

.section-divider svg {
  width: 200px;
  height: 20px;
}

/* --- Filter Bar --- */
.filter-section {
  padding: 20px 0 10px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.filter-btn {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 7px 18px;
  background: var(--warm-white);
  color: var(--brown-mid);
  border: 1.5px dashed var(--divider);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.filter-btn:hover {
  background: var(--parchment);
  color: var(--brown-dark);
  border-color: var(--brown-light);
}

.filter-btn.active {
  background: var(--terracotta);
  color: var(--warm-white);
  border-color: var(--terracotta);
}

/* --- Site Grid --- */
.directory {
  padding: 30px 0 60px;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* --- Site Card --- */
.site-card {
  background: var(--warm-white);
  border: 2px solid var(--divider);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.site-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
}

.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

/* --- Card Thumbnail --- */
.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1.5px dashed var(--divider);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-domain {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.03em;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}

/* --- Card Body --- */
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  transition: color 0.2s;
}

.card-title:hover {
  color: var(--terracotta);
}

.card-domain {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--brown-mid);
  line-height: 1.6;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* --- Tier Badges --- */
.tier-badge {
  font-family: 'Caveat', cursive;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.02em;
}

.tier-farm-fresh {
  color: var(--terracotta);
  background: rgba(196, 112, 75, 0.1);
  border: 1px solid rgba(196, 112, 75, 0.25);
}

.tier-local-favorite {
  color: var(--sage-dark);
  background: rgba(122, 154, 109, 0.1);
  border: 1px solid rgba(122, 154, 109, 0.25);
}

.tier-market-buzz {
  color: var(--brown-light);
  background: rgba(160, 125, 92, 0.1);
  border: 1px solid rgba(160, 125, 92, 0.25);
}

/* --- Category Tag --- */
.category-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  padding: 2px 8px;
  background: var(--parchment);
  border-radius: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: var(--muted);
}

/* --- About Section --- */
.about-section {
  padding: 20px 0 60px;
}

.about-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--warm-white);
  border: 2px dashed var(--divider);
  border-radius: 18px;
  padding: 40px 36px;
  position: relative;
}

.about-card::before,
.about-card::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--brown-light);
  opacity: 0.4;
}

.about-card::before {
  top: 12px;
  left: 12px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-radius: 2px 0 0 0;
}

.about-card::after {
  bottom: 12px;
  right: 12px;
  border-bottom: 2px solid;
  border-right: 2px solid;
  border-radius: 0 0 2px 0;
}

.about-card h2 {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  margin-bottom: 14px;
  color: var(--ink);
}

.about-card p {
  color: var(--brown-mid);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-card p:last-of-type {
  margin-bottom: 24px;
}

.about-cta {
  padding-top: 16px;
  border-top: 1.5px dashed var(--divider);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-cta-text {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: var(--brown-dark);
}

.about-cta-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--terracotta);
  font-weight: 500;
}

.about-cta-link:hover {
  color: var(--sage-dark);
}

/* --- Footer --- */
.site-footer {
  padding: 28px 0;
  border-top: 1.5px dashed var(--divider);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-tagline {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
}

.footer-links a {
  color: var(--brown-mid);
}

.footer-links a:hover {
  color: var(--terracotta);
}

.footer-dot {
  color: var(--divider);
}

/* --- Detail Page --- */
.detail-page {
  padding: 30px 0 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brown-mid);
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--terracotta);
}

.detail-screenshot {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--divider);
  margin-bottom: 28px;
}

.detail-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-screenshot.detail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-header {
  margin-bottom: 20px;
}

.detail-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-domain {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.detail-dot {
  color: var(--divider);
  font-size: 0.8rem;
}

.detail-review {
  max-width: 720px;
  margin-bottom: 28px;
}

.detail-review p {
  font-size: 1.05rem;
  color: var(--brown-mid);
  line-height: 1.8;
}

.visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 14px 32px;
  background: var(--terracotta);
  color: var(--warm-white);
  border: 2px solid var(--terracotta);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.visit-btn:hover {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: var(--warm-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
}

.visit-btn:active {
  transform: translateY(0);
}

/* --- Related Sites --- */
.related-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1.5px dashed var(--divider);
}

.related-section h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Detail Not Found --- */
.detail-not-found {
  text-align: center;
  padding: 80px 20px;
}

.detail-not-found h2 {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.detail-not-found p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ============================================
   Hall of Fame
   ============================================ */

.hall-of-fame-page {
  padding: 30px 0 60px;
}

/* --- HoF Header --- */
.hof-header {
  text-align: center;
  padding: 40px 0 36px;
}

.hof-icon {
  color: var(--amber);
  margin-bottom: 12px;
  display: inline-block;
}

.hof-header h1 {
  font-family: 'Caveat', cursive;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 14px;
}

.hof-subtitle {
  max-width: 520px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: var(--brown-mid);
  line-height: 1.75;
}

/* --- HoF Grid --- */
.hof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 12px;
}

/* --- HoF Card Overrides --- */
.hof-card {
  border-color: var(--amber-light);
  background: var(--amber-pale);
}

.hof-card:hover {
  box-shadow: 0 8px 28px rgba(201, 146, 43, 0.15);
}

/* --- HoF Thumbnail Ribbon --- */
.hof-thumb {
  position: relative;
}

.hof-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--amber);
  color: var(--warm-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(201, 146, 43, 0.3);
  border: 2px solid var(--amber-pale);
}

/* --- Graduated Tier Badge --- */
.tier-graduated {
  color: var(--amber);
  background: var(--amber-glow);
  border: 1px solid rgba(201, 146, 43, 0.3);
}

/* --- HoF Graduation Date --- */
.hof-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.02em;
}

/* --- Detail Page: Graduated Banner --- */
.detail-graduated-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  background: var(--amber-pale);
  border: 2px dashed var(--amber-light);
  border-radius: 14px;
  margin-bottom: 28px;
}

.detail-graduated-banner strong {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 2px;
}

.detail-graduated-banner span {
  font-size: 0.92rem;
  color: var(--brown-mid);
  line-height: 1.6;
}

.graduated-star {
  font-size: 1.8rem;
  color: var(--amber);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.hof-inline-link {
  color: var(--amber);
  font-weight: 500;
}

.hof-inline-link:hover {
  color: var(--terracotta);
}

/* --- HoF Nav Link --- */
.nav-hof {
  position: relative;
}

.nav-hof::before {
  content: '\2733';
  font-size: 0.6rem;
  color: var(--amber);
  margin-right: 4px;
  vertical-align: 1px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .site-grid,
  .related-grid,
  .hof-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 36px 0 20px;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .site-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 420px;
    margin: 0 auto;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 420px;
    margin: 0 auto;
  }

  .about-card {
    padding: 28px 22px;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .nav {
    gap: 14px;
  }

  .detail-page {
    padding: 20px 0 40px;
  }

  .detail-screenshot {
    border-radius: 10px;
    margin-bottom: 20px;
  }

  .detail-review p {
    font-size: 0.95rem;
  }

  .visit-btn {
    font-size: 1.15rem;
    padding: 12px 26px;
  }

  .related-section {
    margin-top: 40px;
    padding-top: 28px;
  }

  .hof-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 420px;
    margin: 0 auto;
  }

  .hof-header {
    padding: 28px 0 24px;
  }

  .detail-graduated-banner {
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
  }

  .graduated-star {
    font-size: 1.4rem;
  }

  .hall-of-fame-page {
    padding: 20px 0 40px;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    flex-direction: column;
    gap: 14px;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .about-card h2 {
    font-size: 1.7rem;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    font-size: 0.95rem;
    padding: 6px 14px;
  }

  .detail-title {
    font-size: 1.8rem;
  }

  .related-section h3 {
    font-size: 1.35rem;
  }

  .hof-header h1 {
    font-size: 2rem;
  }
}
