/* SCG Advisors — one-page site
   Palette: warm graphite ground, warm off-white type, a single brass accent. */

:root {
  --bg: #131210;
  --bg-2: #191815;
  --bg-3: #201e1a;
  --ink: #ede8de;
  --ink-2: #b9b3a6;
  --muted: #7f7a70;
  --line: #2a2823;
  --line-2: #3b3832;
  --accent: #c9a66b;
  --accent-2: #e3c58a;
  --on-accent: #131210;

  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(42px, 6.4vw, 92px); letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 4vw, 52px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.015em; }
h4 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 14px; font-weight: 600; z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- shared pieces ---------- */

.eyebrow {
  font-family: var(--body);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Filled chapter markers distinguish sections from the smaller item numbers. */
.eyebrow .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  color: var(--on-accent);
  background: var(--accent);
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 15px 22px;
  text-decoration: none;
  border-radius: 2px;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 19px 28px; font-size: 16px; }

.link-arrow {
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .18s var(--ease);
}
.link-arrow::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s var(--ease);
}
.link-arrow:hover { color: var(--ink); }
.link-arrow:hover::after { transform: rotate(45deg) translate(0, 0); }

.sec-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 18px;
}
.sec-intro { color: var(--ink-2); max-width: 54ch; font-size: 17px; }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  --wordmark-width: 192px;
  display: block;
  position: relative;
  width: var(--wordmark-width);
  aspect-ratio: 480 / 152;
  overflow: hidden;
  justify-self: start;
  flex: none;
  text-decoration: none;
}
/* Crop the supplied logo's outer margins while preserving its original file. */
.wordmark img {
  position: absolute;
  display: block;
  width: 128.333333%;
  max-width: none;
  height: auto;
  left: -16.666667%;
  top: -26.315789%;
  filter: invert(1) brightness(.92) sepia(.12);
}
.nav nav { display: flex; gap: 30px; }
.nav nav a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.nav nav a:hover { color: var(--ink); border-color: var(--accent); }
.btn-nav { justify-self: end; padding: 11px 16px; font-size: 14px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 38%, #000 70%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 38%, #000 70%);
}
.hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(84px, 12vw, 150px) var(--gutter) clamp(72px, 9vw, 120px);
  display: grid;
  gap: 26px;
}
.hero h1 { max-width: 12ch; }
.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 52ch;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 8px; }

