/* ============================================
   THREADLINE — tokens.css
   Design tokens, reset, base typography
   ============================================ */

:root {
  /* Color palette */
  --ink:          #0e0e0d;
  --ink-2:        #3a3a36;
  --ink-3:        #7a7a74;
  --paper:        #f5f2ec;
  --paper-2:      #ede9e0;
  --paper-3:      #e2ddd3;
  --thread:       #2d6a4f;
  --thread-light: #d8f3e8;
  --thread-mid:   #52b788;
  --amber:        #c77b2e;
  --amber-light:  #fdf0dc;
  --danger:       #c0392b;
  --white:        #ffffff;

  /* Semantic */
  --rule:         rgba(14, 14, 13, 0.12);
  --rule-dark:    rgba(255, 255, 255, 0.08);

  /* Typography */
  --serif:  'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans:   'DM Sans', 'Helvetica Neue', sans-serif;
  --mono:   'DM Mono', 'Fira Mono', 'Courier New', monospace;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* Layout */
  --max-width: 1200px;
  --gutter:    48px;

  /* Motion */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --duration:  0.3s;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

/* ---- Utility classes ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---- Typography helpers ---- */
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--thread);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.kicker::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--thread);
  flex-shrink: 0;
}

.kicker--light { color: var(--thread-mid); }
.kicker--light::before { background: var(--thread-mid); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section-title em {
  font-style: italic;
  color: var(--thread);
}

.section-title--light { color: var(--paper); }
.section-title--light em { color: var(--thread-mid); }

.section-lead {
  font-size: 18px;
  color: var(--ink-2);
  font-weight: 300;
  max-width: 600px;
  line-height: 1.65;
}

.section-lead--light { color: rgba(245, 242, 236, 0.65); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--duration) var(--ease-out),
              color var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--thread); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn--outline:hover { border-color: var(--thread); color: var(--thread); }

.btn--thread {
  background: var(--thread);
  color: #fff;
}
.btn--thread:hover { background: #1f4d38; }

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  padding: 4px 0;
  border-radius: 0;
  font-size: 14px;
}
.btn--ghost:hover { color: var(--thread); border-color: var(--thread); }

/* ---- Tag / badge ---- */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 3px;
}

.tag--green   { background: var(--thread-light); color: var(--thread); }
.tag--amber   { background: var(--amber-light); color: var(--amber); }
.tag--ink     { background: var(--paper-2); color: var(--ink-3); }
.tag--dark    { background: rgba(82,183,136,.15); color: var(--thread-mid); }

/* ---- Dividers ---- */
.rule { border: none; border-top: 1px solid var(--rule); }
.rule--dark { border-top-color: var(--rule-dark); }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .section-lead { font-size: 16px; }
}
