/* The Collab Collective — design system
   Technical/monospaced direction, rooted in the logo's octagonal geometry. */

:root {
  --paper: #ffffff;          /* pure white */
  --paper-2: #f5f5f5;
  --ink: #0a0a0a;            /* near-black */
  --ink-2: #1a1a1a;
  --line: #e5e5e5;           /* hairline */
  --line-2: #d4d4d4;
  --muted: #6b6b6b;
  --accent: #0a0a0a;         /* mono — accent equals ink */
  --accent-2: #1a1a1a;
  /* Mono gradient for highlights, fills, and decorative accents */
  --accent-grad: linear-gradient(45deg, #cfcfcf 0%, #6b6b6b 30%, #2a2a2a 65%, #0a0a0a 100%);
  --accent-grad-soft: linear-gradient(45deg, #a8a8a8 0%, #4a4a4a 50%, #0a0a0a 100%);
  --ok: #0a0a0a;

  --radius: 0px;
  --notch: 10px;             /* corner cut size for octagonal forms */

  --font-sans: "Söhne", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: "JetBrains Mono", ui-monospace, monospace;

  --container: 1320px;
  --pad-x: clamp(20px, 4vw, 56px);
}

[data-theme="dark"] {
  --paper: #0a0a0a;
  --paper-2: #141414;
  --ink: #ffffff;
  --ink-2: #f5f5f5;
  --line: #2a2a2a;
  --line-2: #3a3a3a;
  --muted: #888888;
  --accent: #ffffff;
  --accent-2: #f5f5f5;
  --accent-grad: linear-gradient(45deg, #3a3a3a 0%, #8a8a8a 25%, #d4d4d4 60%, #ffffff 100%);
  --accent-grad-soft: linear-gradient(45deg, #4a4a4a 0%, #b0b0b0 50%, #ffffff 100%);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* — Type — */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow.muted { color: var(--muted); }

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6.4vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}
.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}
.body.muted { color: var(--muted); }
.small {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.mono { font-family: var(--font-mono); }

/* — Layout — */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.section {
  padding: clamp(72px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.section.no-border { border-top: 0; }
.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}
.section-head .meta { display: flex; flex-direction: column; gap: 12px; }
.section-head .index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

/* — Octagonal "notch" container — uses clip-path with --notch — */
.notch {
  --n: var(--notch);
  clip-path: polygon(
    var(--n) 0,
    calc(100% - var(--n)) 0,
    100% var(--n),
    100% calc(100% - var(--n)),
    calc(100% - var(--n)) 100%,
    var(--n) 100%,
    0 calc(100% - var(--n)),
    0 var(--n)
  );
}
/* notch via border for line-only treatment */
.notch-line {
  position: relative;
  background: transparent;
}
.notch-line::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-2);
  --n: var(--notch);
  clip-path: polygon(
    var(--n) 0,
    calc(100% - var(--n)) 0,
    100% var(--n),
    100% calc(100% - var(--n)),
    calc(100% - var(--n)) 100%,
    var(--n) 100%,
    0 calc(100% - var(--n)),
    0 var(--n)
  );
  pointer-events: none;
}

/* — Buttons — */
.btn {
  --n: 8px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  clip-path: polygon(
    var(--n) 0, calc(100% - var(--n)) 0, 100% var(--n),
    100% calc(100% - var(--n)), calc(100% - var(--n)) 100%, var(--n) 100%,
    0 calc(100% - var(--n)), 0 var(--n)
  );
}
.btn:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn .arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper); box-shadow: none; }

.btn.accent { background: var(--accent-grad); color: var(--paper); }
.btn.accent:hover { background: var(--ink); color: var(--paper); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.18s, border-color 0.18s, gap 0.18s;
}
.btn-link:hover { color: var(--muted); border-color: var(--muted); gap: 14px; }

/* — Nav — */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.nav .brand .mark {
  width: 32px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav .brand .mark svg { width: 100%; height: 100%; fill: var(--ink); }
.nav .links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav .links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
}
.nav .links a:hover { color: var(--muted); }
.nav .links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 1px; background: var(--ink);
}
.nav .cta { font-size: 12px; }
@media (max-width: 860px) {
  .nav .links { display: none; }
}

/* — Footer — */
.footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
}
.footer .wrap { display: grid; gap: 56px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 60%, transparent);
  margin-bottom: 20px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer ul a {
  font-size: 14px;
  color: var(--paper);
  opacity: 0.85;
  transition: opacity 0.18s, color 0.18s;
}
.footer ul a:hover { opacity: 1; color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.footer .brand-block { display: flex; flex-direction: column; gap: 16px; }
.footer .brand-block .mark { width: 56px; height: 46px; }
.footer .brand-block .mark svg { width: 100%; height: 100%; fill: var(--paper); }
.footer .brand-block p {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.7;
  max-width: 30ch;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-top: 32px;
  border-top: 1px solid color-mix(in srgb, var(--paper) 12%, transparent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 50%, transparent);
}
.footer-bottom .big-mark {
  font-family: var(--font-mono);
  font-size: clamp(48px, 12vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--paper) 8%, transparent);
  font-weight: 500;
  position: absolute;
  bottom: -20px;
  right: 5%;
  pointer-events: none;
  user-select: none;
}
.footer { position: relative; overflow: hidden; }

/* — Card — */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.18s, transform 0.18s;
  position: relative;
}
.card:hover { border-color: var(--ink); }
.card .card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* — Tag/chip — */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  background: transparent;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* — Marquee — */
.marquee {
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  background: var(--paper);
}
.marquee-track {
  display: flex;
  gap: 56px;
  animation: marquee 60s linear infinite;
  flex-shrink: 0;
  padding-right: 56px;
}
.marquee-track > span {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 56px;
}
.marquee-track > span::after {
  content: "✦";
  color: var(--ink);
  margin-left: 56px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* — Misc — */
.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}
.dot { width: 6px; height: 6px; background: var(--ink); display: inline-block; }

/* Fade-in: opt-in via .reveal-on on <html>, so non-JS contexts show content. */
.fade-in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }
html.reveal-on .fade-in { opacity: 0; transform: translateY(12px); }
html.reveal-on .fade-in.visible { opacity: 1; transform: none; }

/* — Selection — */
::selection { background: var(--ink); color: var(--paper); }

/* — Scrollbar (subtle) — */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
::-webkit-scrollbar-track { background: var(--paper); }

/* — Coordinate-bracket motif — corner ticks for sections — */
.tick-corners {
  position: relative;
}
.tick-corners::before, .tick-corners::after,
.tick-corners > .tick-tl, .tick-corners > .tick-tr {
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--ink);
}
.tick-corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tick-corners::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* — Pre-headline asterisk used in the logo's typeface vibe — */
.ast {
  display: inline-block;
  color: var(--ink);
  transform: translateY(-0.15em);
  font-family: var(--font-mono);
}
