/* =========================================================
   Apex Technology — Strategic Technology Partner
   Premium consulting aesthetic: dark charcoal/steel palette,
   an orange-to-bronze accent, generous whitespace,
   bold geometric display paired with a quiet sans body.
   ========================================================= */

:root {
  /* Deep gray, not pure black — reads as modern tech, not a hole in the page */
  --bg: #121212;
  --panel: #1b1b1b;
  --panel-2: #232323;
  --line: rgba(245, 244, 241, 0.09);
  --line-strong: rgba(245, 244, 241, 0.16);

  --white: #f5f4f1;
  --steel-200: #d9d7d1;
  --steel-400: #a9a6a0;
  --steel-600: #78766f;

  --copper-dark: #7a4e2c;
  --copper: #b9773f;
  --copper-bright: #dd9d5c;

  --forge-line: linear-gradient(90deg, var(--copper-dark) 0%, var(--copper) 50%, var(--copper-bright) 100%);

  --font-display: "Poppins", "Space Grotesk", sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --max-width: 1160px;
  --radius: 2px;

  color-scheme: dark;
}

/* Light theme — same structure, inverted surfaces, deepened accent for contrast */
:root[data-theme="light"] {
  --bg: #f7f5f2;
  --panel: #ffffff;
  --panel-2: #efece6;
  --line: rgba(18, 17, 15, 0.10);
  --line-strong: rgba(18, 17, 15, 0.18);

  --white: #17140f;
  --steel-200: #3a362f;
  --steel-400: #66625a;
  --steel-600: #8f8b82;

  --copper-dark: #6e4a2c;
  --copper: #a9682f;
  --copper-bright: #8a5427;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--steel-200);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 480px) {
  .wrap { padding: 0 22px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--copper);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--white);
}
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 18px; color: var(--steel-400); }
.lede { font-size: 1.2rem; color: var(--steel-200); max-width: 600px; line-height: 1.65; }
.hero-tagline {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--copper-bright);
  max-width: 600px;
  margin: -8px 0 22px;
  line-height: 1.4;
}
.muted { color: var(--steel-600); }

/* =========================================================
   Nav
   ========================================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 15, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: 0.01em;
}
.brand-mark { height: 28px; width: auto; flex-shrink: 0; }
.brand-lockup { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand-name {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--white);
}
.brand-tag {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
}
.nav-links { display: flex; gap: 38px; align-items: center; }
.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--steel-400);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a.active, .nav-links a:hover { color: var(--white); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--forge-line);
}
.nav-cta {
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid var(--line-strong);
  padding: 11px 22px;
  border-radius: var(--radius);
  color: var(--white);
  transition: border-color 0.2s, background 0.2s;
}
.nav-cta:hover { border-color: var(--copper); background: rgba(185,119,63,0.08); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 1px; background: var(--white); }

/* Light / dark toggle switch */
.theme-toggle { background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; }
.theme-toggle-track {
  width: 42px;
  height: 23px;
  border-radius: 20px;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  padding: 2px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.theme-toggle-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--forge-line);
  transform: translateX(0);
  transition: transform 0.25s ease;
}
:root[data-theme="light"] .theme-toggle-thumb { transform: translateX(18px); }
.theme-toggle:hover .theme-toggle-track { border-color: var(--copper); }

:root[data-theme="light"] .hero-lockup-wrap::before { opacity: 0.5; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .site-nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 84px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 24px 40px 32px;
    gap: 20px;
  }
}

/* =========================================================
   Forge line — signature device (subtle, monochrome copper)
   ========================================================= */
.forge-rule { height: 1px; background: var(--forge-line); border: none; margin: 0; opacity: 0.7; }
.forge-underline { height: 2px; width: 56px; background: var(--forge-line); margin: 22px 0 0; }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: 150px 0 120px; position: relative; overflow: hidden; }
@media (max-width: 480px) { .hero { padding: 110px 0 70px; } }
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { max-width: 760px; }
.hero .lede { max-width: 580px; }

.hero .wrap.hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-text { flex: 1 1 460px; min-width: 280px; }
.hero-lockup-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.hero-lockup-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 780px;
  height: 780px;
  background: radial-gradient(circle closest-side at center,
    rgba(185,119,63,0.12) 0%,
    rgba(185,119,63,0.09) 22%,
    rgba(185,119,63,0.05) 45%,
    rgba(185,119,63,0.02) 68%,
    rgba(185,119,63,0.006) 85%,
    rgba(185,119,63,0) 100%
  );
  z-index: -1;
  pointer-events: none;
}
.hero-lockup-wrap-sm { width: 220px; }
.hero-lockup-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 32px rgba(0,0,0,0.28));
}
@media (max-width: 1080px) {
  .hero-lockup-wrap { width: 220px; }
  .hero-lockup-wrap-sm { width: 170px; }
  .hero-lockup-wrap::before { width: 520px; height: 520px; }
}
@media (max-width: 720px) {
  .hero-text { flex-basis: 100%; }
  .hero-lockup-wrap { width: 45vw; max-width: 200px; }
  .hero-lockup-wrap::before { width: 340px; height: 340px; }
}

.btn-row { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 15px 28px;
  border-radius: var(--radius);
  display: inline-block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--copper); color: #14100b; font-weight: 600; }
.btn-primary:hover { background: var(--copper-bright); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(185,119,63,0.25); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--white); }
.btn-ghost:hover { border-color: var(--copper); }

