/* AK Group Capital — global stylesheet */

:root {
  --bg: #080b13;
  --bg-elevated: #0d1119;
  --bg-card: #10141f;
  --border: #1f2637;
  --border-soft: #161c29;
  --text: #edeef0;
  --text-muted: #9aa3af;
  --text-faint: #626b79;
  --accent: #c9a961;
  --accent-soft: #c9a96122;
  --accent-2: #4f83f0;
  --accent-2-soft: #4f83f022;
  --header-bg: rgba(10, 13, 18, 0.85);
  --graphic-ink: #edeef0;
  --glow-1: rgba(201, 169, 97, 0.07);
  --glow-2: rgba(79, 131, 240, 0.12);
  --glow-3: rgba(79, 131, 240, 0.06);
  --dot-grid: rgba(237, 238, 240, 0.05);
  --max-width: 1120px;
  --radius: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  --bg: #f7f6f2;
  --bg-elevated: #efece3;
  --bg-card: #ffffff;
  --border: #e3ddd0;
  --border-soft: #ebe6db;
  --text: #14161c;
  --text-muted: #565b64;
  --text-faint: #868c96;
  --accent: #96742a;
  --accent-soft: #96742a1f;
  --accent-2: #3a63d1;
  --accent-2-soft: #3a63d11f;
  --header-bg: rgba(247, 246, 242, 0.85);
  --graphic-ink: #1a2030;
  --glow-1: rgba(150, 116, 42, 0.08);
  --glow-2: rgba(58, 99, 209, 0.09);
  --glow-3: rgba(58, 99, 209, 0.05);
  --dot-grid: rgba(20, 22, 28, 0.06);
}

@media (prefers-reduced-motion: no-preference) {
  body,
  .site-header,
  .contact-card,
  .cta-band,
  .approach-row,
  .service-group-head {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* Background texture */
body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, var(--glow-1), transparent 60%),
    radial-gradient(ellipse 900px 700px at 100% 5%, var(--glow-2), transparent 55%),
    radial-gradient(ellipse 800px 500px at 10% 110%, var(--glow-3), transparent 60%);
  background-repeat: no-repeat;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand .emblem {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand .full {
  color: var(--text);
  font-weight: 600;
}

.brand .sub {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-left: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
}

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  margin-left: 20px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 120px 0 100px;
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}

.hero .wrap {
  position: relative;
  z-index: 2;
}

.hero-visual {
  position: absolute;
  top: 50%;
  right: -8%;
  transform: translateY(-50%);
  width: 640px;
  max-width: 60vw;
  opacity: 0.9;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, black 22%);
  mask-image: linear-gradient(to right, transparent, black 22%);
}

.hero-graphic {
  width: 100%;
  height: auto;
  animation: floatGraphic 8s ease-in-out infinite;
}

.hero-graphic .draw-path {
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: drawLine 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.2s;
}

.hero-graphic .node {
  opacity: 0;
  animation: nodeIn 0.5s ease-out forwards;
  transform-box: fill-box;
  transform-origin: center;
}

.hero-graphic .node-plain {
  fill: var(--graphic-ink);
}

.emblem text {
  fill: var(--graphic-ink);
}

.hero-graphic .node-peak {
  animation: nodeIn 0.5s ease-out forwards;
}

.hero-graphic .link {
  opacity: 0;
  animation: linkIn 0.8s ease-out forwards;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes nodeIn {
  to { opacity: 1; }
}

@keyframes linkIn {
  to { opacity: 0.3; }
}

@keyframes floatGraphic {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.dot-grid {
  background-image: radial-gradient(var(--dot-grid) 1px, transparent 1px);
  background-size: 26px 26px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-graphic,
  .hero-graphic * {
    animation: none !important;
  }
  .hero-graphic .draw-path {
    stroke-dashoffset: 0;
  }
  .hero-graphic .node,
  .hero-graphic .link {
    opacity: 1;
  }
  .hero-graphic .link {
    opacity: 0.3;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 780px;
}

.hero .lede {
  margin-top: 28px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 640px;
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #12100a;
}

.btn-primary:hover {
  background: #d9bd7d;
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
}

.btn:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: no-preference) {
  .pillar-card .glyph svg,
  .service-item .icon-box svg,
  .approach-row .icon-box svg {
    transition: transform 0.25s ease;
  }

  .pillar-card:hover .glyph svg,
  .service-item:hover .icon-box svg,
  .approach-row:hover .icon-box svg {
    transform: scale(1.12);
  }

  .theme-toggle svg {
    transition: transform 0.3s ease;
  }

  .theme-toggle:active svg {
    transform: rotate(25deg);
  }
}

/* ---------- Sections ---------- */

section {
  padding: 96px 0;
}

.section-border {
  border-bottom: 1px solid var(--border-soft);
}

.section-head {
  max-width: 620px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 12px;
}

.section-head p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Pillars / Cards ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.3s ease;
}

.pillar-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -20px rgba(201, 169, 97, 0.25);
}

