/* =========================================================
   A&K Tech — styles matched to the original site's design tokens
   (colors, fonts and component patterns pulled from the live page)
   ========================================================= */

:root {
  --ak-p: #1e72a3;
  --ak-s: #5d5c6e;

  --ak-canvas: #fafafa;
  --ak-surface: #fff;
  --ak-elevated: #fff;
  --ak-hairline: #e4e4e7;
  --ak-ink: #09090b;
  --ak-ink-soft: #3f3f46;
  --ak-ink-muted: #71717a;
  --ak-glass-bg: #ffffff9e;
  --ak-glass-border: #e4e4e7e6;

  --shadow-glass: 0 1px 2px #09090b0a, 0 12px 32px -12px #09090b1f;
  --shadow-lift: 0 2px 4px #09090b08, 0 24px 56px -20px var(--ak-p);
  --shadow-float: 0 1px 1px #09090b0a, 0 18px 44px -16px #09090b2e;
  --brand-line: linear-gradient(90deg, var(--ak-p), var(--ak-s));

  --font-body: Inter, ui-sans-serif, system-ui, sans-serif;
  --font-head: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --max-width: 1160px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ak-canvas: #08080b;
  --ak-surface: #121218;
  --ak-elevated: #17171f;
  --ak-hairline: #26262f;
  --ak-ink: #f8f8fa;
  --ak-ink-soft: #c3c3cf;
  --ak-ink-muted: #8a8a96;
  --ak-glass-bg: #16161db8;
  --ak-glass-border: #ffffff17;
  --shadow-glass: 0 1px 2px #0006, 0 12px 32px -12px #0009;
  --shadow-lift: 0 2px 4px #00000059, 0 24px 56px -20px var(--ak-p);
  --shadow-float: 0 1px 1px #0006, 0 18px 44px -16px #0000009e;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ak-canvas: #08080b;
    --ak-surface: #121218;
    --ak-elevated: #17171f;
    --ak-hairline: #26262f;
    --ak-ink: #f8f8fa;
    --ak-ink-soft: #c3c3cf;
    --ak-ink-muted: #8a8a96;
    --ak-glass-bg: #16161db8;
    --ak-glass-border: #ffffff17;
    --shadow-glass: 0 1px 2px #0006, 0 12px 32px -12px #0009;
    --shadow-lift: 0 2px 4px #00000059, 0 24px 56px -20px var(--ak-p);
    --shadow-float: 0 1px 1px #0006, 0 18px 44px -16px #0000009e;
  }
}

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

body {
  margin: 0;
  background: var(--ak-canvas);
  color: var(--ak-ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* decorative background grid, like the original's blueprint pattern */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--ak-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ak-ink) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.035;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ak-ink);
  color: var(--ak-canvas);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--ak-p); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--ak-ink); }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--ak-ink-soft), var(--ak-p)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

.center { text-align: center; }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ak-p);
  margin: 0 0 12px;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--ak-ink-muted);
  background: var(--ak-glass-bg);
  border: 1px solid var(--ak-glass-border);
  border-radius: 999px;
  padding: 7px 16px;
  margin: 0 auto 24px;
  backdrop-filter: blur(8px);
}
.eyebrow-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ak-p); flex: none; }

.lede { font-size: 1.1rem; color: var(--ak-ink-muted); max-width: 640px; margin: 0 0 16px; }
.lede.center { margin-left: auto; margin-right: auto; }
.lede.small { max-width: 560px; font-size: 1rem; }

.panel-kicker { font-weight: 600; margin: 20px 0 10px; color: var(--ak-ink); }

.section-head { max-width: 680px; margin-left: auto; margin-right: auto; margin-bottom: 40px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: transform .15s ease, opacity .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm { height: 40px; padding: 0 20px; font-size: 0.88rem; }
.btn-primary { background: var(--ak-ink); color: var(--ak-canvas); }
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn-ghost {
  background: var(--ak-glass-bg);
  color: var(--ak-ink);
  border-color: var(--ak-glass-border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--ak-p); color: var(--ak-p); transform: translateY(-1px); text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--ak-p); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 20px 0 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ak-glass-bg);
  border: 1px solid var(--ak-glass-border);
  border-radius: 16px;
  padding: 10px 16px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-glass);
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ak-ink);
  flex: none;
}
.logo-mark { border-radius: 8px; }
.logo-word { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.02em; }

