/* ==========================================================================
   MKAL — main stylesheet
   Mobile-first: base styles are for phones; media queries add tablet/desktop.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens (change colours here) ----------
   Contrast notes (WCAG AA needs 4.5:1 for body text, 3:1 for large text/UI):
   indigo on ash ............ 13.3:1
   indigo text on gold ...... 5.9:1   (buttons)
   gold on indigo ........... 5.9:1   (highlights on dark sections)
   gold-text on ash ......... 5.4:1   (small gold-coloured labels)
   muted on ash ............. 6.7:1
   NB: plain gold on ash is only ~2.1:1, so it is used for lines,
   borders and icons, never for small text on light backgrounds.          */
:root {
  --indigo: #1B2A4A;       /* main brand colour, headings, body text */
  --indigo-deep: #131F38;  /* darker indigo for hover states */
  --gold: #C9A227;         /* accent: buttons, highlights, rules */
  --gold-hover: #DDB84A;   /* lighter gold for button hover */
  --gold-text: #7A5F0E;    /* deep gold for small text on light backgrounds */
  --ash: #F4F2EE;          /* page background */
  --sand: #E9E5DC;         /* alternate section background */
  --white: #FFFFFF;
  --ink: var(--indigo);    /* body text */
  --muted: #4A5568;        /* secondary text */
  --on-dark: #F4F2EE;      /* text on indigo */
  --on-dark-muted: #C8CEDB;/* secondary text on indigo (9:1) */
  --line: #D9D3C7;
  --focus: var(--indigo);  /* keyboard focus ring on light backgrounds */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(27, 42, 74, 0.06), 0 8px 24px rgba(27, 42, 74, 0.08);
  --container: 1160px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px); /* stops sticky header covering headings */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ash);
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--indigo);
}
h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.65rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a {
  color: var(--indigo);
  text-underline-offset: 3px;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}
a:hover { color: var(--gold-text); }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
/* On indigo backgrounds the focus ring turns gold */
.section-dark,
.service-card-cta { --focus: var(--gold); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 700px) { .container { padding: 0 32px; } }

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

/* Skip link: first thing keyboard users reach */
.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 200;
  background: var(--indigo);
  color: var(--on-dark);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font: 600 1rem/1 var(--font-body);
  padding: 15px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--gold); color: var(--indigo); }
.btn-primary:hover { background: var(--gold-hover); color: var(--indigo); }
.btn-ghost { border-color: var(--indigo); color: var(--indigo); background: transparent; }
.btn-ghost:hover { background: var(--indigo); color: var(--on-dark); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 242, 238, 0.95);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(27, 42, 74, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

/* Logo (images/logo-A-neelkanth-horizontal.svg, 3:1 shape) */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  height: 50px;
  width: auto;
}
@media (min-width: 700px) { .brand-logo { height: 56px; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid var(--indigo);
  color: var(--indigo);
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle-icon { width: 18px; height: 18px; }
.nav-toggle-icon .line { transition: transform 0.2s ease, opacity 0.2s ease; transform-origin: center; }
.nav-toggle[aria-expanded="true"] .line-1 { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .line-2 { opacity: 0; }
.nav-toggle[aria-expanded="true"] .line-3 { transform: translateY(-5px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--ash);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 12px 24px rgba(27, 42, 74, 0.1);
  padding: 8px 16px 20px;
}
/* Hidden by default on mobile only when JavaScript is running (so it still works without JS) */
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: block;
  padding: 14px 4px;
  font-weight: 500;
  color: var(--indigo);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-list a:hover { color: var(--gold-text); }
.nav-list .nav-cta { margin-top: 16px; border-bottom: 0; }
.nav-list .nav-cta a {
  display: inline-flex;
  border-bottom: 0;
  padding: 13px 22px;
  color: var(--indigo);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav,
  .js .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .nav-list { display: flex; align-items: center; gap: 4px; }
  .nav-list a {
    border: 0;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.98rem;
  }
  .nav-list a:hover { background: var(--sand); color: var(--indigo); }
  .nav-list .nav-cta { margin: 0 0 0 10px; }
  .nav-list .nav-cta a { padding: 11px 20px; color: var(--indigo); }
  .nav-list .nav-cta a:hover { background: var(--gold-hover); color: var(--indigo); }
}

/* ---------- Generic sections ---------- */
.section { padding: 72px 0; }
@media (min-width: 1000px) { .section { padding: 104px 0; } }
.section-alt { background: var(--sand); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 48px 0 72px;
  overflow: hidden;
}
/* Subtle "data grid" background motif */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(27, 42, 74, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 42, 74, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
          mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero h1 { margin-bottom: 0.4em; }
/* Gold highlight under the key phrase */
.hero h1 em {
  font-style: italic;
  color: var(--indigo);
  background-image: linear-gradient(transparent 70%, rgba(201, 162, 39, 0.45) 70%);
  padding: 0 0.05em;
}
.hero-lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-media { position: relative; z-index: 0; }
.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 60% center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* Gold offset frame behind photo */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 14px -8px -12px 14px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  z-index: -1;
}

@media (min-width: 1000px) {
  .hero { padding: 72px 0 112px; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 64px; }
  .hero-media img { aspect-ratio: 4 / 3; object-position: center; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 700px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.service-card h3 { margin-top: 18px; }
.service-card p { color: var(--muted); margin: 0; }
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.service-tags li {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ash);
  border: 1px solid var(--line);
  color: var(--indigo);
}

/* Icon tiles: gold line icons on indigo */
.icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--indigo);
  color: var(--gold);
}
.icon svg { width: 26px; height: 26px; }

.service-card-cta {
  background: var(--indigo);
  border-color: var(--indigo);
  color: var(--on-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.service-card-cta h3 { color: var(--on-dark); margin-top: 0; }
.service-card-cta p { color: var(--on-dark-muted); }
.service-card-cta .btn { align-self: flex-start; }

/* ---------- Industries ---------- */
.industry-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 700px) { .industry-grid { grid-template-columns: repeat(2, 1fr); } }

.industry-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.industry-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 3px solid var(--gold);
}
.industry-body { padding: 24px 28px 28px; }
.industry-body p { color: var(--muted); margin: 0; }

/* ---------- How we work ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step {
  position: relative;
  padding: 28px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow);
}
.step-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--indigo);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.step p { color: var(--muted); margin: 0; }

/* ---------- Why MKAL (indigo section) ---------- */
.section-dark {
  background: var(--indigo);
  color: var(--on-dark);
}
.section-dark h2,
.section-dark h3 { color: var(--on-dark); }
.section-dark .eyebrow { color: var(--gold); }
.section-dark .lead { color: var(--on-dark-muted); font-size: 1.1rem; }

.why-inner { display: grid; gap: 44px; align-items: center; }
@media (min-width: 1000px) { .why-inner { grid-template-columns: 1fr 1.05fr; gap: 72px; } }

.why-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}

.sector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 20px 0 32px;
}
.sector-list li {
  padding: 6px 14px;
  border: 1px solid rgba(201, 162, 39, 0.6);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
}

