/* Tilltrend marketing site — shared stylesheet.
   App-style dark theme: graphite background, emerald accent, DM Sans (the brand
   typeface, self-hosted to match the logo wordmark and the admin dashboard). The
   look deliberately echoes the product's own UI — a sticky app bar, card panels,
   emerald CTAs — while keeping the printed-receipt feel of the demo blocks. No
   frameworks, no network fonts, no JS; the font ships as one bundled .woff2.
   Custom-property names use --tilltrend (D-044 de-Plum). */

/* Brand typeface — DM Sans, self-hosted (no CDN). One variable file, all weights. */
@font-face {
  font-family: "DM Sans";
  src: url("dm-sans-var.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand */
  --tilltrend: #5FB877;        /* emerald — primary accent on dark */
  --tilltrend-dark: #4ea568;   /* emerald hover / pressed */
  --clay: #5FB877;             /* CTA accent (emerald — the logo has no orange) */
  --clay-dark: #4ea568;
  --leaf: #6cc888;             /* positive / verified / checkmarks */
  --leaf-dark: #5FB877;

  /* surfaces — graphite, matching the dashboard */
  --paper: #0e1014;            /* page background (near-black graphite) */
  --paper-2: #0a0b0e;          /* deeper — footer / contrast bands */
  --card: #161a20;             /* panel surface */
  --card-2: #1b2128;           /* raised surface / table head / code */
  --glass: rgba(14, 16, 20, 0.82);   /* sticky bar backdrop */

  /* ink */
  --ink: #e7eaee;              /* primary text */
  --ink-soft: #9aa3ae;         /* muted text */
  --rule: #252b33;             /* hairline border */
  --rule-strong: #333b45;      /* stronger border */
  --code-bg: #11151a;

  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  --sans: "DM Sans", system-ui, "Segoe UI", Arial, sans-serif;
  --serif: var(--sans);        /* headings now use the brand sans, not a serif */
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(95,184,119,.10), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;        /* belt-and-suspenders: never a sideways scroll on phones */
}

h1, h2, h3 { font-family: var(--sans); line-height: 1.2; color: #fff; letter-spacing: -0.012em; }
h1 { font-size: 2.55rem; font-weight: 700; margin: 0 0 0.5rem; }
h2 { font-size: 1.65rem; font-weight: 650; margin: 2.75rem 0 0.85rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.2rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }

a { color: var(--tilltrend); text-underline-offset: 2px; }
a:hover { color: var(--tilltrend-dark); }

code, pre { font-family: var(--mono); font-size: 0.875rem; }
code {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.08rem 0.32rem;
  color: #cfe9d8;
  overflow-wrap: anywhere;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  line-height: 1.5;
  color: #d6dae0;
}
pre code { background: none; border: none; padding: 0; color: inherit; }

/* layout */
header.site, main, footer.site > * { max-width: 58rem; margin-left: auto; margin-right: auto; }
main { padding: 0 1.25rem 3rem; }

/* ---- sticky app bar ---- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
  /* keep the bar centered but let the blurred background span full width */
  max-width: none;
}
header.site > * { max-width: 58rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  line-height: 1;
}
/* app-bar mark: the hexagon icon (CSS bg) + the wordmark text in the brand font,
   replacing the portrait lockup so the bar stays compact and horizontal */
.brand::before {
  content: "";
  flex: none;
  width: 30px; height: 30px;
  background: url("tilltrend-icon.svg") center / contain no-repeat;
}
.brand .logo { display: none; }
.brand .wordmark {
  position: static; width: auto; height: auto;
  overflow: visible; clip: auto; white-space: nowrap;
}
.brand .tick { color: var(--leaf); margin-left: 0.12em; }
header.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.4rem; align-items: center; margin-left: auto; }
header.site nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 7px;
}
header.site nav a:hover { color: var(--ink); background: rgba(255,255,255,.05); }
header.site nav a[aria-current="page"] { color: #fff; background: rgba(95,184,119,.12); }

.cta {
  display: inline-block;
  background: linear-gradient(180deg, #6cc888, var(--tilltrend));
  color: #0b130d !important;
  text-decoration: none;
  padding: 0.4rem 0.95rem;
  border-radius: 8px;
  font-weight: 650;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px rgba(95,184,119,.18);
}
.cta:hover { background: linear-gradient(180deg, #7ad196, var(--tilltrend-dark)); color: #0b130d !important; }
.cta.big { font-size: 1.1rem; padding: 0.68rem 1.5rem; }

/* hero */
.hero { margin: 1.5rem 0 3rem; }
.hero h1 { font-size: 3rem; line-height: 1.08; }
.hero p.tagline { font-size: 1.3rem; color: var(--ink-soft); max-width: 40rem; margin: 0.75rem 0 1.5rem; }
.prelaunch {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--leaf);
  background: rgba(95,184,119,.08);
  border: 1px solid rgba(95,184,119,.4);
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  margin-bottom: 1.1rem;
}

/* three-up feature row — card panels */
.threeup { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.1rem; margin: 1.75rem 0; }
.threeup section {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--tilltrend);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.threeup section:hover { transform: translateY(-2px); border-top-color: var(--leaf); }
.threeup h3 { margin-top: 0.25rem; color: #fff; }

/* receipt / demo block — the product's printed-receipt feel, on a dark card */
.receipt {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin: 1.25rem 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.receipt .label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--leaf);
  background: rgba(95,184,119,.06);
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 1.25rem;
}
.receipt pre { border: none; margin: 0; background: none; border-radius: 0; }

/* evidence rows — emerald left border marks them verified */
.claim-row {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--leaf);
  border-radius: 12px;
  padding: 1.1rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}
.claim-row h3 { margin-top: 0; }
.claim-row dt { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin-top: 0.9rem; }
.claim-row dd { margin: 0.25rem 0 0; }
.observed { color: var(--leaf); font-weight: 650; }

/* changelog */
.changelog-note {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--tilltrend);
  border-radius: 0 10px 10px 0;
  padding: 0.7rem 1.25rem;
  margin: 1rem 0 2rem;
}
.changelog li { margin: 1rem 0; }

/* misc */
.muted { color: var(--ink-soft); }
.honest {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--clay);
  background: var(--card);
  border-radius: 0 10px 10px 0;
  padding: 0.7rem 1.25rem;
  margin: 1.25rem 0;
}
.sample-download { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin: 1.25rem 0; }
.sample-download .cta { flex: none; }
.dl-note { flex: 1 1 16rem; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { border: 1px solid var(--rule); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--card-2); font-family: var(--sans); font-weight: 600; color: #fff; }

/* footer — deeper graphite band, white lockup */
footer.site {
  background: var(--paper-2);
  color: #c7cdd4;
  margin-top: 3rem;
  padding: 2.25rem 0 2.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
}
footer.site > * { padding-left: 1.25rem; padding-right: 1.25rem; }
footer.site p { margin: 0 auto 0.75rem; max-width: 58rem; }
footer.site strong { color: #fff; }
footer.site a { color: var(--leaf); }
footer.site a:hover { color: #fff; }
.footer-logo { height: 2.4rem; width: auto; display: block; margin-bottom: 1rem; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0.5rem auto 0; max-width: 58rem; }

/* ---- mobile (<= 640px): layout is already fluid; tune type, the bar, spacing,
   and let any wide table scroll instead of forcing page-wide scroll ---- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  /* clamp every centered column to the viewport so nothing can push sideways */
  header.site > *, main, footer.site > * { max-width: 100%; }
  h1 { font-size: 1.9rem; overflow-wrap: anywhere; }
  .hero h1 { font-size: 2rem; }
  h2 { font-size: 1.35rem; margin-top: 2rem; }
  h3 { font-size: 1.12rem; }

  header.site { padding-left: 1rem; padding-right: 1rem; gap: 0.4rem 0.75rem; }
  main { padding-left: 1rem; padding-right: 1rem; }
  /* nav drops onto its own full-width row under the brand; tighter so 5 links +
     CTA wrap cleanly instead of clipping on a ~360px phone */
  header.site nav { margin-left: 0; width: 100%; gap: 0.25rem 0.15rem; }
  header.site nav a { padding: 0.3rem 0.45rem; font-size: 0.9rem; }

  .hero { margin: 1rem 0 2rem; }
  .hero p.tagline { font-size: 1.1rem; }
  .cta.big { font-size: 1rem; padding: 0.6rem 1.15rem; }

  .threeup { gap: 0.85rem; }
  .threeup section, .receipt, .claim-row, .honest, .changelog-note { min-width: 0; }

  th, td { padding: 0.4rem 0.55rem; overflow-wrap: anywhere; }
  table { display: block; overflow-x: auto; }
}
