/* 8bar Systems — global styles
   Tokens map directly to brand book §3.2 / §3.3 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=JetBrains+Mono&display=swap');

:root {
  --charcoal: #2B2B2A;
  --void:     #0E0E0D;
  --subtle:   #3D3D3B;
  --steel:    #9C9A92;
  --parchment:#EDEBE3;
  --amber:    #C8944A;

  --sans: 'Inter', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', ui-monospace, monospace;

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

  --t-display: 56px;
  --t-h1: 40px;
  --t-h2: 28px;
  --t-h3: 20px;
  --t-body: 17px;
  --t-small: 14px;
  --t-meta: 13px;
  --t-mono: 15px;
  --t-eyebrow: 12px;
}

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

body {
  background: var(--charcoal);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Type ----------------------------------- */
h1, h2, h3, h4 { font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.3; }
p  { margin: 0; max-width: 65ch; text-wrap: pretty; }
.display { font-size: var(--t-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.eyebrow {
  font-size: var(--t-eyebrow);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--amber);
  display: inline-block;
}
.meta { font-size: var(--t-meta); color: var(--steel); line-height: 1.4; }
.muted { color: var(--steel); }
.mono { font-family: var(--mono); font-size: var(--t-mono); }

/* Links ---------------------------------- */
a {
  color: var(--parchment);
  text-decoration: none;
  transition: color 100ms ease, border-color 100ms ease;
}
a:hover { color: var(--amber); }
a.underline {
  border-bottom: 1px solid var(--subtle);
  padding-bottom: 1px;
}
a.underline:hover { border-bottom-color: var(--amber); }

/* Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font: inherit;
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--parchment);
  background: transparent;
  border: 1px solid var(--subtle);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 100ms ease, color 100ms ease, background 100ms ease;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }
.btn--primary { border-color: var(--parchment); }
.btn--primary:hover { border-color: var(--amber); color: var(--amber); }
.btn .arrow { transition: transform 150ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

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

.divider {
  height: 1px;
  background: var(--subtle);
  border: 0;
  margin: 0;
}

/* Header --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--charcoal) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--subtle);
}
.site-header .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.wordmark {
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--parchment);
  user-select: none;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.wordmark .num { font-weight: 700; }
.wordmark .word { font-weight: 400; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  font-size: var(--t-small);
  font-weight: 400;
  color: var(--parchment);
  position: relative;
}
.nav a.is-active { color: var(--amber); }
.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -28px;
  height: 1px;
  background: var(--amber);
}

/* Footer --------------------------------- */
.site-footer {
  border-top: 1px solid var(--subtle);
  margin-top: 120px;
  padding: 40px 0 56px;
  font-size: var(--t-small);
  color: var(--steel);
}
.site-footer .row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .col { display: flex; flex-direction: column; gap: 6px; max-width: 32ch; }
.site-footer a { color: var(--steel); }
.site-footer a:hover { color: var(--amber); }

/* Page transitions ----------------------- */
.page {
  animation: page-fade 240ms ease-out both;
}
@keyframes page-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero ----------------------------------- */
.hero {
  padding-block: 120px 80px;
}
.hero .display { max-width: 14ch; }
.hero .lede { color: var(--steel); margin-top: 24px; max-width: 56ch; font-size: 19px; }
.hero .ctas { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-scale-wrap {
  margin-top: 80px;
  padding-top: 56px;
  border-top: 1px solid var(--subtle);
}

/* Measurement scale ---------------------- */
.scale {
  width: 100%;
  display: block;
  height: 110px;
}
.scale-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  color: var(--steel);
  font-size: var(--t-meta);
  font-family: var(--mono);
}

/* Cards / sections ----------------------- */
.section { padding-block: 96px; }
.section--tight { padding-block: 64px; }

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 820px) {
  .modes { grid-template-columns: 1fr; gap: 56px; }
}

.mode-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mode-card h2 { font-size: 36px; letter-spacing: -0.02em; }
.mode-card .deliverables {
  margin-top: 8px;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mode-card .deliverables li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--subtle);
  align-items: baseline;
}
.mode-card .deliverables li:last-child { border-bottom: 1px solid var(--subtle); }
.mode-card .deliverables .idx {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--steel);
}
.mode-card .deliverables .label { font-size: 17px; }
.mode-card .deliverables .desc { color: var(--steel); font-size: 14px; margin-top: 4px; }

/* About ---------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
}
.about-grid .label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--steel);
  padding-top: 6px;
}
.about-grid p + p { margin-top: 18px; }

.timeline {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
}
.timeline li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--subtle);
}
.timeline li:last-child { border-bottom: 1px solid var(--subtle); }
.timeline .when { font-family: var(--mono); font-size: 13px; color: var(--steel); }
.timeline .what { font-size: 16px; }
.timeline .what .role { color: var(--steel); }

/* Skills grid (About / Team) ------------- */
.skills-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  border-top: 1px solid var(--subtle);
}
.skills-grid .skill-col {
  display: contents;
}
.skills-grid .skill-label {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--steel);
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--subtle);
}
.skills-grid .skill-list {
  grid-column: 2;
  font-size: 15px;
  color: var(--parchment);
  padding: 16px 0;
  border-bottom: 1px solid var(--subtle);
}
@media (max-width: 640px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skills-grid .skill-label {
    padding: 14px 0 4px;
    border-bottom: 0;
  }
  .skills-grid .skill-list {
    padding: 0 0 14px;
  }
}

/* Contact -------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 0;
  border-top: 1px solid var(--subtle);
}
.contact-block:last-child { border-bottom: 1px solid var(--subtle); }
.contact-block .label { font-family: var(--mono); font-size: 13px; color: var(--steel); }
.contact-block .value { font-family: var(--mono); font-size: 17px; color: var(--parchment); }
.contact-block .value a { border-bottom: 1px solid var(--subtle); padding-bottom: 1px; }

/* Misc ----------------------------------- */
.statement {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.35;
  max-width: 32ch;
  letter-spacing: -0.01em;
}
.statement em { color: var(--amber); font-style: normal; }

.three-up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 64px;
}
@media (max-width: 820px) { .three-up { grid-template-columns: 1fr; gap: 24px; } }
.three-up .item { padding-top: 20px; border-top: 1px solid var(--subtle); }
.three-up .item .num { font-family: var(--mono); font-size: 13px; color: var(--steel); }
.three-up .item h3 { margin: 8px 0 8px; font-size: 18px; }
.three-up .item p { color: var(--steel); font-size: 14px; }

::selection { background: var(--amber); color: var(--charcoal); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* Tweaks panel positioning override */
[data-tweaks-panel] { z-index: 100; }