/* =========================================================
   Sections
   ========================================================= */
section { padding: 110px 0; }
.section-tight { padding: 70px 0; }
.section-panel { background: var(--panel); }
.section-head { max-width: 620px; margin-bottom: 56px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--bg); padding: 44px 36px; }
.section-panel .card { background: var(--panel); }
.card h3 { margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.card .cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-600);
  margin-bottom: 16px;
  display: block;
}

/* Pillars list */
.pillars { border-top: 1px solid var(--line); }
.pillar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 700px) { .pillar { grid-template-columns: 1fr; gap: 10px; } }
.pillar-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-bright); padding-top: 4px; }
.pillar p { margin: 0; color: var(--steel-200); font-size: 1.05rem; }

/* Process steps */
.steps { counter-reset: step; }
.step { display: grid; grid-template-columns: 100px 1fr; gap: 32px; padding: 38px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; }
.step-num { font-family: var(--font-mono); font-size: 13px; color: var(--copper-bright); padding-top: 4px; }
.step h3 { margin-bottom: 10px; }

/* CTA band */
.cta-band { background: var(--panel); padding: 90px 0; position: relative; }
.cta-band h2 { margin-bottom: 14px; }
.cta-flex { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }

/* Tags */
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tag { font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--line-strong); padding: 8px 16px; border-radius: var(--radius); color: var(--steel-200); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 70px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 22px; }
.field label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel-600); margin-bottom: 9px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--panel);
  color: var(--white);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 1px solid var(--copper); outline-offset: 1px; border-color: var(--copper); }
.info-block { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 26px; }
.info-block:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.info-block .eyebrow { margin-bottom: 10px; }
.info-block p { color: var(--steel-200); }
.info-block a { color: var(--copper-bright); border-bottom: 1px solid rgba(221,157,92,0.35); }

/* Footer */
footer { padding: 60px 0 36px; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; padding-bottom: 34px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.footer-links { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--steel-400); }
.footer-links a:hover { color: var(--copper-bright); }
.footer-bottom { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11.5px; color: var(--steel-600); flex-wrap: wrap; gap: 10px; }
.footer-bottom a:hover { color: var(--copper-bright); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* =========================================================
   Insights — index grid + article typography
   ========================================================= */
.category-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.category-pill {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  padding: 9px 16px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--steel-400);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.category-pill:hover { border-color: var(--copper); color: var(--steel-200); }
.category-pill.active { background: var(--copper); border-color: var(--copper); color: #14100b; font-weight: 600; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--bg);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease;
}
.post-card:hover { background: var(--panel); }
.post-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-600);
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}
.post-card h3 { margin-bottom: 12px; }
.post-card p { margin-bottom: 0; }
.post-read {
  margin-top: 20px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--copper-bright);
}

.post-header { padding: 100px 0 60px; }
.post-header .post-meta { margin-bottom: 20px; }
.post-header h1 { max-width: 760px; }

.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 70px 0 100px;
}
.article p { color: var(--steel-200); font-size: 1.05rem; margin-bottom: 22px; }
.article h2 { font-size: 1.5rem; margin: 48px 0 18px; }
.article h3 { font-size: 1.15rem; margin: 36px 0 14px; }
.article ul, .article ol { color: var(--steel-200); font-size: 1.05rem; padding-left: 22px; margin-bottom: 22px; }
.article ul.check-list { list-style: none; padding-left: 0; margin-top: 24px; }
.article ul.check-list li { padding-left: 32px; position: relative; margin-bottom: 18px; }
.article ul.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--copper-bright);
  font-weight: 700;
  font-size: 1.1rem;
}
.article ul.check-list strong { color: var(--white); }
.article ol.numbered-framework { padding-left: 0; margin-top: 20px; counter-reset: framework; }
.article ol.numbered-framework li {
  list-style: none;
  padding-left: 44px;
  position: relative;
  margin-bottom: 16px;
  counter-increment: framework;
}
.article ol.numbered-framework li::before {
  content: counter(framework);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--copper);
  color: var(--copper-bright);
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.article li { margin-bottom: 10px; }
.article blockquote {
  margin: 40px 0;
  padding-left: 26px;
  border-left: 2px solid var(--copper);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  font-style: normal;
}
.article-back { display: inline-block; margin-bottom: 40px; font-family: var(--font-mono); font-size: 12.5px; color: var(--steel-400); }
.article-back:hover { color: var(--copper-bright); }
.article-cta {
  border-top: 1px solid var(--line);
  margin-top: 50px;
  padding-top: 40px;
}

/* Share row — bottom of every article */
.share-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.share-row .share-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-600);
}
.share-row a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-400);
  transition: border-color 0.2s, color 0.2s;
}
.share-row a:hover { border-color: var(--copper); color: var(--copper-bright); }
.share-row svg { width: 16px; height: 16px; fill: currentColor; }

/* Founder's note — top of Insights index */
.founders-note {
  max-width: 680px;
  margin-bottom: 60px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}
.founders-note p { color: var(--steel-200); font-size: 1.05rem; margin-bottom: 14px; }
.founders-note p.emphasis { color: var(--white); font-weight: 500; font-family: var(--font-display); font-size: 1.2rem; }
.founders-note .signoff { color: var(--steel-400); font-size: 0.95rem; margin-top: 22px; }