.why-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px;
}
.why-points li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; }
.why-points svg { width: 28px; height: 28px; color: var(--gold); margin-top: 2px; }
.why-points h3 { font-size: 1.15rem; margin-bottom: 4px; }
.why-points p { margin: 0; color: var(--on-dark-muted); }

/* ---------- Contact ---------- */
.contact-inner { display: grid; gap: 40px; }
@media (min-width: 1000px) { .contact-inner { grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; } }

.contact-intro p { color: var(--muted); }
.contact-notes {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.contact-notes li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.contact-notes svg { width: 22px; height: 22px; flex: none; color: var(--gold-text); margin-top: 3px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: var(--shadow);
}
@media (min-width: 700px) { .contact-form { padding: 36px; } }

.form-row { display: grid; column-gap: 20px; }
@media (min-width: 700px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.field .optional { font-weight: 400; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;           /* 16px+ prevents iOS zoom on focus */
  color: var(--indigo);
  background: var(--ash);
  border: 1.5px solid #858DA0; /* 3.3:1 against white, meets UI contrast */
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--indigo);
  background: var(--white);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #B3261E; }
.field-error {
  display: block;
  color: #B3261E;
  font-size: 0.9rem;
  margin-top: 6px;
}
.field-error:empty { display: none; }

.consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  margin: 4px 0 8px;
}
.consent input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--indigo);
}
.consent label { font-size: 0.97rem; }
.form-small { font-size: 0.9rem; color: var(--muted); margin: 0 0 22px 36px; }

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.form-status:empty { display: none; }
.form-status.is-error { background: #FBE9E7; color: #8C1D18; }

.form-thanks {
  text-align: center;
  padding: 24px 8px;
}
.form-thanks svg { width: 56px; height: 56px; color: var(--gold-text); margin: 0 auto 12px; }
.form-thanks p { color: var(--muted); }

.hidden-field { display: none; }

/* ---------- Footer (light, so the indigo logo shows clearly) ---------- */
.site-footer {
  background: var(--sand);
  border-top: 4px solid var(--gold);
  color: var(--muted);
  padding: 48px 0 32px;
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: auto 1fr; align-items: center; }
}
.site-footer .brand-logo { height: 56px; }
.footer-tagline { margin: 10px 0 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 900px) { .footer-links { justify-content: flex-end; } }
.site-footer a { color: var(--indigo); font-weight: 500; text-decoration: none; }
.site-footer a:hover { color: var(--gold-text); text-decoration: underline; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.footer-bottom p { margin: 0; }

/* ---------- Simple content pages (privacy, 404) ---------- */
.page-main { padding: 56px 0 88px; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--gold-text); }
.draft-banner {
  background: #FFF4DC;
  border: 2px dashed #9A6E00;
  color: #5A3D00;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 32px;
}
.draft-banner strong { display: block; margin-bottom: 4px; }
.updated { color: var(--muted); font-size: 0.95rem; }

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.notfound .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 9rem);
  line-height: 1;
  color: var(--indigo);
  margin: 0;
}
.notfound .btn { margin-top: 12px; }

/* ---------- Respect reduced-motion settings ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
