/* ============================================================
   Syndie · Design tokens
   Cohere design language, translated for Syndie.
   Rules carried over verbatim from the reference system:
   - Surfaces separate by tone (canvas → cream → ink), never by shadow.
   - One hairline weight for every border.
   - Radius grammar is a closed set: 4 / 8 / 22 / 9999.
   - The primary action is an ink-filled pill. No colored CTAs.
   - The chromatic gradient lives in imagery and washes only.
   - Brand green appears as punctuation, never as a surface.
   ============================================================ */

:root {
  /* Surfaces */
  --canvas: #FFFFFF;        /* base page background */
  --cream: #F0EEE9;         /* alternate section / soft surface */
  --wash: #E9F1EA;          /* soft green wash for feature cards */
  --ink: #17171C;           /* dark inset panels, pill buttons, footer */
  --ink-2: #212126;         /* raised element on ink */

  /* Text */
  --text: #212121;          /* primary */
  --text-2: #616161;        /* secondary body, meta            5.9:1 */
  --caption: #6F6F7E;       /* captions, subdued annotations   4.9:1 */
  --fog: #93939F;           /* decorative only — never carries meaning */
  --on-ink: #FFFFFF;
  --on-ink-2: #A9A9B2;

  /* Lines */
  --hairline: #E5E7EB;      /* the one border */
  --rule: #D9D9DD;          /* secondary rule where hairline is too faint */

  /* Brand — punctuation only */
  --green: #1E7A44;
  --green-deep: #14572F;
  --green-tint: #E7F1EA;

  /* Decorative gradient — "Fluence" (from the Syndie Figma, node 512:1658).
     Three blurred atmosphere ellipses over a lilac-white base:
     lavender left · peach top-right · violet bottom-right.
     Imagery and washes only, never on controls. */
  --grad:
    radial-gradient(64% 130% at 4% 46%, #B18EDC 0%, rgba(177,142,220,0) 64%),
    radial-gradient(36% 52% at 97% 4%, #F3C69E 0%, rgba(243,198,158,0) 68%),
    radial-gradient(40% 52% at 102% 92%, #BC9FE3 0%, rgba(188,159,227,0) 66%),
    linear-gradient(97deg, #DECFF0 0%, #F1EBF7 46%, #F6EEE6 100%);
  /* Same atmospheres with alpha, for laying over photography */
  --grad-overlay:
    radial-gradient(64% 130% at 4% 46%, rgba(177,142,220,.60) 0%, rgba(177,142,220,0) 64%),
    radial-gradient(36% 52% at 97% 4%, rgba(243,198,158,.55) 0%, rgba(243,198,158,0) 68%),
    radial-gradient(40% 52% at 102% 92%, rgba(188,159,227,.55) 0%, rgba(188,159,227,0) 66%);
  --grad-soft: linear-gradient(97deg, #EFE7F8 0%, #F5F1F9 46%, #F9F3ED 100%);

  /* Semantic (status only — never the brand green) */
  --ok: #2E7D4F;      --ok-soft: #E8F2EB;
  --warn: #8F6212;    --warn-soft: #F6EEDC;
  --bad: #A93425;     --bad-soft: #F7E9E5;
  --note: #5B5B74;    --note-soft: #EDEDF3;

  /* Shape — the complete set */
  --r-sm: 4px;
  --r-nav: 8px;
  --r-card: 22px;
  --r-pill: 9999px;

  /* Type */
  --font-ui: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;

  --text-caption: 12px;
  --text-body-sm: 14px;
  --text-body: 16px;
  --text-subheading: 18px;
  --text-heading-sm: 24px;
  --text-heading: 32px;
  --text-heading-lg: 48px;

  /* Rhythm */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 40px; --sp-6: 56px; --sp-7: 80px;
  --page-max: 1200px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--text-body-sm);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

::selection { background: var(--green-tint); }

/* ---- Actions ------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: var(--text-body-sm); font-weight: 500;
  letter-spacing: -0.01em; line-height: 1;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease, opacity .15s ease;
}
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* The only filled button in the system */
.btn-primary { background: var(--ink); color: var(--on-ink); padding: 12px 24px; }
.btn-primary:hover { background: #000; }
.btn-primary.btn-sm { padding: 9px 18px; }

/* Secondary action: underline link */
.link-2 {
  color: var(--text); font-weight: 500; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer;
  background: none; border: none; font-family: var(--font-ui);
  font-size: var(--text-body-sm); letter-spacing: -0.01em; padding: 0;
}
.link-2:hover { color: #000; }
.link-2:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }

/* Ghost nav action */
.btn-ghost {
  background: transparent; color: var(--text); padding: 8px 12px;
  border-radius: var(--r-pill); font-weight: 400;
}
.btn-ghost:hover { background: var(--cream); }

/* ---- Pills & tags ------------------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-caption); font-weight: 500; line-height: 1;
  padding: 5px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.pill-ok   { background: var(--ok-soft);   color: var(--ok); }   .pill-ok i { background: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); } .pill-warn i { background: var(--warn); }
.pill-bad  { background: var(--bad-soft);  color: var(--bad); }  .pill-bad i { background: var(--bad); }
.pill-note { background: var(--note-soft); color: var(--note); } .pill-note i { background: var(--note); }

.tag {
  display: inline-flex; align-items: center;
  font-size: var(--text-caption); color: var(--text-2); line-height: 1;
  padding: 4px 10px; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  background: var(--canvas);
}

/* ---- Micro-labels (mono, stamped) --------------------------- */

.micro {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--caption);
}

/* ---- Cards -------------------------------------------------- */

.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
.card-cream { background: var(--cream); border: none; }
.card-ink { background: var(--ink); color: var(--on-ink); border: none; }

/* ---- Scrollbars (quiet) ------------------------------------- */
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-y { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
