/* AB Capital — Graphite Signal */
:root {
  --bg: #1A1C1F;
  --bg-alt: #1E2023;
  --panel: #24272B;
  --graphite: #2A2D31;
  --line: #3A3E44;
  --text: #E9E6E0;
  --muted: #A9A59D;
  --red: #E5484D;
  --red-text: #FF7A7E;
  --mono: 'Space Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: Manrope, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--red-text); }
a:hover { color: var(--text); }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
p { text-wrap: pretty; margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--red); color: var(--bg); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 48px; }
.eyebrow { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.18em; color: var(--red-text); text-transform: uppercase; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 32px; }
.section { padding: 112px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 44px; line-height: 1.1; font-weight: 800; max-width: 820px; }
.lead { font-size: 18px; line-height: 1.65; color: var(--muted); }
.grid-bg {
  background-color: var(--bg);
  background-image: linear-gradient(rgba(58,62,68,.33) 1px, transparent 1px), linear-gradient(90deg, rgba(58,62,68,.33) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(26,28,31,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-family: var(--mono); font-weight: 700; font-size: 18px; letter-spacing: 0.1em; }
.brand svg { width: 38px; height: 38px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--text); text-decoration: none; padding: 12px 4px; }
.nav a[aria-current="page"] { color: var(--red-text); border-bottom: 2px solid var(--red); }
.nav a.btn { padding: 14px 20px; }
.menu-toggle { display: none; width: 48px; height: 48px; background: transparent; border: 1px solid var(--line); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--text); }
.menu-toggle span:last-child { width: 14px; background: var(--red); }

/* Buttons */
.btn { display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-decoration: none; padding: 16px 24px; border: 1px solid var(--red); background: var(--red); color: var(--bg) !important; cursor: pointer; text-align: center; }
.btn:hover { background: #F0666A; }
.btn.ghost { background: transparent; color: var(--text) !important; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--text); }
.chip { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; padding: 12px 18px; min-height: 44px; cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--bg); font-weight: 700; }

