/* Nexa — Design tokens & base styles — Tenor palette (oat + bottle, ink) */

:root {
  /* Backgrounds — oat surface system */
  --bg: #EFEBDF;        /* primary surface (oat) */
  --bg-2: #E5E0D0;      /* alternate surface */
  --bg-3: #DCD6C2;      /* elevated/inset surface */
  --bg-elev: #EAE5D5;

  /* Foreground — ink scale */
  --fg: #1C1A17;        /* ink */
  --fg-2: #3C3A33;      /* secondary text */
  --fg-3: #6E6A5E;      /* muted text */
  --fg-4: #9C9789;      /* faintest — captions, eyebrows */

  /* Lines — ink-on-oat */
  --line: rgba(28, 26, 23, 0.10);
  --line-2: rgba(28, 26, 23, 0.06);
  --line-strong: rgba(28, 26, 23, 0.18);

  /* Accent — bottle green */
  --accent: #27514A;
  --accent-2: #346B62;
  --accent-soft: rgba(39, 81, 74, 0.10);
  --accent-line: rgba(39, 81, 74, 0.28);

  /* Status */
  --good: #3D7E68;
  --warn: #B68A3F;

  /* Type */
  --font-sans: "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", ui-monospace, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* Section padding (density-driven) */
  --section-y: 120px;

  /* Container */
  --container: 1240px;
  --gutter: 32px;

  /* Radii */
  --r-sm: 4px;
  --r: 6px;
  --r-md: 8px;
  --r-lg: 12px;
}

[data-density="compact"] {
  --section-y: 80px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

::selection {
  background: var(--accent-soft);
  color: var(--fg);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line-2);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 56px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  width: fit-content;
}

.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* Type scale */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(48px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 500;
}

.h3 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 560px;
  text-wrap: pretty;
}

.muted { color: var(--fg-3); }
.mono { font-family: var(--font-mono); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover { background: #000; border-color: #000; }

.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--fg); border-color: var(--line-strong); background: rgba(28,26,23,0.03); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color 140ms ease, background 140ms ease;
}
.card:hover { border-color: var(--line-strong); }

/* Hairline grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Pill / chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(28,26,23,0.04);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
  width: fit-content;
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px rgba(61, 126, 104, 0.18);
}

/* Icons (line-style placeholders) */
.icon {
  width: 22px; height: 22px;
  stroke: var(--fg);
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Subtle background accents */
.bg-grid {
  background-image:
    linear-gradient(to right, var(--line-2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-2) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Image placeholder (striped) */
.img-placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(28,26,23,0.04) 0 1px,
      transparent 1px 14px
    ),
    var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.img-placeholder .label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  background: rgba(239, 235, 223, 0.85);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  letter-spacing: 0.02em;
}
.nx-hero-img[data-overlay-active="1"] > .label {
  top: 14px;
  bottom: auto;
  right: 14px;
  left: auto;
}

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.col { display: flex; flex-direction: column; }

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