/* ==========================================================================
   Black Cat Holdings — public site design system
   Identity: ink monochrome + warm paper, one alpine accent, topo motif.
   ========================================================================== */

:root {
  --ink: #101014;
  --ink-soft: #3c3c44;
  --ink-mute: #6e6e78;
  --paper: #fafaf7;
  --paper-raised: #ffffff;
  --line: #e4e2da;
  --line-strong: #cfccc2;
  --accent: #1f5b44;          /* alpine pine */
  --accent-soft: #eaf2ee;
  --topo-opacity: 0.38;
  --shadow-card: 0 1px 2px rgba(16,16,20,.04), 0 12px 32px -16px rgba(16,16,20,.14);
  --shadow-lift: 0 2px 4px rgba(16,16,20,.05), 0 24px 48px -20px rgba(16,16,20,.22);
  --radius: 14px;
  --max: 1120px;
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f2ee;
    --ink-soft: #c3c3bd;
    --ink-mute: #8b8b90;
    --paper: #131316;
    --paper-raised: #1b1b1f;
    --line: #29292e;
    --line-strong: #3a3a41;
    --accent: #6fbf9c;
    --accent-soft: #1a2b24;
    --topo-opacity: 0.25;
    --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.5);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.35), 0 24px 48px -20px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --ink: #f2f2ee;
  --ink-soft: #c3c3bd;
  --ink-mute: #8b8b90;
  --paper: #131316;
  --paper-raised: #1b1b1f;
  --line: #29292e;
  --line-strong: #3a3a41;
  --accent: #6fbf9c;
  --accent-soft: #1a2b24;
  --topo-opacity: 0.25;
  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -16px rgba(0,0,0,.5);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.35), 0 24px 48px -20px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-square { width: 30px; height: 30px; background: var(--ink); flex: none; }
.brand-name { font-size: 15px; letter-spacing: .16em; line-height: 1.25; font-weight: 300; text-transform: uppercase; white-space: nowrap; }
.brand-name b { font-weight: 600; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 8px 13px; border-radius: 8px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav .nav-portal {
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 16px;
  font-weight: 600; color: var(--ink); margin-left: 10px;
}
.site-nav .nav-portal:hover { border-color: var(--ink); background: transparent; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--ink); font: inherit; font-size: 13px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper-raised); border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px; box-shadow: var(--shadow-lift);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 15px; }
  .site-nav .nav-portal { margin-left: 0; text-align: center; margin-top: 8px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-topo {
  position: absolute; inset: 0; z-index: 0; opacity: var(--topo-opacity);
  pointer-events: none; user-select: none;
}
/* fade the texture out behind the headline with a cheap gradient overlay */
.hero-topo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--paper) 22%, transparent 62%);
}
.hero-inner { position: relative; z-index: 1; padding: 108px 0 96px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 26px;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--line-strong); }
h1.display {
  font-size: clamp(38px, 6vw, 64px); line-height: 1.06; font-weight: 300;
  letter-spacing: -0.015em; max-width: 15ch;
}
h1.display b, h1.display strong { font-weight: 600; }
.hero-sub { margin-top: 26px; font-size: 19px; color: var(--ink-soft); max-width: 56ch; font-weight: 400; }
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 72px; display: flex; gap: 40px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 24px;
}
.hero-meta div { font-size: 13px; color: var(--ink-mute); letter-spacing: .04em; }
.hero-meta strong { display: block; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: 0; margin-bottom: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; text-decoration: none;
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- sections ---------- */
section.block { padding: 88px 0; }
section.block.tight { padding: 64px 0; }
section.alt { background: var(--paper-raised); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(27px, 3.6vw, 36px); font-weight: 300; letter-spacing: -0.01em; line-height: 1.15; }
.section-head h2 b { font-weight: 600; }
.section-head p { margin-top: 16px; color: var(--ink-soft); font-size: 17px; }

/* ---------- portfolio cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: 1fr; } }

.company-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px 28px; text-decoration: none; display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.company-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.company-card .logo-well {
  height: 64px; display: flex; align-items: center; margin-bottom: 22px;
}
.company-card .logo-well img { max-height: 44px; width: auto; max-width: 210px; }
.chip {
  align-self: flex-start; font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 14px;
}
.company-card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.company-card p { font-size: 15px; color: var(--ink-soft); flex: 1; }
.card-cta { margin-top: 22px; font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.card-cta::after { content: "→"; transition: transform .15s; }
.company-card:hover .card-cta::after { transform: translateX(3px); }

/* JAG lockup rendered from alpha masks so it works on any background */
.jag-lockup { display: flex; align-items: center; gap: 10px; height: 44px; }
.jag-lockup .m { height: 38px; mask-size: contain; -webkit-mask-size: contain; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; mask-position: center; -webkit-mask-position: center; }
.jag-lockup .m-jag { width: 74px; background: var(--ink); mask-image: url(/assets/img/logo-jag-white-alpha.png); -webkit-mask-image: url(/assets/img/logo-jag-white-alpha.png); }
.jag-lockup .m-vs { width: 30px; background: #29abe2; mask-image: url(/assets/img/logo-vs-alpha.png); -webkit-mask-image: url(/assets/img/logo-vs-alpha.png); }
.jag-lockup .m-swag { width: 86px; background: #e82b8e; mask-image: url(/assets/img/logo-swag-pink-alpha.png); -webkit-mask-image: url(/assets/img/logo-swag-pink-alpha.png); }

/* ---------- capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 860px) { .cap-grid { grid-template-columns: 1fr; } }
.cap { background: var(--paper-raised); padding: 30px 28px; }
.cap h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.cap h3 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.cap p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- ecosystem diagram ---------- */
.eco { display: flex; justify-content: center; }
.eco svg { width: 100%; max-width: 780px; height: auto; }
.eco text { font-family: var(--font); }

/* ---------- frisco strip ---------- */
.frisco {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 860px) { .frisco { grid-template-columns: 1fr; gap: 36px; } }
.frisco h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 300; line-height: 1.18; }
.frisco h2 b { font-weight: 600; }
.frisco p { margin-top: 18px; color: var(--ink-soft); }
.elev {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised);
  padding: 34px; box-shadow: var(--shadow-card); position: relative; overflow: hidden;
}
.elev .topo-bg { position: absolute; inset: 0; opacity: calc(var(--topo-opacity) * .8); pointer-events: none; }
.elev-rows { position: relative; display: grid; gap: 20px; }
.elev-row { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.elev-row:last-child { border-bottom: 0; padding-bottom: 0; }
.elev-row span { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.elev-row strong { font-size: 17px; font-weight: 600; }

/* ---------- prose pages ---------- */
.page-head { padding: 84px 0 56px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 300; letter-spacing: -0.015em; line-height: 1.08; max-width: 18ch; }
.page-head h1 b { font-weight: 600; }
.page-head .lede { margin-top: 20px; font-size: 18px; color: var(--ink-soft); max-width: 58ch; }
.prose { max-width: 720px; }
.prose h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 52px 0 16px; }
.prose h3 { font-size: 18px; font-weight: 600; margin: 34px 0 10px; }
.prose p { margin-bottom: 18px; color: var(--ink-soft); }
.prose ul { margin: 0 0 18px 22px; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); }

/* ---------- principles / timeline ---------- */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }
.principle { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised); padding: 28px; box-shadow: var(--shadow-card); }
.principle .num { font-size: 12px; letter-spacing: .2em; color: var(--accent); font-weight: 700; }
.principle h3 { font-size: 18px; font-weight: 600; margin: 10px 0 8px; }
.principle p { font-size: 14.5px; color: var(--ink-soft); }

