:root {
  color-scheme: light;
  --bg: #f3efe8;
  --bg-deep: #e7e0d4;
  --paper: rgba(255, 251, 245, 0.9);
  --paper-strong: rgba(255, 253, 249, 0.98);
  --line: rgba(60, 50, 40, 0.1);
  --line-strong: rgba(60, 50, 40, 0.16);
  --text: #221d16;
  --muted: #6e6255;
  --accent: #274f4b;
  --accent-soft: #d8ebe6;
  --shadow: 0 24px 80px rgba(34, 29, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.76), transparent 28%),
    radial-gradient(circle at bottom right, rgba(216, 235, 230, 0.5), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  padding-bottom: 116px;
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 42px;
}

.hero-copy,
.hero-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-copy {
  padding: 34px 32px 30px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1,
.toolbox-head h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 6vw, 5.3rem);
  line-height: 0.94;
}

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

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}

.primary-link,
.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.primary-link {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #f6f3eb;
}

.primary-link:hover,
.tool-link:hover,
.tool-card-link:hover .tool-link {
  transform: translateY(-1px);
}

.hero-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.panel-stat {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-stat-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.panel-stat strong {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.panel-note {
  margin: 6px 0 0;
  font-size: 0.96rem;
}

.toolbox-head {
  margin-bottom: 26px;
}

.toolbox-head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-text {
  max-width: 58ch;
  margin: 12px 0 0;
}

.masonry {
  column-count: 3;
  column-gap: 18px;
}

.tool-card {
  break-inside: avoid;
  display: inline-flex;
  width: 100%;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.tool-card-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 28px 80px rgba(34, 29, 22, 0.12);
}

.tool-card.is-hidden {
  display: none;
}

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

.tool-badge,
.tool-index {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.tool-index {
  color: var(--muted);
  font-weight: 700;
}

.tool-card h3 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 1.55rem;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.tool-card p {
  margin: 0;
  font-size: 0.96rem;
}

.tool-link {
  align-self: flex-start;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.54);
}

.tool-points,
.tool-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-points span,
.tool-stack span {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
}

.tool-card-featured {
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(216, 235, 230, 0.52), rgba(255, 253, 249, 0.98)),
    var(--paper-strong);
}

.tool-card-accent {
  background:
    radial-gradient(circle at top right, rgba(39, 79, 75, 0.08), transparent 34%),
    var(--paper-strong);
}

.tool-card-muted {
  background:
    linear-gradient(180deg, rgba(39, 79, 75, 0.04), transparent 40%),
    var(--paper-strong);
}

.tool-card-wide h3,
.tool-card-tall h3,
.tool-card-featured h3 {
  font-size: 1.72rem;
}

.search-empty {
  margin: 18px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.84);
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.floating-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(760px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(60, 50, 40, 0.12);
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.84);
  box-shadow: 0 24px 60px rgba(34, 29, 22, 0.12);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.floating-nav-button,
.floating-search-clear {
  border: 0;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.floating-nav-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(39, 79, 75, 0.08);
  color: var(--accent);
}

.floating-nav-button:hover,
.floating-search-clear:hover {
  transform: translateY(-1px);
}

.floating-nav-button svg,
.floating-search-field svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.floating-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.floating-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
}

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

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

.floating-search-clear {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--accent);
  color: #f6f3eb;
  font: inherit;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .masonry {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 152px;
  }

  .page-shell {
    width: min(100vw - 20px, 100%);
    padding: 18px 0 42px;
  }

  .hero-copy,
  .hero-panel,
  .tool-card {
    border-radius: 22px;
  }

  .hero-copy {
    padding: 24px 20px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.4rem, 12vw, 3.8rem);
  }

  .hero-actions {
    margin-top: 22px;
  }

  .toolbox-head {
    margin-bottom: 20px;
  }

  .masonry {
    column-count: 1;
    column-gap: 0;
  }

  .tool-card {
    padding: 18px;
    margin-bottom: 14px;
  }

  .floating-nav {
    bottom: 12px;
    width: min(calc(100vw - 16px), 100%);
    padding: 8px;
    gap: 8px;
  }

  .floating-search-field {
    padding: 0 12px;
  }

  .floating-search-clear {
    padding: 0 12px;
  }
}

@media (max-width: 560px) {
  .floating-nav {
    display: grid;
    grid-template-columns: 48px 48px minmax(0, 1fr);
    align-items: stretch;
  }

  .floating-search {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