.pillar-card .glyph {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--accent-soft), transparent);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 24px;
  transition: border-color 0.25s ease;
}

.pillar-card:hover .glyph {
  border-color: var(--accent);
}

.glyph-blue {
  background: linear-gradient(150deg, var(--accent-2-soft), transparent) !important;
  color: var(--accent-2) !important;
}

.pillar-card:hover .glyph-blue {
  border-color: var(--accent-2) !important;
}

.pillar-card.pillar-blue:hover {
  box-shadow: 0 20px 40px -20px rgba(79, 131, 240, 0.28);
  border-color: var(--accent-2);
}

.pillar-card .more.more-blue {
  color: var(--accent-2);
}

.pillar-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pillar-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.pillar-card .more {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Principles strip ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.principle .num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.principle h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.principle p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ---------- Tab switch (What We Do) ---------- */

.tab-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 48px;
}

.tab-btn {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active[data-target="strategic"] {
  background: var(--accent);
  color: #12100a;
}

.tab-btn.active[data-target="technology"] {
  background: var(--accent-2);
  color: #0a0d12;
}

[data-tab-panel] {
  display: none;
}

[data-tab-panel].tab-panel-active {
  display: block;
  animation: fadeInTab 0.4s ease;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  [data-tab-panel].tab-panel-active {
    animation: none;
  }
}

/* ---------- Growth calculator ---------- */

.calc-widget {
  margin-top: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.calc-head h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 10px 0 12px;
}

.calc-head p:last-child {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 580px;
}

.calc-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  margin-top: 32px;
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.calc-field output {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.calc-field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
}

.calc-result {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.calc-result-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.calc-result-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

.calc-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
}

.calc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 50%;
}

.calc-disclaimer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .calc-body {
    grid-template-columns: 1fr;
  }

  .calc-widget {
    padding: 28px 24px;
  }
}

/* ---------- Service list (What We Do) ---------- */

.service-group {
  margin-bottom: 72px;
}

.service-group:last-child {
  margin-bottom: 0;
}

.service-group-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.service-group-head h2 {
  font-size: 1.7rem;
  font-weight: 700;
}

.service-group-head span {
  color: var(--text-faint);
  font-size: 13px;
}

.service-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-item {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.service-item:hover {
  border-color: var(--border);
  background: var(--bg-card);
}

.service-item .icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}

.service-item .icon-box.icon-box-blue {
  background: var(--accent-2-soft);
  color: var(--accent-2);
}

.service-item h4 {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-item p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ---------- About page ---------- */

.about-lede {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 760px;
}

.approach-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.approach-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border-soft);
}

.approach-row:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.approach-row .row-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.approach-row .icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.approach-row .icon-box.icon-box-blue {
  background: var(--accent-2-soft);
  color: var(--accent-2);
}

.approach-row h3 {
  font-size: 17px;
  font-weight: 700;
}

.approach-row p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
  max-width: 620px;
}

/* ---------- Contact page ---------- */

.contact-hero {
  padding: 120px 0 90px;
  text-align: center;
}

.contact-hero .lede {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.contact-hero .hero-actions {
  justify-content: center;
}

.contact-card {
  position: relative;
  max-width: 560px;
  margin: 0 auto 96px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  box-shadow:
    0 30px 80px -30px rgba(201, 169, 97, 0.16),
    0 40px 100px -30px rgba(79, 131, 240, 0.18);
  overflow: visible;
}

.card-accent {
  position: absolute;
  top: -22px;
  right: -22px;
  width: 100px;
  height: 100px;
  pointer-events: none;
  opacity: 0.9;
}

.contact-card .glyph {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--accent-2-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
  margin: 0 auto 24px;
}

.contact-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

.email-link {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent);
}

.contact-card-form {
  max-width: 640px;
  padding: 8px 8px 28px;
  overflow: hidden;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
  padding: 88px 0;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-band p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 32px;
}

.cta-band .hero-actions {
  justify-content: center;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  padding: 64px 0 40px;
  overflow: hidden;
}

.footer-watermark {
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 260px;
  height: 260px;
  opacity: 0.05;
  pointer-events: none;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 32px;
}

.footer-nav {
  display: flex;
  gap: 32px;
}

.footer-nav a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .pillars,
  .service-items {
    grid-template-columns: 1fr;
  }

  .principles {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .approach-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-visual {
    display: none;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 32px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--border-soft);
  }

  .main-nav a[aria-current="page"]::after {
    display: none;
  }

  .nav-cta {
    text-align: center;
    margin-top: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 80px 0 64px;
  }

  section {
    padding: 64px 0;
  }

  .footer-top {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 20px;
  }

  .contact-card {
    padding: 32px 24px;
  }
}
