/* =========================================================
   CREBB AI Lead Enrichment — custom styles
   Brand: forest #305041 (primary), sage #B5C7A8 (accent)
   ========================================================= */

:root {
  --forest: #305041;
  --forest-700: #274135;
  --forest-800: #1f342b;
  --forest-900: #182820;
  --sage: #b5c7a8;
  --sage-200: #d3e0c9;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* clears the sticky nav on anchor jumps */
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Nav links ---------- */
.nav-link {
  position: relative;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  border-radius: 9999px;
  background: var(--sage);
  transition: width 0.3s ease;
}
.nav-link:hover {
  color: var(--forest-700);
}
.nav-link:hover::after {
  width: 100%;
}

/* ---------- Brand logo badge ---------- */
/* Keeps the circular logo a PERFECT circle inside tight flex headers:
   flex-shrink:0 stops the container from being squashed horizontally when the
   parent flex row runs out of room, and aspect-ratio guarantees square even if
   one dimension is ever constrained. object-fit:contain protects the icon from
   distortion if the source SVG isn't perfectly square. */
.logo-badge {
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}
.logo-badge img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---------- Hero ---------- */
.hero-bg {
  background:
    radial-gradient(120% 120% at 80% -10%, rgba(181, 199, 168, 0.22) 0%, rgba(181, 199, 168, 0) 55%),
    radial-gradient(100% 120% at 0% 0%, rgba(63, 100, 80, 0.55) 0%, rgba(48, 80, 65, 0) 50%),
    linear-gradient(160deg, #274135 0%, #305041 45%, #1f342b 100%);
}

.hero-glow {
  position: absolute;
  top: -10rem;
  left: 50%;
  width: 60rem;
  max-width: 120%;
  height: 40rem;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(181, 199, 168, 0.18), rgba(181, 199, 168, 0));
  filter: blur(20px);
  pointer-events: none;
}

.text-gradient-sage {
  background: linear-gradient(100deg, #d3e0c9 0%, #b5c7a8 50%, #9bb389 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Tag / value chips ---------- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: var(--sage);
  color: var(--forest-800);
  padding: 0.1rem 0.6rem;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- How It Works: step cards ---------- */
.step-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #dde7e0;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 10px 40px -12px rgba(48, 80, 65, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -18px rgba(48, 80, 65, 0.28);
  border-color: #bcd0c2;
}
.step-num {
  position: absolute;
  top: -1rem;
  left: 2rem;
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 8px 20px -6px rgba(48, 80, 65, 0.5);
}

/* ---------- Field cards ---------- */
.field-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #dde7e0;
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 10px 40px -12px rgba(48, 80, 65, 0.14);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.field-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -18px rgba(48, 80, 65, 0.26);
}
.field-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #ebf0ea;
}
.field-icon {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
}
.field-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}
.field-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: #274135;
  line-height: 1.5;
}
.field-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  height: 0.6rem;
  width: 0.6rem;
  border-radius: 9999px;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(181, 199, 168, 0.25);
}

/* ---------- Status badges & cards ---------- */
.status-card {
  background: #ffffff;
  border: 1px solid #dde7e0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 8px 30px -14px rgba(48, 80, 65, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.status-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -18px rgba(48, 80, 65, 0.24);
}
.status-card-muted {
  background: #f6f8f4;
  border-style: dashed;
}
.status-desc {
  margin-top: 0.85rem;
  font-size: 0.925rem;
  color: #4f6244;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.badge::before {
  content: "";
  height: 0.55rem;
  width: 0.55rem;
  border-radius: 9999px;
  background: currentColor;
}
.badge-green { background: #e3f3e8; color: #1f8a4c; }
.badge-amber { background: #fdf1d8; color: #b07908; }
.badge-gray  { background: #eceef0; color: #5b6670; }
.badge-red   { background: #fbe6e6; color: #c0392b; }
.badge-blue  { background: #e2edfb; color: #2563c7; }

/* ---------- Setup steps ---------- */
.setup-step {
  display: flex;
  gap: 1.1rem;
  background: #ffffff;
  border: 1px solid #dde7e0;
  border-radius: 1.25rem;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 8px 30px -16px rgba(48, 80, 65, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.setup-step:hover {
  transform: translateY(-2px);
  border-color: #bcd0c2;
  box-shadow: 0 18px 44px -20px rgba(48, 80, 65, 0.26);
}
.setup-num {
  flex: none;
  display: inline-flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(150deg, #3f6450, #274135);
  color: #fff;
  font-weight: 800;
}
.setup-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #274135;
}
.setup-body {
  margin-top: 0.3rem;
  color: #4f6244;
  line-height: 1.6;
}
.kbd {
  display: inline-block;
  border-radius: 0.4rem;
  border: 1px solid #cdd9cf;
  background: #f1f5f2;
  padding: 0.05rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #305041;
}
.value {
  font-weight: 700;
  color: #305041;
}
.arrow {
  color: #9bb389;
  font-weight: 700;
}
.screenshot {
  margin-top: 0.75rem;
  font-style: italic;
  font-size: 0.85rem;
  color: #8aa07f;
  border-left: 3px solid #d3e0c9;
  padding-left: 0.75rem;
}

/* ---------- Code blocks ---------- */
.code-block {
  background: #1f342b;
  color: #d3e0c9;
  border-radius: 0.85rem;
  padding: 1rem 1.15rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 100%;
  /* The block scrolls on its own; long lines also wrap so the PAGE never
     scrolls horizontally on mobile. */
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  border: 1px solid #2c463a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.code-block code {
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: inherit;
  word-break: inherit;
}

/* ---------- Endpoint cards ---------- */
.endpoint-card {
  background: #ffffff;
  border: 1px solid #dde7e0;
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 10px 40px -14px rgba(48, 80, 65, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.endpoint-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 56px -20px rgba(48, 80, 65, 0.26);
}
.method-pill {
  border-radius: 9999px;
  padding: 0.2rem 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.method-post { background: #e3f3e8; color: #1f8a4c; }
.method-get  { background: #e2edfb; color: #2563c7; }

.stack-chip {
  border-radius: 9999px;
  border: 1px solid #dde7e0;
  background: #ffffff;
  padding: 0.35rem 0.85rem;
  box-shadow: 0 4px 14px -8px rgba(48, 80, 65, 0.2);
}

/* ---------- Entrance animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }
.reveal-delay-4 { animation-delay: 0.4s; }

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

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .step-card:hover,
  .field-card:hover,
  .status-card:hover,
  .setup-step:hover,
  .endpoint-card:hover {
    transform: none;
  }
  .animate-ping {
    animation: none;
  }
}

/* ---------- Responsive niceties ---------- */
@media (max-width: 768px) {
  .code-block {
    font-size: 0.75rem; /* ~12px — keeps long commands readable without overflow */
    padding: 0.85rem 0.9rem;
  }
}

@media (max-width: 480px) {
  .field-list {
    grid-template-columns: 1fr;
  }
}
