/* Avisen Strategies — design tokens & base */
:root {
  --ink-deepest: #0c162c;
  --ink-deep: #1b2538;
  --ink: #2a3447;
  --ink-muted: #5a6478;
  --line: #d8dde6;
  --line-soft: #e8ecf2;

  --accent: #1b2538;
  --accent-deep: #0c162c;
  --teal: #2f5972;
  --teal-soft: #668db8;

  --bg: #ffffff;
  --bg-warm: #eaedf2;
  --bg-cool: #e4e8ef;
  --bg-dark: #0c162c;
  --bg-darker: #07101f;

  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --serif: 'Source Serif 4', 'Sabon', Georgia, serif;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  color: var(--ink-deep);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum";
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.eyebrow-light {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-soft);
}

.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink-deepest);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  margin: 0;
}

h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.05; }
h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.25; }
h4 { font-size: 17px; line-height: 1.3; font-family: var(--sans); font-weight: 600; letter-spacing: 0.01em; }

p { margin: 0 0 1em; }
p.lede { font-size: clamp(20px, 2vw, 24px); line-height: 1.5; color: var(--ink); }

hr.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
hr.double {
  border: 0;
  border-top: 1px solid var(--ink-deepest);
  border-bottom: 1px solid var(--ink-deepest);
  height: 4px;
  background: transparent;
}

/* Buttons */
.btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

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

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

.btn-ghost {
  background: transparent;
  color: var(--ink-deepest);
  border-color: var(--ink-deepest);
}
.btn-ghost:hover { background: var(--ink-deepest); color: #fff; }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost-light:hover { background: #fff; color: var(--ink-deepest); border-color: #fff; }

/* Sections */
section { padding: clamp(64px, 9vw, 128px) 0; }
section.dark { background: var(--bg-dark); color: #e8ecf2; }
section.dark h1, section.dark h2, section.dark h3 { color: #fff; }
section.warm { background: var(--bg-warm); }
section.cool { background: var(--bg-cool); }

/* Top nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.nav-logo {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--ink-deepest);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nav-logo .bridge {
  width: 40px;
  height: 18px;
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav-links a:hover { color: var(--accent); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Footer */
footer.site-footer {
  background: var(--bg-darker);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 36px;
  font-family: var(--sans);
  font-size: 13px;
}
footer.site-footer .container > div {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) {
  footer.site-footer .container > div { grid-template-columns: 1fr 1fr; }
}
footer.site-footer h4 {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
footer.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
footer.site-footer a:hover { color: #fff; }
footer .legal {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

/* Helpers */
.grid { display: grid; gap: 32px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

.row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.tag {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tag::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Density variants — controlled by data-density on body */
body[data-density="sparse"] section { padding-top: clamp(96px, 12vw, 180px); padding-bottom: clamp(96px, 12vw, 180px); }
body[data-density="dense"] section { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); }

/* Visual direction variants */
body[data-direction="manifesto"] h1 { font-family: var(--display); font-weight: 500; letter-spacing: 0.01em; line-height: 1.0; }
body[data-direction="manifesto"] h2 { font-family: var(--display); letter-spacing: 0.02em; }
body[data-direction="warm"] h1, body[data-direction="warm"] h2 { font-family: var(--serif); font-style: italic; font-weight: 400; }
body[data-direction="warm"] section { background: var(--bg-warm); }
body[data-direction="warm"] section.dark { background: var(--bg-dark); }