.timeline { border-left: 1px solid var(--line-strong); margin-left: 8px; padding-left: 32px; display: grid; gap: 34px; }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -37px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-item .tl-year { font-size: 12.5px; letter-spacing: .18em; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; }
.tl-item h3 { font-size: 17px; font-weight: 600; margin: 4px 0 4px; }
.tl-item p { font-size: 14.5px; color: var(--ink-soft); }

/* ---------- company profile ---------- */
.profile-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.profile-logo {
  width: 132px; height: 132px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--paper-raised); display: flex; align-items: center; justify-content: center;
  padding: 20px; box-shadow: var(--shadow-card); flex: none;
}
.profile-logo img { max-height: 76px; width: auto; }
.profile-logo.dark-tile { background: #0b0b0d; border-color: #222; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 44px 0; }
.fact { background: var(--paper-raised); padding: 20px 22px; }
.fact span { display: block; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 5px; }
.fact strong { font-size: 15.5px; font-weight: 600; }
.fact a { color: var(--accent); text-decoration: none; }
.fact a:hover { text-decoration: underline; }

.related { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .related { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact-paths { display: grid; gap: 14px; }
.path { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--paper-raised); }
.path h3 { font-size: 15px; font-weight: 600; }
.path p { font-size: 13.5px; color: var(--ink-mute); margin-top: 3px; }

form.contact { display: grid; gap: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .04em; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--paper-raised); color: var(--ink); font: inherit; font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 13px; color: var(--ink-mute); }
.form-status { font-size: 14.5px; font-weight: 600; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #c0392b; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .cta-band, [data-theme="dark"] .cta-band { border-block: 1px solid var(--line); }
.cta-band .inner { padding: 84px 0; text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 300; }
.cta-band h2 b { font-weight: 600; }
.cta-band p { margin: 14px auto 34px; max-width: 52ch; opacity: .78; }
.cta-band .btn-primary { background: var(--paper); color: var(--ink); }
.cta-band .btn-ghost { border-color: color-mix(in srgb, var(--paper) 35%, transparent); color: var(--paper); }
.cta-band .btn-ghost:hover { border-color: var(--paper); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 44px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px; font-weight: 700; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { text-decoration: none; font-size: 14px; color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.footer-brand p { font-size: 13.5px; color: var(--ink-mute); margin-top: 14px; max-width: 34ch; }
.footer-legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-mute); }

.theme-toggle {
  background: none; border: none; cursor: pointer; font-size: 16px; color: var(--ink-mute);
  padding: 6px 8px; border-radius: 8px; line-height: 1;
}
.theme-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* reveal on scroll (progressive — only hides content when JS is running) */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
