:root {
  --bg: #f6f2ea;
  --bg-soft: #ece5d8;
  --surface: #fffdf8;
  --surface-soft: #f4efe6;
  --text: #151515;
  --muted: #6d675e;
  --line: #ded6c7;
  --line-strong: #cbbfad;
  --brand: #8b5e3c;
  --brand-soft: #efe2d2;
  --brand-deep: #5f4129;
  --shadow: 0 22px 60px rgba(39, 31, 24, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top center, rgba(139, 94, 60, 0.08), transparent 36%),
    linear-gradient(180deg, #fbf8f2 0%, #f3eee6 100%);
}

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

.site-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.hero {
  padding: 10px 0 24px;
}

.page-hero {
  min-height: auto;
  padding-bottom: 8px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 252, 245, 0.9);
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #b4825b);
  box-shadow: 0 0 0 6px rgba(139, 94, 60, 0.1);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.hero-copy {
  padding: 26px 0 8px;
}

.page-hero-copy {
  padding-bottom: 0;
  max-width: 860px;
}

.page-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: fit-content;
  min-width: min(100%, 520px);
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.9);
}

.page-switch-current,
.page-switch-next {
  font-size: 0.92rem;
  font-weight: 700;
}

.page-switch-current {
  color: var(--muted);
}

.page-switch-next {
  color: var(--brand-deep);
  transition: transform 180ms ease, opacity 180ms ease;
}

.page-switch-next:hover {
  transform: translateX(4px);
}

.page-hero-copy .eyebrow {
  margin-bottom: 8px;
}

.page-hero-copy .intro {
  max-width: 56ch;
  margin: 0;
  font-size: 1rem;
  line-height: 1.72;
}

.page-hero-copy .hero-actions {
  margin: 22px 0 8px;
}

.page-hero-copy .button {
  min-width: 136px;
  padding: 12px 18px;
}

.eyebrow,
.section-kicker,
.panel-label,
.card-tag,
.contact-label {
  margin: 0;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro,
.section-copy,
.featured-card p,
.tool-card p,
.contact-card,
.category-card p {
  color: var(--muted);
  line-height: 1.78;
}

.intro {
  max-width: 46ch;
  margin: 0;
  font-size: 1rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 152px;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.card-link:hover,
.tool-link:hover,
.category-card:hover,
.contact-card:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--text), #3a342f);
  box-shadow: 0 16px 32px rgba(21, 21, 21, 0.14);
}

.button-secondary {
  background: rgba(255, 252, 245, 0.82);
  border: 1px solid var(--line);
}

.search-card,
.featured-card,
.category-card,
.tool-card,
.contact-card,
.section {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 252, 247, 0.84);
  box-shadow: var(--shadow);
}

.search-card {
  max-width: 700px;
  padding: 14px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
}

.search-icon {
  font-size: 1.15rem;
}

.search-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #3e6bc0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.search-clear.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.search-clear:hover {
  transform: scale(1.06);
  background: rgba(62, 107, 192, 0.08);
}

.search-feedback {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.search-results {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.search-result-link,
.search-result-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.92);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-result-link {
  gap: 10px;
}

.search-result-copy {
  display: grid;
  gap: 2px;
}

.search-result-title {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.search-result-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.search-result-button {
  font-family: inherit;
  cursor: pointer;
}

.search-result-link:hover,
.search-result-button:hover {
  transform: translateY(-2px);
}

.tool-card.search-focus {
  border-color: rgba(139, 94, 60, 0.24);
  box-shadow: 0 24px 54px rgba(39, 31, 24, 0.11);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.quick-tag {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.page-search-card {
  max-width: 720px;
  margin-top: 12px;
}

[data-search-item].is-hidden {
  display: none;
}

.featured-card:hover,
.tool-card:hover,
.search-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 94, 60, 0.16);
  box-shadow: 0 24px 54px rgba(39, 31, 24, 0.09);
}

main {
  display: grid;
  gap: 22px;
}

.section {
  padding: 30px;
}

.section-heading {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.section-heading.compact {
  display: flex;
}

.featured-grid,
.category-grid,
.tool-grid,
.contact-grid {
  display: grid;
  gap: 16px;
}

.featured-grid {
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
}

.featured-card {
  padding: 26px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.featured-card h3,
.tool-card h3 {
  margin: 12px 0 10px;
  font-size: 1.45rem;
}

.featured-dark {
  color: #eff4ff;
  background: linear-gradient(160deg, #1a4fff 0%, #10319d 100%);
  border-color: transparent;
}

.featured-dark p,
.featured-dark .card-tag {
  color: rgba(239, 244, 255, 0.86);
}

.featured-light {
  background: linear-gradient(180deg, #fffef9 0%, #fff4d6 100%);
}

.featured-accent {
  background: linear-gradient(180deg, #eff8ff 0%, #dbeafe 100%);
}

.card-actions,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.card-link,
.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.card-link {
  background: rgba(255, 255, 255, 0.18);
}

.featured-light .card-link,
.featured-accent .card-link {
  background: rgba(16, 24, 40, 0.08);
}

.card-link.soft,
.tool-link.muted {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.featured-light .card-link.soft,
.featured-accent .card-link.soft,
.tool-link.muted {
  border-color: var(--line-strong);
}

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

.continue-section .category-grid {
  grid-template-columns: repeat(2, 1fr);
}

.category-card {
  display: block;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-card strong {
  display: block;
  margin-top: 18px;
  font-size: 1.18rem;
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 56px;
  padding: 8px 12px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 800;
}

.category-count {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.category-hint {
  display: inline-flex;
  margin-top: 18px;
  color: var(--brand-deep);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 180ms ease, opacity 180ms ease;
}

.category-card:hover .category-hint {
  transform: translateX(4px);
}

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

.category-grid-single {
  grid-template-columns: minmax(280px, 420px);
}

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

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

.tool-badge,
.tool-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.tool-badge {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.tool-id {
  background: var(--surface-soft);
  color: var(--muted);
}

.tool-note {
  margin-top: auto;
  font-size: 0.94rem;
}

.contact-grid {
  grid-template-columns: 1.15fr 0.9fr 1fr;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

.contact-card strong {
  font-size: clamp(1.2rem, 2.8vw, 1.8rem);
  line-height: 1.2;
}

.contact-website strong {
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.28;
  word-break: normal;
  overflow-wrap: anywhere;
}

.contact-email {
  background: linear-gradient(135deg, var(--brand), #4b7cff);
  border-color: transparent;
}

.contact-email,
.contact-email .contact-label {
  color: #f8fbff;
}

.site-footer {
  padding: 28px 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .featured-grid,
  .tool-grid,
  .category-grid-single,
  .contact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 18px, 1240px);
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 20px;
  }

  .nav-links {
    width: 100%;
  }

  .section,
  .featured-card,
  .tool-card,
  .contact-card,
  .category-card,
  .search-card {
    padding: 20px;
    border-radius: 22px;
  }

  .page-switch {
    width: 100%;
    min-width: 0;
    border-radius: 18px;
  }

  .contact-card strong {
    word-break: break-word;
  }
}