.nav-pill { flex: 1; display: flex; justify-content: center; }
.nav-menu {
  display: flex;
  list-style: none;
  gap: 22px;
  margin: 0; padding: 0;
}
.nav-menu a { color: var(--ak-ink); font-weight: 500; font-size: 0.92rem; }
.nav-menu a:hover { color: var(--ak-p); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.header-phone { color: var(--ak-ink-soft); font-size: 0.88rem; font-weight: 500; white-space: nowrap; }
.header-phone:hover { color: var(--ak-p); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 20px; height: 2px; background: var(--ak-ink); position: relative;
}
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.nav-menu-mobile {
  display: none;
  list-style: none;
  flex-direction: column;
  gap: 4px;
  margin: 8px 24px 0;
  padding: 12px 16px;
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 14px;
}
.nav-menu-mobile a { display: block; padding: 10px 4px; color: var(--ak-ink); font-weight: 500; }
.nav-menu-mobile.open { display: flex; }

@media (max-width: 860px) {
  .nav-pill, .header-phone { display: none; }
  .nav-toggle { display: block; }
}

/* Theme toggle (small icon version, header) */
.theme-toggle { display: flex; gap: 2px; background: var(--ak-hairline); border-radius: 999px; padding: 2px; }
.theme-toggle button {
  border: none;
  background: transparent;
  color: var(--ak-ink-muted);
  border-radius: 999px;
  width: 28px; height: 28px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle button[aria-pressed="true"] { background: var(--ak-surface); color: var(--ak-ink); box-shadow: var(--shadow-glass); }
.site-footer .theme-toggle { background: transparent; border: 1px solid var(--ak-hairline); }
.site-footer .theme-toggle button { width: auto; padding: 6px 14px; font-size: 0.8rem; font-weight: 500; }

@media (max-width: 860px) { .header-actions .theme-toggle { display: none; } }

/* Hero */
.hero { padding: 64px 0 0; text-align: center; }
.hero-inner { max-width: 780px; margin: 0 auto; }
h1 { text-align: center; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 56px; justify-content: center; }
.hero-ctas.center { justify-content: center; }

.stat-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  list-style: none;
  margin: 0 0 -60px;
  padding: 28px 0;
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  position: relative;
  z-index: 2;
}
.stat-card li {
  display: flex; flex-direction: column; gap: 4px;
  text-align: center;
  padding: 0 20px;
  border-left: 1px solid var(--ak-hairline);
}
.stat-card li:first-child { border-left: none; }
.stat-card strong { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; }
.stat-card span { color: var(--ak-ink-muted); font-size: 0.85rem; }

@media (max-width: 760px) {
  .stat-card { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .stat-card li { border-left: none; }
}

/* Sections */
.section { padding: 128px 0 64px; }
.section-alt { padding: 64px 0; background: color-mix(in oklab, var(--ak-surface) 50%, transparent); }
#audit.section-alt, #book.section-alt { padding: 96px 0; }
@media (max-width: 760px) {
  .section { padding: 72px 0 48px; }
  .section-alt { padding: 56px 0; }
}

/* Platforms marquee */
.platforms { padding-top: 64px; padding-bottom: 64px; overflow: hidden; }
.marquee { overflow: hidden; margin-top: 28px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: scroll-left 32s linear infinite;
}
.marquee-reverse .marquee-track { animation-name: scroll-right; animation-duration: 40s; margin-top: 12px; }
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ak-ink-muted);
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 999px;
  padding: 8px 18px;
  white-space: nowrap;
}
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scroll-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* Services tabs */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.service-card {
  text-align: left;
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 18px;
  padding: 26px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glass); }
.service-card[aria-selected="true"] { border-color: var(--ak-p); box-shadow: var(--shadow-lift); }
.service-card h3 { font-size: 1.05rem; margin: 8px 0 10px; }
.service-card > p:not(.service-summary) { color: var(--ak-ink-muted); font-size: 0.92rem; margin: 0 0 10px; }
.service-number { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ak-p); margin: 0; }
.service-summary { font-size: 0.9rem; color: var(--ak-ink-soft); margin: 0 0 12px; }
.service-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ak-p);
  border-top: 1px solid var(--ak-hairline);
  padding-top: 12px;
  width: 100%;
}
@media (max-width: 900px) { .service-cards { grid-template-columns: 1fr; } }

.service-panel {
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-glass);
}
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 900px) { .panel-grid { grid-template-columns: 1fr; } .service-panel { padding: 24px; } }

.check-list { list-style: none; padding: 0; margin: 0 0 16px; }
.check-list li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ak-ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ak-p);
}

