:root {
  --bg: #f4efe6;
  --surface: rgba(255, 252, 247, 0.8);
  --surface-strong: #fffdf8;
  --text: #1d221d;
  --muted: #5b6359;
  --line: rgba(29, 34, 29, 0.1);
  --accent: #0d7a5f;
  --accent-2: #ff7a00;
  --shadow: 0 24px 60px rgba(22, 36, 29, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 999px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.18), transparent 28%),
    radial-gradient(circle at right 20%, rgba(13, 122, 95, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f2e8 0%, #f4efe6 46%, #efe7da 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 34, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 34, 29, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
}

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

.site-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar,
.hero,
.directory-section,
.featured-section,
.workflow-section,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #16a57f);
  color: #fff;
  font: 700 1.2rem "Space Grotesk", sans-serif;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong,
.topnav a,
.eyebrow,
.panel-label,
.metric,
.featured-kicker,
.workflow-card span,
.button {
  font-family: "Space Grotesk", sans-serif;
}

.brand-text strong {
  font-size: 1rem;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.9rem;
}

.topnav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
  font-weight: 500;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  padding: 36px;
  margin-bottom: 24px;
  background: linear-gradient(145deg, rgba(255, 252, 247, 0.86), rgba(250, 243, 231, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.22), transparent 70%);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(2.8rem, 8vw, 5.8rem);
}

.hero-text,
.section-text,
.panel-card p,
.featured-card p,
.workflow-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 60ch;
  margin: 20px 0 0;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #151a15, #345447);
}

.button-secondary {
  background: rgba(29, 34, 29, 0.05);
  border: 1px solid rgba(29, 34, 29, 0.1);
}

.hero-points {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-points li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.hero-panel {
  display: grid;
  gap: 16px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.panel-card,
.directory-section,
.featured-section,
.workflow-section {
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.panel-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel-card-primary {
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(13, 122, 95, 0.92), rgba(27, 40, 34, 0.96)),
    var(--surface-strong);
  color: #fff;
}

.panel-card-primary p,
.panel-card-primary .panel-label {
  color: rgba(255, 255, 255, 0.78);
}

.panel-label,
.metric-label,
.status {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.metric-label {
  color: var(--muted);
}

.directory-section,
.featured-section,
.workflow-section {
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-text {
  max-width: 54ch;
  margin: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) 1fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.searchbox {
  display: grid;
  gap: 10px;
  font-weight: 700;
}

.searchbox span {
  font-size: 0.95rem;
}

.searchbox input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
}

.searchbox input:focus {
  border-color: rgba(13, 122, 95, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 122, 95, 0.12);
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-chip {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font: 700 0.95rem "Space Grotesk", sans-serif;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  transform: translateY(-2px);
}

.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, #111611, #355548);
}

.tool-grid,
.workflow-grid,
.featured-layout {
  display: grid;
  gap: 16px;
}

.tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(29, 34, 29, 0.08);
  border-radius: 22px;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(22, 36, 29, 0.1);
}

.tool-card-top,
.tool-card-meta,
.tool-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.tool-card h3,
.featured-card h3,
.workflow-card h3 {
  margin: 0;
}

.tool-card h3 {
  font-size: 1.2rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.badge,
.status,
.tool-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
}

.badge {
  background: rgba(13, 122, 95, 0.1);
  color: var(--accent);
  font-weight: 700;
}

.status {
  background: rgba(255, 122, 0, 0.12);
  color: #b45800;
}

.status.live {
  background: rgba(13, 122, 95, 0.12);
  color: var(--accent);
}

.tool-tag {
  background: rgba(29, 34, 29, 0.06);
  color: var(--muted);
  font-size: 0.88rem;
}

.tool-link {
  font: 700 0.95rem "Space Grotesk", sans-serif;
  color: var(--text);
}

.tool-link::after {
  content: " ↗";
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(29, 34, 29, 0.15);
  border-radius: 22px;
}

.featured-layout {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.featured-card,
.workflow-card {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(29, 34, 29, 0.08);
}

.featured-main {
  background:
    linear-gradient(135deg, rgba(255, 122, 0, 0.92), rgba(76, 44, 17, 0.96)),
    rgba(255, 255, 255, 0.8);
  color: #fff;
}

.featured-main p,
.featured-main .featured-kicker {
  color: rgba(255, 255, 255, 0.82);
}

.featured-kicker {
  margin: 0 0 10px;
  color: var(--accent);
}

.workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(13, 122, 95, 0.16), rgba(255, 122, 0, 0.18));
  color: var(--text);
  font-weight: 700;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal-up 520ms ease forwards;
}

.reveal[data-delay="1"] {
  animation-delay: 90ms;
}

.reveal[data-delay="2"] {
  animation-delay: 180ms;
}

.reveal[data-delay="3"] {
  animation-delay: 270ms;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero,
  .toolbar,
  .featured-layout,
  .workflow-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .filters {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--content-width));
    padding-top: 10px;
  }

  .hero,
  .directory-section,
  .featured-section,
  .workflow-section {
    padding: 22px;
    border-radius: 24px;
  }

  .hero h1 {
    max-width: none;
  }

  .panel-grid {
    grid-template-columns: 1fr 1fr;
  }
}
