/* ==========================================================================
   Kapparc — Engineering Clarity. Delivering Momentum.
   Brand tokens live in :root — change colours/typography here.
   ========================================================================== */

:root {
  --navy-900: #071528;
  --navy-800: #0b1f3a;
  --navy-700: #13305a;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-50: #e6f7f5;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --font-head: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06), 0 8px 24px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 20px 48px rgba(11, 31, 58, 0.16);
  --container: 1160px;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--slate-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-800);
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
ul { padding-left: 1.2em; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  background: var(--navy-800); color: var(--white); padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 16px; }

:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.8em 1.4em; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.975rem;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal-500); color: var(--navy-900); }
.btn-primary:hover { background: #2dd4bf; }
.btn-outline { border-color: currentColor; color: var(--white); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }
.btn-dark { background: var(--navy-800); color: var(--white); }
.btn-dark:hover { background: var(--navy-700); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--slate-100);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy-800); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-word { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.22em; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav a:not(.btn) { color: var(--slate-700); font-weight: 600; font-size: 0.975rem; position: relative; }
.nav a:not(.btn):hover { color: var(--navy-800); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--navy-800); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--teal-500); border-radius: 2px;
}
.nav .btn { padding: 0.6em 1.2em; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy-800);
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 85% -10%, var(--navy-700), transparent 60%), var(--navy-800);
  color: #cbd5e1;
  padding: clamp(72px, 12vw, 140px) 0 clamp(72px, 10vw, 120px);
}
.hero h1 { color: var(--white); max-width: 14ch; }
.hero h1 .accent { color: var(--teal-500); }
.hero .lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); max-width: 56ch; color: #cbd5e1; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-arc { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: min(640px, 70vw); opacity: 0.9; pointer-events: none; }
.hero .container { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal-500); margin-bottom: 16px;
}

.page-hero { padding: clamp(56px, 9vw, 100px) 0 clamp(48px, 7vw, 80px); }
.page-hero h1 { max-width: 20ch; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--slate-50); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head .eyebrow { color: var(--teal-600); }

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

/* ---------- Cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--slate-100); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex; flex-direction: column;
}
a.card { color: inherit; }
a.card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--teal-500); }
.card p { color: var(--slate-500); }
.card .more { margin-top: auto; font-weight: 700; color: var(--teal-600); font-family: var(--font-head); }

.icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-600); margin-bottom: 20px; flex-shrink: 0;
}
.icon svg { width: 28px; height: 28px; }

/* ---------- Why / values ---------- */
.feature { display: flex; gap: 16px; }
.feature .icon { width: 44px; height: 44px; margin: 0; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 0.3em; }
.feature p { margin: 0; color: var(--slate-500); }

/* ---------- Process ---------- */
.process { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.process li { position: relative; padding: 28px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--slate-100); }
.process li::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--teal-500); margin-bottom: 8px;
}
.process h3 { margin-bottom: 0.3em; }
.process p { margin: 0; color: var(--slate-500); font-size: 0.975rem; }

/* ---------- Service detail ---------- */
.service {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start;
  padding: 56px 0; border-top: 1px solid var(--slate-100);
}
.service:first-of-type { border-top: 0; padding-top: 0; }
.service .icon { width: 64px; height: 64px; }
.service .icon svg { width: 34px; height: 34px; }
.service-summary p { color: var(--slate-500); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li {
  position: relative; padding: 18px 20px 18px 52px; background: var(--slate-50); border-radius: var(--radius-sm);
}
.checklist li::before {
  content: ""; position: absolute; left: 20px; top: 22px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23071528' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
.checklist strong { display: block; color: var(--navy-800); font-family: var(--font-head); }
.checklist span { font-size: 0.95rem; color: var(--slate-500); }

/* ---------- About ---------- */
.name-story { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; }
.name-story .mark { width: 200px; height: 200px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ---------- Contact ---------- */
.contact-card h3 { margin-bottom: 0.2em; }
.contact-card a, .contact-card address { font-style: normal; font-size: 1.1rem; font-weight: 600; color: var(--navy-800); }
.hours { list-style: none; padding: 0; margin: 0; }
.hours li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--slate-100); }
.hours li:last-child { border-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); color: #cbd5e1;
  border-radius: 24px; padding: clamp(40px, 6vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band h2 { color: var(--white); margin-bottom: 0.3em; }
.cta-band p { margin: 0; max-width: 52ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #94a3b8; padding: 64px 0 32px; font-size: 0.95rem; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--teal-500); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: var(--white); }
.site-footer .tagline { color: var(--teal-500); font-family: var(--font-head); font-weight: 700; margin-top: 12px; }
.site-footer h4 { color: var(--white); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 48px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- 404 ---------- */
.not-found { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found .code { font-family: var(--font-head); font-weight: 800; font-size: clamp(5rem, 14vw, 9rem); color: var(--teal-500); line-height: 1; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4, .stat-row { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .service { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--white);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 24px;
    border-bottom: 1px solid var(--slate-100); box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all 0.2s ease;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--slate-100); }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .btn { margin-top: 16px; justify-content: center; }

  .grid-2, .grid-3, .grid-4, .split, .footer-grid { grid-template-columns: 1fr; }
  .name-story { grid-template-columns: 1fr; text-align: center; }
  .name-story .mark { margin-inline: auto; width: 140px; height: 140px; }
  .hero-arc { opacity: 0.35; right: -200px; }
  .card { padding: 24px; }
}