/* Hero */
.hero { padding: 104px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: 68px; line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; }
.terminal { background: #111315; border: 1px solid var(--line); font-family: var(--mono); font-size: 15px; line-height: 1.9; padding: 20px 24px; max-width: 560px; }
.terminal .word { color: var(--red-text); }
.cursor { color: var(--red); animation: blink 1s steps(1) infinite; }
.hero-mark { display: flex; justify-content: center; }
.hero-mark svg { width: 100%; max-width: 400px; height: auto; }
.pins { animation: pulse 2.4s ease-in-out infinite; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; }
.stats { margin-top: 88px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.stats div { padding: 24px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats strong { display: block; font-family: var(--mono); font-size: 40px; line-height: 1.3; }
.stats span { font-size: 14px; color: var(--muted); }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }

/* About */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.card { background: var(--panel); border-top: 2px solid var(--red); padding: 24px; }
.card h3 { font-size: 18px; margin: 8px 0; }
.card p { font-size: 15px; color: var(--muted); line-height: 1.55; }

/* Portfolio */
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.companies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.company { display: flex; flex-direction: column; gap: 16px; padding: 24px; min-height: 150px; text-align: left; font-family: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.company[aria-pressed="true"] { background: var(--graphite); border-color: var(--red); }
.company[hidden] { display: none; }
.company .top { display: flex; justify-content: space-between; gap: 12px; }
.company .name { font-weight: 800; font-size: 22px; line-height: 1.2; }
.company .stake { font-family: var(--mono); font-weight: 700; font-size: 28px; }
.company .sector { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--red-text); }
.bar { height: 6px; background: var(--line); }
.bar i { display: block; height: 6px; background: var(--red); }
.detail { background: var(--panel); border: 1px solid var(--line); padding: 32px; display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.detail .label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.detail h3 { font-size: 24px; margin: 6px 0; }
.detail p { font-size: 18px; line-height: 1.65; }

/* Sectors */
.tabs { display: grid; grid-template-columns: 360px 1fr; gap: 24px; }
.tablist { display: flex; flex-direction: column; gap: 8px; }
.tab { display: flex; gap: 16px; align-items: center; padding: 18px 20px; min-height: 60px; font-family: inherit; font-size: 17px; font-weight: 700; text-align: left; color: var(--text); background: transparent; border: 1px solid var(--line); cursor: pointer; }
.tab span { font-family: var(--mono); color: var(--red-text); }
.tab[aria-selected="true"] { background: var(--graphite); border-color: var(--red); }
.tabpanel { background: var(--panel); border: 1px solid var(--line); padding: 40px; display: flex; flex-direction: column; gap: 28px; }
.tabpanel .head { display: flex; align-items: baseline; gap: 20px; }
.tabpanel .num { font-family: var(--mono); font-weight: 700; font-size: 64px; color: var(--red); line-height: 1; }
.tabpanel h3 { font-size: 32px; font-weight: 800; }
.tabpanel .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; font-size: 18px; }

/* Approach & ambition */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.step { display: flex; flex-direction: column; gap: 8px; padding: 20px 16px; min-height: 96px; text-align: left; font-family: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.step span { font-family: var(--mono); font-size: 13px; color: var(--red-text); }
.step strong { font-size: 20px; }
.step[aria-pressed="true"] { background: var(--graphite); border-color: var(--red); }
.readout { background: var(--panel); border-top: 2px solid var(--red); padding: 28px 32px; font-size: 19px; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--line); }
.phase { display: flex; flex-direction: column; gap: 10px; padding: 24px 20px 24px 0; min-height: 110px; text-align: left; font-family: inherit; color: var(--text); background: transparent; border: 0; border-top: 4px solid transparent; margin-top: -3px; opacity: .7; cursor: pointer; }
.phase span { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--red-text); }
.phase strong { font-size: 22px; }
.phase[aria-pressed="true"] { border-top-color: var(--red); opacity: 1; }
.phase-text { font-size: 20px; max-width: 860px; }

/* Contact */
.contact { background: var(--graphite); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact dl { margin: 0; display: flex; flex-direction: column; gap: 20px; font-size: 18px; }
.contact dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--red-text); }
.contact dd { margin: 6px 0 0; }
.contact dd a { color: var(--text); }
form.contact-form { background: var(--bg); border: 1px solid var(--line); padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.contact-form label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.contact-form input, .contact-form textarea { background: #111315; border: 1px solid var(--line); color: var(--text); font: 16px var(--sans); padding: 14px; width: 100%; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .hp { position: absolute; left: -9999px; }
.form-note { font-family: var(--mono); font-size: 14px; color: var(--red-text); min-height: 1.5em; }

/* Blog */
.blog-hero { padding: 88px 0 56px; border-bottom: 1px solid var(--line); }
.blog-hero h1 { font-size: 56px; line-height: 1.05; font-weight: 800; max-width: 900px; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.post:hover { border-color: var(--red); color: var(--text); }
.post .cover { aspect-ratio: 16 / 9; background: #111315; border-bottom: 1px solid var(--line); object-fit: cover; width: 100%; }
.post .body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.post .meta { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
.post .meta .cat { color: var(--red-text); }
.post h2 { font-size: 21px; line-height: 1.25; font-weight: 800; }
.post p { font-size: 15px; color: var(--muted); }
.empty { padding: 48px; border: 1px dashed var(--line); text-align: center; color: var(--muted); }
.article { max-width: 760px; margin: 0 auto; padding: 56px 24px 112px; display: flex; flex-direction: column; gap: 24px; }
.article h1 { font-size: 46px; line-height: 1.1; font-weight: 800; }
.article h2 { font-size: 28px; font-weight: 800; margin-top: 16px; }
.article p { font-size: 18px; line-height: 1.75; color: #D2CEC6; }
.article .standfirst { font-size: 21px; color: var(--text); }
.article blockquote { margin: 8px 0; padding: 20px 24px; border-left: 3px solid var(--red); background: var(--panel); font-size: 22px; line-height: 1.5; font-weight: 600; }
.article img { width: 100%; height: auto; border: 1px solid var(--line); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 32px; padding-bottom: 32px; flex-wrap: wrap; }
.site-footer .brand svg { width: 40px; height: 40px; }
.site-footer small { font-size: 14px; color: var(--muted); }

/* Tablet */
@media (max-width: 1024px) {
  .wrap { padding: 0 32px; }
  .hero h1 { font-size: 52px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .companies, .posts { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .tabs { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .menu-toggle { display: flex; }
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 0 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav a.btn { margin-top: 16px; }
  .section { padding: 64px 0; }
  .section h2 { font-size: 30px; }
  .hero { padding: 48px 0; }
  .hero-grid, .two-col, .contact-grid, .detail { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 40px; }
  .hero-mark { order: 2; }
  .hero-mark svg { max-width: 220px; }
  .terminal { font-size: 13px; padding: 16px; }
  .actions .btn { width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .stats div { border-bottom: 1px solid var(--line); }
  .stats div:nth-child(2n) { border-right: 0; }
  .stats strong { font-size: 28px; }
  .values, .companies, .posts, .phases { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tabpanel { padding: 22px; }
  .tabpanel .cols { grid-template-columns: 1fr; font-size: 16px; }
  .tabpanel .num { font-size: 40px; }
  .tabpanel h3 { font-size: 22px; }
  .detail { padding: 20px; }
  .detail p, .readout, .phase-text { font-size: 16px; }
  form.contact-form { padding: 20px; }
  .blog-hero h1 { font-size: 36px; }
  .article h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .pins { animation: none; }
}
