/*
 * MMConsultancy public website
 * Purpose: presentation styles for the static corporate site.
 * Inputs: semantic HTML from tools/build_site.py
 * Outputs: responsive layout, no runtime framework.
 * Compliance: no third-party trackers are loaded by this file.
 */

:root {
  /* Brand colours are sampled from the logo: navy #001048, mid blue #0070a0, cyan #00d8f8.
     The earlier navy (#07182c) read as black next to the logo. */
  --navy: #0b1b4b;
  --navy-deep: #081539;
  --navy-mid: #123a8a;
  --blue: #0b74a6;
  --ink: #152033;
  --muted: #3d4c5f;
  --line: #d5e2ea;
  --bg: #f3f7fb;
  --white: #ffffff;
  --cyan: #d8f7fc;
  --cyan-ink: #0a6d88;
  --cyan-bright: #00c8f0;
  --danger: #8f1d1d;
  --ok: #0f5c45;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.06);
  --radius: 14px;
  --header: 84px;
  --max: 1120px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--cyan-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy);
}

:focus-visible {
  outline: 3px solid var(--cyan-ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--white);
  color: var(--navy);
  padding: 0.6rem 0.9rem;
  z-index: 100;
  border-radius: 8px;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(11, 27, 75, 0.07);
}

/* A thin line in the logo's colours gives the bar presence without adding height. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 55%, var(--cyan-bright) 100%);
  pointer-events: none;
}

.nav {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy);
  flex: 0 1 auto;
  min-width: 0;
}

/* Header: the supplied artwork laid out side by side (cloud mark, then name and
   tagline) so the name stays readable in a short bar. Pixels come from the
   original file. Width follows the 796x168 ratio. */
.logo-wide {
  height: 60px;
  width: auto;
  flex: 0 0 auto;
  display: block;
  transition: transform 0.25s ease;
}

.logo-link:hover .logo-wide {
  transform: translateY(-1px);
}

/* Footer: the stacked lockup as supplied, with only its empty margin trimmed. */
.logo-lockup {
  height: 86px;
  width: auto;
  flex: 0 0 auto;
  display: block;
  background: #ffffff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span:not(.hp) {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Buttons in the menu are excluded. These link rules outrank .btn-primary and
   previously painted the Contact button navy on navy. */
.nav-links a:not(.btn) {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-links a:not(.btn)[aria-current="page"] {
  color: var(--cyan-ink);
}

.nav-links a:not(.btn):hover {
  background: var(--bg);
  color: var(--navy);
}

.has-sub {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  list-style: none;
  margin: 0;
}

.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu {
  display: block;
}

.submenu a {
  width: 100%;
  justify-content: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.6rem 1.05rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
}

/* The logo's navy-to-blue sweep. White text stays above 5:1 at the lightest end. */
.btn-primary {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--blue) 100%);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(11, 58, 138, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1a4aa0 0%, var(--blue) 100%);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(11, 58, 138, 0.28);
}

/* Navy buttons disappear on the navy hero and closing band. Use a light fill there. */
.hero .btn-primary,
.cta-band .btn-primary {
  background: #dff7fb;
  color: var(--navy);
  border-color: #dff7fb;
  box-shadow: none;
}

