/* =========================================================================
   Opslife — modern theme overrides
   Layered on top of the Ananke (tachyons) theme.
   ========================================================================= */

:root {
  --brand-ink:      #111827;   /* gray-900   — primary text            */
  --brand-body:     #334155;   /* slate-700  — body copy               */
  --brand-muted:    #64748b;   /* slate-500  — meta / secondary        */
  --brand-accent:   #10b981;   /* emerald-500 — links / buttons        */
  --brand-accent-2: #059669;   /* emerald-600 — hover                  */
  --brand-bg:       #f8fafc;   /* slate-50   — page background         */
  --brand-card:     #ffffff;
  --brand-border:   #e2e8f0;   /* slate-200                            */
  --hero-grad: linear-gradient(135deg, #0b0f14 0%, #111827 45%, #1f2937 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 30px rgba(16, 185, 129, .16);
  --radius: 14px;
}

/* ---- Typography --------------------------------------------------------- */

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background-color: var(--brand-bg) !important;
  color: var(--brand-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Neutralise tachyons font-family utilities so prose/UI use Inter */
.avenir, .serif, .athelas, .sans-serif, .system-sans-serif,
.georgia, .times, .baskerville, .lucida-grande {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif !important;
  color: var(--brand-ink);
  letter-spacing: -0.01em;
}

/* Cleaner emphasis — Inter 700 reads heavy/patchy in prose, 600 is sleeker */
strong, b { font-weight: 600; }

/* Keep code in a clean monospace */
code, pre, kbd, samp, .code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace !important;
}

/* ---- Hero --------------------------------------------------------------- */

.site-hero {
  background: var(--hero-grad);
  position: relative;
  overflow: hidden;
}

/* soft glow accent in the corner for a modern feel */
.site-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 50%;
  height: 160%;
  background: radial-gradient(circle, rgba(16, 185, 129, .28) 0%, rgba(16, 185, 129, 0) 70%);
  pointer-events: none;
}

.site-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 60rem;
  margin: 0 auto;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

.site-hero__title {
  color: #ffffff !important;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin: 0;
}

.site-hero__subtitle {
  color: rgba(226, 232, 240, .9);
  font-family: 'Inter', sans-serif !important;
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.5;
  max-width: 34rem;
  margin: 1rem auto 0;
}

.site-hero--slim .site-hero__inner { display: none; }
.site-hero--slim { padding-bottom: 0; }

/* ---- Navigation --------------------------------------------------------- */

.site-hero nav a,
.site-hero nav .white-90 { color: rgba(255, 255, 255, .85) !important; }
.site-hero nav a:hover { color: #ffffff !important; }

/* ---- Body copy colour — unified across home, sections & posts ---------- */

main article.cf,
main section.cf,
main .nested-copy-line-height {
  color: var(--brand-body);
}

main h1 { font-size: 1.75rem; }

/* ---- Post summary cards ------------------------------------------------- */

.relative.w-100 > article,
article.bb {
  background: var(--brand-card);
  border: 1px solid var(--brand-border) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}

.relative.w-100 > article:hover,
article.bb:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

article.bb { border-bottom-width: 1px !important; }

.summary-with-image article h1 a,
article.bb h1 a { color: var(--brand-ink); }

/* ---- Links -------------------------------------------------------------- */

main a:not(.button):not([class*="bg-"]) { color: var(--brand-accent); }
main a:not(.button):not([class*="bg-"]):hover { color: var(--brand-accent-2); }

/* ---- Buttons (read more, all posts, contact submit) -------------------- */

a.ba.b--moon-gray,
a.bg-mid-gray,
input[type="submit"] {
  background: var(--brand-accent) !important;
  border: 0 !important;
  color: #ffffff !important;
  border-radius: 9px !important;
  font-weight: 600;
  letter-spacing: .01em;
  transition: background .15s ease, transform .15s ease;
}

a.ba.b--moon-gray:hover,
a.bg-mid-gray:hover,
input[type="submit"]:hover {
  background: var(--brand-accent-2) !important;
  transform: translateY(-1px);
}

/* ---- Contact form inputs ----------------------------------------------- */

input.bg-light-gray,
textarea.bg-light-gray {
  background: #ffffff !important;
  border: 1px solid var(--brand-border) !important;
  border-radius: 9px !important;
}

input.bg-light-gray:focus,
textarea.bg-light-gray:focus {
  outline: none;
  border-color: var(--brand-accent) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
}

/* ---- Footer ------------------------------------------------------------- */

footer.bg-black,
footer[class*="bg-"] { background: var(--brand-ink) !important; }

/* ---- AI news feed ------------------------------------------------------- */

.ai-news { margin-top: 1rem; }

.ai-news__meta {
  color: var(--brand-muted);
  margin-top: -.25rem;
}

.ai-news__status { color: var(--brand-muted); }

.ai-news__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.ai-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}