.what-we-do { margin: 0 0 24px; }
.what-we-do > div { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ak-hairline); }
.what-we-do dt { font-weight: 700; margin-bottom: 4px; }
.what-we-do dd { margin: 0; color: var(--ak-ink-muted); font-size: 0.92rem; }

.panel-cta {
  background: color-mix(in oklab, var(--ak-p) 6%, var(--ak-surface));
  border: 1px solid var(--ak-hairline);
  border-radius: 14px;
  padding: 22px;
}
.panel-cta h4 { margin: 0 0 8px; }
.panel-cta p { color: var(--ak-ink-muted); margin: 0 0 16px; font-size: 0.92rem; }

/* Audit */
.audit-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.audit-side { display: flex; flex-direction: column; gap: 20px; }
.audit-card {
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 18px;
  padding: 26px;
}
.audit-why p { color: var(--ak-ink-muted); margin: 0 0 12px; }
@media (max-width: 900px) { .audit-inner { grid-template-columns: 1fr; } }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 56px; }
.why-card { padding: 26px; border-radius: 18px; border: 1px solid var(--ak-hairline); background: var(--ak-surface); }
.why-card p { color: var(--ak-ink-muted); margin: 0; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }
.about-footer { max-width: 720px; margin: 0 auto; padding-top: 32px; border-top: 1px solid var(--ak-hairline); }

/* Capabilities */
.capability-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.capability-card {
  text-align: left;
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s ease, transform .15s ease;
}
.capability-card:hover { transform: translateY(-2px); }
.capability-card.selected { border-color: var(--ak-p); box-shadow: 0 0 0 1px var(--ak-p) inset; }
.cap-name { font-weight: 700; }
.cap-desc { color: var(--ak-ink-muted); font-size: 0.88rem; }
.cap-price { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ak-p); margin-top: 8px; }
@media (max-width: 900px) { .capability-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .capability-grid { grid-template-columns: 1fr; } }

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 18px;
  padding: 24px 28px;
}
.selection-hint { color: var(--ak-ink-muted); font-size: 0.88rem; margin: 4px 0 0; }
#selectionCount { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; margin: 0; }

/* Non-profits */
.asks-grid {
  list-style: none;
  padding: 0;
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 800px;
}
.asks-grid li {
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* Book / contact */
.talk-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 0;
  margin: 56px 0 0;
  text-align: center;
}
.talk-grid li { display: flex; flex-direction: column; gap: 6px; }
.talk-grid a, .talk-grid span:last-child { font-weight: 600; }
@media (max-width: 900px) { .talk-grid { grid-template-columns: repeat(2, 1fr); } }

/* Contact form (matches audit-card / panel-cta visual language) */
.contact-form-card {
  max-width: 640px;
  margin: 48px auto 0;
  background: var(--ak-surface);
  border: 1px solid var(--ak-hairline);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-glass);
}
.contact-form-card h3 { margin-bottom: 24px; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ak-ink);
}
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--ak-hairline);
  background: var(--ak-canvas);
  color: var(--ak-ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--ak-p);
  outline-offset: 1px;
}
.contact-form .btn { align-self: center; margin-top: 4px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) { .contact-form .form-row { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { border-top: 1px solid var(--ak-hairline); }
.footer-top { text-align: center; padding: 72px 24px 56px; border-bottom: 1px solid var(--ak-hairline); }
.footer-top .btn { margin: 8px 12px 0; }
.footer-phone { display: inline-block; margin-left: 8px; color: var(--ak-ink-soft); font-weight: 500; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 56px 24px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand p { color: var(--ak-ink-muted); margin: 0; font-size: 0.9rem; }
.taking-clients { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--ak-p) !important; }
.footer-heading { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 14px; color: var(--ak-ink-muted); font-weight: 500; }
.site-footer nav ul, .footer-contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer nav a, .footer-contact-list a { color: var(--ak-ink-soft); font-size: 0.92rem; }
.site-footer nav a:hover, .footer-contact-list a:hover { color: var(--ak-p); }

.footer-bottom {
  padding: 24px;
  border-top: 1px solid var(--ak-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--ak-ink-muted);
  font-size: 0.85rem;
}
.legal-links { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; }
.legal-links a { color: var(--ak-ink-muted); }
.back-to-top { color: var(--ak-ink-muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Layout helpers for the standalone pages. These live here rather than as
   inline style="" attributes so the Content-Security-Policy can keep
   style-src locked to 'self' with no 'unsafe-inline'. */
.legal-page { max-width: 760px; }
.thanks-main { padding-bottom: 96px; }
.thanks-title { font-size: clamp(1.9rem, 4vw, 2.6rem); }
