/* TaskSpark, marketing chrome aligned with app design system.
   App tokens are the source of truth; marketing-only additions live under the /MK/ comments. */

:root {
  /* --- APP TOKENS (mirror src/index.html) --- */
  --bg:          #f0ede8;   /* warm paper */
  --surface:     #ffffff;
  --surface2:    #f5f2ee;
  --surface3:    #ebe7e0;
  --border:      #e4dfd8;
  --border2:     #cdc8bf;

  --text:        #18160f;
  --text2:       #5c5750;
  --text3:       #a09890;

  --accent:      #2d6a4f;
  --accent-l:    #e4f0eb;
  --accent-h:    #1b4d38;
  --accent-text: #ffffff;

  --red:         #c0392b;
  --red-l:       #fdf0ee;
  --amber:       #b8620a;
  --amber-l:     #fef5e7;
  --blue:        #1a5c8a;
  --blue-l:      #edf4fa;

  --radius:      10px;
  --radius-lg:   14px;
  --radius-sm:   6px;
  --shadow:      0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --shadow-lg:   0 4px 16px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);

  /* Brand orange, kept only for the logo dot */
  --spark:       #f57c1f;

  /* --- MK: marketing-only extensions --- */
  --rule:        rgba(24, 22, 15, 0.10);   /* hairline between editorial sections */
  --rule-strong: rgba(24, 22, 15, 0.16);

  /* Aliases so older code keeps working. */
  --ink:         var(--text);
  --ink-2:       var(--text);
  --ink-soft:    var(--text2);
  --ink-mute:    var(--text3);
  --ink-dim:     var(--border2);
  --paper:       var(--bg);
  --paper-2:     var(--surface2);
  --paper-3:     var(--surface3);

  /* Typography. Outfit carries the site; Garamond reserved for oversized display. */
  --sans:        "Outfit", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display:     "EB Garamond", "Fraunces", Georgia, serif;  /* hero H1 only */
  --serif:       var(--sans);  /* legacy alias, now Outfit */
  --mono:        "DM Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
em, i { font-style: italic; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Shared bits */
.container { width: min(1200px, 100% - 48px); margin-inline: auto; }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.spark-text { color: var(--accent); }

/* --- NAV --- */
.ts-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.ts-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.ts-logo {
  display: inline-flex; align-items: center;
  font-family: var(--sans); font-size: 17px; font-weight: 700;
  letter-spacing: -0.005em; color: var(--text);
}
.ts-logo .dot, .ts-logo .spark-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--spark); border-radius: 99px;
  margin-right: 10px;
}
.ts-nav-links {
  display: flex; gap: 2px; align-items: center;
  font-size: 14px; font-family: var(--sans);
}
.ts-nav-links a {
  padding: 8px 14px; color: var(--text2);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.ts-nav-links a:hover { color: var(--text); background: var(--surface2); }
.ts-nav-links a.active { color: var(--accent); background: var(--accent-l); }
.ts-nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700;
  border-radius: var(--radius);
  transition: background .15s;
}
.ts-nav-cta:hover { background: var(--accent-h); color: #fff; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 700;
  border-radius: var(--radius);
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  font-family: var(--sans);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); color: #fff; }
.btn-secondary {
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--border2);
}
.btn-secondary:hover { background: var(--surface2); color: var(--text); }
.btn-ghost {
  color: var(--text); border-bottom: 1px solid var(--text); padding: 4px 2px;
  border-radius: 0; font-weight: 600;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn-lg { padding: 14px 26px; font-size: 15px; }

/* Legacy button aliases from the old system */
.btn-spark { background: var(--accent); color: #fff; }
.btn-spark:hover { background: var(--accent-h); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-outline:hover { background: var(--text); color: var(--bg); }

/* --- FOOTER --- */
.ts-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 80px;
  background: var(--bg);
}
.ts-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.ts-footer h4, .ts-footer-label {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text3); margin-bottom: 14px;
  font-weight: 500;
}
.ts-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ts-footer a {
  color: var(--text2); font-size: 14px;
  padding: 2px 0;
}
.ts-footer ul a { display: block; }
.ts-footer a:hover { color: var(--accent); }
.ts-footer-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text3);
}

@media (max-width: 820px) {
  .ts-footer-grid { grid-template-columns: 1fr 1fr; }
  .ts-nav-links { display: none; }
}

/* --- CARDS (app-style) --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .15s, box-shadow .15s;
}
.card-lift:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
}

/* --- BADGE primitives (mirror app) --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  font-family: var(--sans);
}
.badge-accent { background: var(--accent-l); color: var(--accent); }
.badge-red    { background: var(--red-l);    color: var(--red); }
.badge-amber  { background: var(--amber-l);  color: var(--amber); }
.badge-blue   { background: var(--blue-l);   color: var(--blue); }
.badge-soft   { background: var(--surface2); color: var(--text2); }
.badge-mono   { font-family: var(--mono); font-size: 11px; }

/* --- HERO display type (the one Garamond exception) --- */
.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.display em { font-style: italic; }

/* Section spacing defaults */
section { padding-block: 0; }

::selection { background: var(--accent); color: #fff; }
