:root {
  --ink: #071612;
  --forest: #0e3d36;
  --teal: #1a6b5c;
  --mist: #e7f4ef;
  --foam: #f5fbf8;
  --lime: #c8f560;
  --lime-deep: #9ed12a;
  --sand: #d8c4a4;
  --muted: #5f746d;
  --line: rgba(7, 22, 18, 0.1);
  --shadow: 0 24px 60px rgba(7, 22, 18, 0.18);
  --radius: 18px;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--foam);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--max));
  margin: 1.25rem auto 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #f7fff9;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.brand span {
  color: var(--lime);
}

.header-meta {
  color: rgba(247, 255, 249, 0.78);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f7fff9;
  background:
    linear-gradient(180deg, rgba(7, 22, 18, 0.2) 0%, rgba(7, 22, 18, 0.55) 42%, rgba(7, 22, 18, 0.88) 100%),
    url("../img/hero-produce.jpg") center / cover no-repeat,
    linear-gradient(135deg, #0e3d36, #163a4a 55%, #1a6b5c);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, var(--foam));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 7rem 0 5.5rem;
}

.hero-brand {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.045em;
  max-width: 10ch;
  animation: rise 0.9s ease both;
}

.hero-brand em {
  font-style: italic;
  color: var(--lime);
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: rgba(247, 255, 249, 0.88);
  animation: rise 0.9s ease 0.12s both;
}

.search-shell {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
  max-width: 40rem;
  padding: 0.45rem;
  border-radius: 999px;
  background: rgba(245, 251, 248, 0.96);
  box-shadow: var(--shadow);
  animation: rise 0.9s ease 0.22s both;
}

.search-shell:focus-within {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.search-shell input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.95rem 1.15rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.search-shell input::placeholder {
  color: var(--muted);
}

.search-shell input:focus {
  outline: none;
}

.search-shell button {
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.35rem;
  background: var(--forest);
  color: #f7fff9;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.search-shell button:hover {
  background: #125247;
  transform: translateY(-1px);
}

.suggestions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  animation: rise 0.9s ease 0.32s both;
}

.chip {
  border: 1px solid rgba(247, 255, 249, 0.28);
  background: rgba(7, 22, 18, 0.28);
  color: #f7fff9;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  background: rgba(200, 245, 96, 0.18);
  border-color: var(--lime);
}

.page {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.page-header p,
.muted {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.compact-search {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(245, 251, 248, 0.92);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(7, 22, 18, 0.08);
  margin-bottom: 1.5rem;
}

.compact-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.8rem 1rem;
}

.compact-search input:focus {
  outline: none;
}

.compact-search button {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: var(--forest);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.results {
  display: grid;
  gap: 0.65rem;
}

.result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  animation: rise 0.45s ease both;
}

.result:hover {
  background: #fff;
  border-color: var(--line);
  transform: translateX(4px);
}

.result h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.result h2 mark {
  background: rgba(200, 245, 96, 0.55);
  color: inherit;
  border-radius: 3px;
  padding: 0 0.1em;
}

.result-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-side {
  text-align: right;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.92rem;
}

.empty {
  padding: 2.5rem 0;
  color: var(--muted);
}

.detail-hero {
  padding: 4.5rem 0 2rem;
  background:
    radial-gradient(circle at 12% 20%, rgba(200, 245, 96, 0.28), transparent 40%),
    radial-gradient(circle at 88% 0%, rgba(126, 214, 194, 0.25), transparent 35%),
    linear-gradient(180deg, #dff0e8, var(--foam) 70%);
}

.detail-hero .page {
  padding-top: 0;
  padding-bottom: 0;
}

.crumb {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.crumb a:hover {
  color: var(--forest);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: end;
}

.product-visual {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(14, 61, 54, 0.08);
  aspect-ratio: 4 / 3;
}

.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy {
  padding-bottom: 0.25rem;
}

.detail-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: 18ch;
}

.result-with-thumb {
  grid-template-columns: 72px 1fr auto;
  align-items: center;
}

.result-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(14, 61, 54, 0.08);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.35rem;
}

.stat {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(14, 61, 54, 0.08);
  color: var(--forest);
  font-weight: 700;
  font-size: 0.92rem;
}

.section {
  padding: 1.5rem 0 0.5rem;
}

.section h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.section > p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.analysis-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 1.5rem;
}

.analysis-list li {
  break-inside: avoid;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 560;
}

.labs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.lab {
  display: grid;
  gap: 0.85rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lab:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.lab img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.lab strong {
  font-size: 1.05rem;
}

.lab span {
  color: var(--muted);
  font-size: 0.92rem;
}

.lab .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-weight: 700;
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .page {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

.loading {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
}

.loading::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  animation: spin 0.7s linear infinite;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 1.1rem 0;
}

.topbar .brand {
  color: var(--ink);
  text-shadow: none;
}

.topbar .brand span {
  color: var(--teal);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .search-shell {
    border-radius: 22px;
    flex-direction: column;
  }

  .search-shell button,
  .compact-search button {
    width: 100%;
  }

  .analysis-list {
    columns: 1;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .result {
    grid-template-columns: 1fr;
  }

  .result-with-thumb {
    grid-template-columns: 72px 1fr;
  }

  .result-side {
    text-align: left;
  }

  .header-meta {
    display: none;
  }
}