.ai-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.ai-card__title {
  display: block;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--brand-ink) !important;
  text-decoration: none;
}

.ai-card__title:hover { color: var(--brand-accent-2) !important; }

.ai-card__meta {
  margin: .6rem 0 0;
  font-size: .82rem;
  color: var(--brand-muted);
}

.ai-card__meta a { color: var(--brand-muted); }
.ai-card__meta a:hover { color: var(--brand-accent-2); }

.ai-news__credit {
  font-size: .82rem;
  color: var(--brand-muted);
}

/* ---- Products / SaaS showcase ------------------------------------------- */

.products { margin-top: 1rem; }

.product-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  overflow: hidden;
  position: relative;
}

@media screen and (min-width: 30em) {
  .product-card { padding: 2.75rem; }
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-accent-2));
}

.product-card__badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-accent-2);
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .25);
  padding: .25rem .6rem;
  border-radius: 999px;
}

.product-card__name {
  font-size: 2rem;
  margin: .9rem 0 .35rem;
  line-height: 1.1;
}

.product-card__tagline {
  font-size: 1.15rem;
  color: var(--brand-body);
  margin: 0 0 1.25rem;
}

.product-card__lead {
  color: var(--brand-body);
  line-height: 1.65;
  margin: 0 0 1.5rem;
  max-width: 46rem;
}

.product-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: grid;
  gap: 1rem;
}

@media screen and (min-width: 40em) {
  .product-card__features {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
  }
}

.product-card__features li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--brand-muted);
  line-height: 1.55;
}

.product-card__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-accent);
  font-weight: 700;
}

.product-card__features li strong {
  display: block;
  color: var(--brand-ink);
  font-weight: 600;
  margin-bottom: .15rem;
}

.product-card__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.product-btn {
  display: inline-block;
  background: var(--brand-accent);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  padding: .75rem 1.4rem;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.product-btn:hover {
  background: var(--brand-accent-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: #fff !important;
}

.product-link {
  font-weight: 500;
  color: var(--brand-accent) !important;
}

.product-link:hover { color: var(--brand-accent-2) !important; }

/* ---- Products: free audit callout --------------------------------------- */

.product-audit {
  margin-top: 1.75rem;
  padding: 1.5rem;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.product-audit__badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-accent-2);
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .25);
  padding: .2rem .55rem;
  border-radius: 999px;
}

.product-audit__title {
  font-size: 1.2rem;
  margin: .55rem 0 .35rem;
  line-height: 1.2;
}

.product-audit__lead {
  margin: 0;
  color: var(--brand-muted);
  line-height: 1.55;
  max-width: 34rem;
}

.product-btn--ghost {
  background: transparent;
  color: var(--brand-accent-2) !important;
  border: 1px solid var(--brand-accent);
  box-shadow: none;
  white-space: nowrap;
}

.product-btn--ghost:hover {
  background: var(--brand-accent);
  color: #fff !important;
}

/* ---- Products: badge row & contact -------------------------------------- */

.product-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .25rem;
}

.product-card__badge--link {
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.product-card__badge--link:hover {
  background: rgba(16, 185, 129, .18);
  border-color: var(--brand-accent);
  color: var(--brand-accent-2) !important;
}

.product-card__contact {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brand-border);
  color: var(--brand-muted);
  font-size: .95rem;
}

/* ---- Homepage: featured product band ------------------------------------ */

.home-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: .5rem auto 2rem;
  padding: 1.5rem 1.75rem;
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.home-product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-accent);
}

.home-product__main { min-width: 0; }

.home-product__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .5rem;
}

.home-product__badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--brand-accent-2);
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .25);
  padding: .2rem .55rem;
  border-radius: 999px;
}

.home-product__name {
  display: block;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--brand-ink);
  line-height: 1.15;
}

.home-product__pitch {
  display: block;
  margin-top: .2rem;
  color: var(--brand-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.home-product__cta {
  flex: none;
  font-weight: 600;
  color: var(--brand-accent) !important;
  white-space: nowrap;
}

.home-product:hover .home-product__cta { color: var(--brand-accent-2) !important; }