.hero .btn-primary:hover,
.cta-band .btn-primary:hover {
  background: #ffffff;
  color: var(--navy);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.btn-navy-outline {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-navy-outline:hover {
  background: var(--bg);
  color: var(--navy);
}

.nav-cta {
  margin-left: 0.35rem;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(520px 280px at 8% 120%, rgba(0, 200, 240, 0.16), transparent 70%),
    radial-gradient(680px 360px at 100% -10%, rgba(0, 216, 248, 0.26), transparent 58%),
    linear-gradient(165deg, #081539 0%, #0d2a66 52%, #0b5a88 100%);
  color: var(--white);
  padding: 2.75rem 0;
}

.hero::before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -40px;
  top: -80px;
  background: radial-gradient(circle, rgba(0, 200, 240, 0.26), transparent 68%);
  animation: drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid > * {
  animation: fade-up 0.7s ease both;
}

.hero-grid > :last-child {
  animation-delay: 0.12s;
}

.capability-panel li {
  animation: fade-up 0.55s ease both;
}

.capability-panel li:nth-child(2) { animation-delay: 0.08s; }
.capability-panel li:nth-child(3) { animation-delay: 0.16s; }
.capability-panel li:nth-child(4) { animation-delay: 0.24s; }
.capability-panel li:nth-child(5) { animation-delay: 0.32s; }
.capability-panel li:nth-child(6) { animation-delay: 0.4s; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.5rem;
  color: #b7eef6;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1,
.page-hero h1,
.section-head h2,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* The headline was 51px on four lines. At this size it sets on two lines on a
   desktop and stays the strongest element without owning the screen. */
.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3.3vw, 2.6rem);
  line-height: 1.15;
}

.hero .lead,
.page-hero .lead {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.45;
  color: #e7eef6;
  max-width: 42rem;
}

/* Inner pages have a light band. The pale hero colour was unreadable there. */
.page-hero .lead {
  color: var(--muted);
}

.hero .support {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.5;
  color: #c9d5e4;
  max-width: 42rem;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
}

.capability-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.9rem 1.1rem 0.3rem;
}

.capability-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #d7f6fb;
}

.capability-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.capability-panel li {
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 650;
  font-size: 0.97rem;
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--bg);
}

.section-head {
  /* Full content width, so a one-sentence intro sets on one line on a desktop. */
  margin-bottom: 1.2rem;
}

.section-head h2,
.page-hero h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--navy);
}

.section-head p {
  margin: 0;
}

.section-head p,
.prose p {
  color: var(--muted);
}

