/* SheepAI marketing site — shared styles
   Builds on Electric Sheep tokens in colors_and_type.css.
   Density is driven by --density-mult on <html>. */

@import url("./colors_and_type.css");

:root {
  --site-max: 1200px;
  --gutter: 32px;
  --density-mult: 1;
  --section-y: calc(var(--space-24) * var(--density-mult));
  --accent: var(--voltage);
  --accent-soft: var(--voltage-soft);
  --accent-deep: var(--voltage-deep);
}

html, body { background: var(--paper); }
body {
  color: var(--ink);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}

/* Smoothing for any large midnight surface */
.surface-midnight {
  background: var(--midnight);
  color: var(--paper);
  position: relative;
  isolation: isolate;
}
.surface-midnight::before {
  content: "";
  position: absolute;
  inset: -200px -200px auto auto;
  width: 720px;
  height: 720px;
  background: var(--brand-gradient);
  filter: blur(160px);
  opacity: 0.28;
  z-index: -1;
  pointer-events: none;
}
.surface-midnight::after {
  /* gentle noise grain */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(250,247,255,0.08) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

/* ---- Layout ---- */
.shell {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section-tight { padding-top: calc(var(--section-y) * 0.6); padding-bottom: calc(var(--section-y) * 0.6); }

/* ---- Top nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 255, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out-expo), background var(--dur-base) var(--ease-out-expo);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 17px;
}
.nav-brand .nav-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--midnight);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
  flex: none;
}
.nav-brand .nav-mark::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--brand-gradient);
  opacity: 0.22;
}
.nav-brand .nav-mark svg {
  width: 18px; height: 18px;
  position: relative;
  z-index: 1;
}
.nav-brand .by {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-left: 4px;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--fg-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: color var(--dur-fast) var(--ease-out-expo), background var(--dur-fast) var(--ease-out-expo);
}
.nav-links a:hover { color: var(--ink); background: var(--slate-100); }
.nav-links a.active { color: var(--ink); }

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out-expo),
              color var(--dur-base) var(--ease-out-expo),
              border-color var(--dur-base) var(--ease-out-expo),
              transform var(--dur-fast) var(--ease-out-expo),
              box-shadow var(--dur-base) var(--ease-out-expo);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.99); }
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--slate-800); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--paper); color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--slate-50); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--slate-100); }
.btn-feature {
  background: var(--accent); color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn-feature:hover { background: var(--accent-deep); }
.btn-md { padding: 12px 20px; font-size: 15px; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: var(--radius-md); }

/* For midnight surfaces */
.surface-midnight .btn-secondary {
  background: rgba(250,247,255,0.04);
  border-color: rgba(250,247,255,0.18);
  color: var(--paper);
}
.surface-midnight .btn-secondary:hover {
  background: rgba(250,247,255,0.08);
  border-color: rgba(250,247,255,0.32);
}
.surface-midnight .btn-primary {
  background: var(--paper); color: var(--ink);
}
.surface-midnight .btn-primary:hover { background: #fff; }

/* ---- Type rhythm helpers ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.surface-midnight .eyebrow { color: rgba(250,247,255,0.65); }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.lede {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 56ch;
}
.surface-midnight .lede { color: rgba(250,247,255,0.78); }
.muted { color: var(--fg-3); }

/* ---- Section heading block ---- */
.section-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-bottom: calc(var(--space-12) * var(--density-mult));
}
.section-head h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.025em;
  margin: 0;
}
.section-head p { margin: 0; }

/* ---- Cards ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out-expo), border-color var(--dur-base) var(--ease-out-expo);
  display: flex; flex-direction: column;
  gap: 14px;
}
.card:hover { box-shadow: var(--shadow-md); }
.card.compact { padding: 20px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
}
.card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--paper-dim);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--accent);
  flex: none;
}
.card h3 {
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0;
}
.card .card-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
}

/* ---- Footer ---- */
.footer {
  margin-top: 0;
  padding: 56px 0 40px;
}
.footer-row {
  display: flex; gap: 32px; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap;
}
.footer .footer-links {
  display: flex; gap: 24px;
  font-size: 14px;
}
.footer .footer-links a {
  color: rgba(250,247,255,0.7);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out-expo);
}
.footer .footer-links a:hover { color: var(--paper); }
.footer .legal {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(250,247,255,0.12);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 12px;
  color: rgba(250,247,255,0.55);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ---- Reveal animation (intersection observer driven) ---- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.reveal.in { opacity: 1; transform: none; }

/* ---- Misc helpers ---- */
.divider {
  height: 1px; background: var(--border);
  border: 0;
}
.surface-midnight .divider { background: rgba(250,247,255,0.12); }
.surface-paper-dim { background: var(--paper-dim); }
.text-accent { color: var(--accent); }

/* Inline gradient text for hero accent word */
.grad-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Code chip used in stack section */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-2);
}
.chip-ink {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}

/* Mobile niceties */
@media (max-width: 760px) {
  :root { --gutter: 20px; --section-y: calc(var(--space-20) * var(--density-mult)); }
  .nav-links { display: none; }
}