/* load-in: content starts visible, the animation only refines it */
.reveal { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes rise {
  from { opacity: .001; transform: translateY(14px); }
  to   { opacity: 1;    transform: none; }
}

/* headline lights up word by word: dim, a brass flash, then settles to off-white */
.lit .w {
  --dim: #4b4740;
  color: var(--dim);
  animation: light 760ms var(--ease) both;
  animation-delay: calc(320ms + var(--i, 0) * 150ms);
}
@keyframes light {
  0%   { color: var(--dim);      text-shadow: 0 0 0 rgba(201,166,107,0); }
  38%  { color: var(--accent-2); text-shadow: 0 0 30px rgba(201,166,107,.55); }
  100% { color: var(--ink);      text-shadow: 0 0 0 rgba(201,166,107,0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
  .lit .w { animation: none; color: var(--ink); }
}

/* ---------- clients ---------- */

.clients {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 40px;
}
.clients-label {
  font-family: var(--body);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.logo-row {
  display: flex; flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px 40px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink);
  opacity: .62;
  text-decoration: none;
  transition: opacity .2s var(--ease);
}
.logo:hover, .logo:focus-visible { opacity: 1; }
.logo img { display: block; height: 28px; width: auto; }
.logo img[src$="tachi.svg"] { height: 26px; }
.logo img[src$="emoney.svg"] { height: 38px; }
.logo img.invert { filter: brightness(0) invert(1); }
.logo img.mono { filter: grayscale(1) brightness(1.4); }
.logo-nodeops { font-family: var(--body); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.logo-nodeops svg { width: 30px; height: 20px; }

/* ---------- services ---------- */

.services { padding: clamp(72px, 9vw, 120px) 0 0; border-top: 1px solid var(--line); }
.svc-grid {
  max-width: var(--max);
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.svc {
  position: relative;
  padding: 34px 36px 38px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  transition: background .25s var(--ease);
}
.svc:nth-child(odd) { padding-right: 48px; border-right: 1px solid var(--line); }
.svc:nth-child(even) { padding-left: 48px; }
.svc:last-child { border-bottom: 1px solid var(--line); }
/* generative study: one drawing per service, same pen as the hero field */
.study {
  display: block;
  width: 100%;
  height: 168px;
  margin-bottom: 14px;
}
.svc-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  transition: color .2s var(--ease);
}
.svc-num::before { content: "0"; }
.svc h3 { margin-top: 6px; }
.svc-kind { color: var(--ink-2); font-weight: 500; font-size: 14.5px; margin-top: -6px; }
.svc > p:not(.svc-kind) { color: var(--ink-2); max-width: 46ch; margin-top: 4px; }
.svc ul { margin-top: 10px; display: grid; gap: 7px; }
.svc li {
  position: relative; padding-left: 20px;
  font-size: 14.5px; color: var(--ink);
}
.svc li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 9px; height: 1px; background: var(--accent);
}
.svc:hover .svc-num { color: var(--accent-2); }

/* The fifth service closes the grid with its study beside the copy. */
@media (min-width: 901px) {
  .svc.svc-wide {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 96px;
    padding-right: 0;
    border-right: 0;
  }
  .svc-wide > .study {
    grid-column: 1;
    grid-row: 1 / span 5;
    align-self: center;
    margin-bottom: 0;
  }
  .svc-wide > :not(.study) { grid-column: 2; }
}

/* ---------- approach ---------- */

.approach { padding: clamp(72px, 9vw, 120px) 0; }
.approach-grid {
  max-width: var(--max);
  margin: 26px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}
.approach-lead { display: grid; gap: 22px; }
.approach-lead p { color: var(--ink-2); font-size: 17px; max-width: 48ch; }
.traits { margin: 0; display: grid; }
.trait {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.trait:last-child { border-bottom: 1px solid var(--line); }
.trait dt { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.trait dd { margin: 0; color: var(--ink-2); font-size: 15px; }

.steps-wrap {
  max-width: var(--max);
  margin: clamp(56px, 7vw, 96px) auto 0;
  padding: 0 var(--gutter);
}
.steps-title {
  font-family: var(--body);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-2);
}
.steps li {
  position: relative;
  padding: 26px 32px 30px 0;
  display: grid;
  gap: 10px;
  align-content: start;
}
.steps li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.steps li::before {
  content: ""; position: absolute; left: 0; top: -1px;
  width: 44px; height: 1px; background: var(--accent);
}
.steps li + li::before { left: 32px; }
.step-num {
  font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--accent);
}
.step-num::before { content: "0"; }
.steps p { color: var(--ink-2); font-size: 15px; max-width: 34ch; }

/* ---------- contact ---------- */

.contact {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(201,166,107,.10), transparent 60%),
    var(--bg-2);
}
.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  display: grid;
  gap: 22px;
}
.contact h2 { max-width: 16ch; font-size: clamp(34px, 5vw, 68px); }
.contact-sub { color: var(--ink-2); font-size: 17px; max-width: 48ch; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 12px; }
.email {
  font-family: var(--display); font-weight: 500; font-size: 17px;
  color: var(--ink-2); text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.email:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- footer ---------- */

.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
  color: var(--muted);
  font-size: 13.5px;
  border-top: 1px solid var(--line);
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-name { --wordmark-width: 168px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav nav { display: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc:nth-child(odd) { padding-right: 0; border-right: 0; }
  .svc:nth-child(even) { padding-left: 0; padding-right: 0; }
  .approach-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li { padding: 22px 0; border-top: 1px solid var(--line); }
  .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li::before { left: 0; }
  .clients { grid-template-columns: 1fr; gap: 20px; }
  .logo-row { justify-content: flex-start; gap: 20px 36px; }
  .field {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.45) 60%, #000 100%);
            mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.45) 60%, #000 100%);
  }
}
@media (max-width: 560px) {
  .nav .wordmark { --wordmark-width: 152px; }
  .study { height: 128px; }
  .trait { grid-template-columns: 1fr; gap: 4px; }
  .hero h1 { max-width: none; }
  .btn-nav { padding: 10px 14px; }
}