.card-grid,
.reason-grid,
.model-grid,
.industry-grid,
.blog-grid {
  display: grid;
  gap: 0.85rem;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reason-grid,
.model-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.industry-grid,
.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.reason,
.model,
.industry,
.blog-card,
.faq details,
.info-panel,
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card,
.blog-card,
.reason,
.model,
.industry {
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card,
.blog-card {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: var(--shadow);
}

.card:hover,
.blog-card:hover,
.reason:hover,
.model:hover,
.industry:hover {
  transform: translateY(-4px);
  border-color: #8fd7e6;
  box-shadow: 0 16px 34px rgba(7, 24, 44, 0.08);
}

.tech-list li {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.tech-list li:hover {
  transform: translateY(-2px);
  border-color: var(--cyan-bright);
}

.icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eef6f8;
  color: var(--navy);
  display: grid;
  place-items: center;
  margin-bottom: 0.6rem;
}

.icon svg {
  width: 20px;
  height: 20px;
}

.card h3,
.reason h3,
.model h3,
.industry h3,
.blog-card h2 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
  color: var(--navy);
}

.card p,
.reason p,
.model p,
.industry p,
.blog-card p {
  margin: 0;
  color: var(--muted);
}

.card p,
.reason p,
.model p,
.industry p,
.blog-card p {
  font-size: 0.96rem;
  line-height: 1.5;
}

.card .more {
  margin-top: auto;
  padding-top: 0.6rem;
  font-weight: 700;
  text-decoration: none;
}

.reason,
.model,
.industry {
  padding: 0.9rem 1rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tech-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  color: var(--navy);
  font-weight: 650;
  font-size: 0.95rem;
}

.note {
  margin-top: 1rem;
  color: var(--muted);
}

.clients-panel {
  background: var(--navy-deep);
  border-radius: var(--radius);
  padding: 1rem;
}

.clients-panel img {
  width: 100%;
  height: auto;
  margin-inline: auto;
}

.page-hero {
  background: var(--bg);
  padding: 1.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero .lead + p {
  margin: 0.9rem 0 0;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs a {
  text-decoration: none;
  font-weight: 650;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin: 1.5rem 0 0.45rem;
  font-size: 1.3rem;
  color: var(--navy);
}

.prose h3 {
  margin: 1.4rem 0 0.4rem;
  color: var(--navy);
  font-size: 1.15rem;
}

.prose ul,
.prose ol,
.split ul {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.prose li + li,
.split li + li {
  margin-top: 0.35rem;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.split article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.split h2,
.split h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  color: var(--navy);
}

.faq {
  display: grid;
  gap: 0.7rem;
}

.faq details {
  padding: 0.2rem 1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  min-height: 48px;
  display: flex;
  align-items: center;
}

.faq details p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, #0d3f78 100%);
  color: var(--white);
  padding: 2.25rem 0;
}

.cta-band h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

.cta-band p {
  margin: 0;
  color: #d5e0ec;
}

.founder {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.founder img {
  width: 200px;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.founder-name {
  margin: 0.6rem 0 0;
  font-weight: 800;
  color: var(--navy);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  align-items: start;
}

.postal-address {
  font-style: normal;
  line-height: 1.55;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.site-footer .postal-address {
  color: #c5d2e0;
  font-size: 0.9rem;
  margin-top: 0.7rem;
}

.contact-points {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.contact-points a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  background: var(--white);
}

.form-card {
  padding: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c5d0dc;
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  min-height: 48px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--muted);
}

.consent input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

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

.popup-warning {
  position: fixed;
  z-index: 50;
  left: 1rem;
  right: 1rem;
  top: 1rem;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  background: #fff8eb;
  color: #5c3b00;
  border: 1px solid #e2c48a;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(8, 21, 57, 0.18);
}

.popup-warning p {
  margin: 0 0 0.6rem;
}

.popup-warning button {
  min-height: 40px;
}

.form-status {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  font-weight: 650;
}

.form-status.error {
  color: var(--danger);
}

.form-status.success {
  color: var(--ok);
}

.form-errors {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--danger);
}

.site-footer {
  background: var(--navy-deep);
  color: #d5e0ec;
  padding: 2rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.25rem;
}

.site-footer h2 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: var(--white);
}

.site-footer p,
.site-footer li {
  color: #c5d2e0;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: #d7f6fb;
  text-decoration: none;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
}

/* The lockup has navy lettering, so it sits on a white card against the dark footer. */
.site-footer .logo-lockup {
  height: 96px;
  padding: 7px 10px;
  border-radius: 12px;
}

.legal {
  margin-top: 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
  background: #eef3f7;
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1rem 1rem;
    max-height: calc(100vh - var(--header));
    overflow: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .submenu {
    display: block;
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 0.4rem 0.6rem;
    min-width: 0;
  }

  .nav-cta {
    margin: 0.3rem 0 0;
  }

  .hero-grid,
  .card-grid,
  .reason-grid,
  .model-grid,
  .industry-grid,
  .blog-grid,
  .split,
  .contact-layout,
  .founder,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid,
  .contact-layout,
  .founder,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Stacked layout: six rows of capabilities pushed the hero past one screen.
     Two columns keep the same six items in half the height. */
  .hero-grid {
    gap: 1.25rem;
  }

  .capability-panel ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
  }

  .capability-panel li {
    font-size: 0.9rem;
    line-height: 1.35;
    padding: 0.45rem 0;
  }

  /* Four footer blocks in one column made a very long footer. */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > :first-child,
  .footer-grid > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .card-grid,
  .reason-grid,
  .model-grid,
  .industry-grid,
  .blog-grid,
  .split,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 1.6rem 0 1.75rem;
  }

  .section {
    padding: 2.1rem 0;
  }

  .cta-band {
    padding: 1.9rem 0;
  }

  .page-hero {
    padding: 1.25rem 0 1.25rem;
  }

  .hero .lead,
  .page-hero .lead {
    font-size: 1.02rem;
  }

  /* Phones: icon sits beside the card title instead of above it. */
  .card {
    display: block;
  }

  .card .icon {
    float: left;
    width: 34px;
    height: 34px;
    margin: 0 0.65rem 0.25rem 0;
  }

  .card h3 {
    min-height: 34px;
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
  }

  .card p {
    clear: left;
  }

  .card .more {
    display: inline-block;
    padding-top: 0.45rem;
  }

  :root {
    --header: 68px;
  }

  .logo-wide {
    height: 48px;
  }
}

/* Very narrow phones: keep the logo and the menu button on one line. */
@media (max-width: 350px) {
  .logo-wide {
    height: 42px;
  }
}

@keyframes fade-up {
  from { transform: translateY(10px); }
  to { transform: none; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-28px, 16px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
