/* ClaudIn — Design tokens */

:root {
  /* Palette */
  --bg: #FAFAF6;
  --ink: #0E0E0E;
  --ink-2: #4B4B47;
  --primary: #0F8A5C;
  --primary-85: rgba(15, 138, 92, 0.85);
  --primary-10: rgba(15, 138, 92, 0.10);
  --primary-06: rgba(15, 138, 92, 0.06);
  --border: rgba(14, 14, 14, 0.12);
  --border-strong: rgba(14, 14, 14, 0.20);
  --border-light: rgba(14, 14, 14, 0.08);
  --surface: rgba(255, 255, 255, 0.85);

  /* Type */
  --serif: 'Fraunces', 'Source Serif Pro', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Rhythm — 8px baseline */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-6: 48px;
  --s-8: 64px;
  --s-12: 96px;
  --s-16: 128px;

  /* Grid */
  --page-max: 1200px;
  --gutter: 24px;
  --col: calc((100% - 11 * var(--gutter)) / 12);

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
}

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

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

::selection {
  background: var(--primary-85);
  color: var(--bg);
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Layout helpers */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
}

.section {
  padding: var(--s-12) 0;
}

@media (max-width: 900px) {
  .page { padding: 0 20px; }
  .section { padding: var(--s-6) 0; }
  .grid { grid-template-columns: repeat(4, 1fr); column-gap: 16px; }
}

@media (max-width: 560px) {
  .page { padding: 0 16px; }
  .section { padding: var(--s-4) 0; }
  .grid { grid-template-columns: 1fr; column-gap: 0; }
  .display { font-size: clamp(36px, 9vw, 56px); }
  .h1 { font-size: clamp(30px, 8vw, 44px); }
  .h2 { font-size: clamp(26px, 6.5vw, 32px); }
  .lede { font-size: 16px; }
  body { font-size: 15px; }
}

/* Typography classes */
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 12px 6px;
  background: var(--primary);
  color: var(--bg);
  border-radius: 3px;
}

.eyebrow.md { font-size: 13px; padding: 8px 14px 7px; }

.eyebrow.plain {
  background: transparent;
  color: var(--ink-2);
  padding: 0;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.lede {
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 680px;
}

/* Section headers — eyebrow / h2 / lede stack flush-left across the full grid */
.section-head > * {
  grid-column: 1 / -1;
  text-align: left;
}
.section-head .h2 {
  max-width: 900px;
}
.section-head .lede {
  max-width: 720px;
  margin-top: 14px;
}

.body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}

.meta {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.quote-serif {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 30px);
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  padding: 15px 24px 14px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 200ms var(--ease), background 200ms var(--ease), color 200ms var(--ease), box-shadow 200ms var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -6px rgba(15, 138, 92, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}

.btn-inverted {
  background: transparent;
  color: var(--bg);
  border-color: var(--bg);
}

.btn-inverted:hover {
  background: var(--bg);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn .arrow {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* Inline link */
.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms var(--ease);
}

.link:hover {
  text-decoration-color: var(--ink);
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color 200ms var(--ease);
}

.link-cta svg {
  width: 14px; height: 14px;
  stroke: var(--primary);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms var(--ease);
}

.link-cta:hover svg { transform: translateX(4px); }

/* Chip */
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary-10);
  color: var(--primary);
  white-space: nowrap;
}

.chip-neutral {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px solid var(--border-strong);
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms var(--ease);
}

.chip-neutral:hover { border-color: var(--ink); color: var(--ink); }

.chip-neutral.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

/* Card */
.card {
  background: var(--surface);
  border-left: 2px solid var(--primary);
  padding: 32px;
  border-radius: 4px;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease);
}

a.card { display: block; color: inherit; }

a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(14, 14, 14, 0.12);
}

/* Logo */
.logo {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.logo .in-part { color: var(--primary-85); }

/* Utility */
.mono { font-family: var(--mono); font-size: 0.92em; }
.italic { font-style: italic; }
.muted { color: var(--ink-2); }
.primary-color { color: var(--primary); }

/* Scroll reveal — only hidden when JS has booted, so no-JS / slow-JS stays visible */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.js-ready .reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Registered mark as a true superscript — small, raised, not italic */
.reg-mark {
  font-size: 0.1em;
  vertical-align: 0.1em;
  line-height: 1;
  font-family: var(--sans);
  font-weight: 500;
  font-style: normal;
  margin-left: 0.08em;
  letter-spacing: 0;
}

/* Eyebrow that may wrap on narrow viewports — keep padding tidy */
.eyebrow {
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}
@media (max-width: 560px) {
  .eyebrow { font-size: 11px; }
}
