/* =========================================================
   Martin Consulting — Modern site
   Palette derived from original:
     #332B28 espresso, #857068 warm taupe, plus cream + accent
   ========================================================= */

:root {
  --espresso: #0F1A2B;       /* deep navy */
  --espresso-2: #162438;     /* navy */
  --taupe: #5B7490;          /* slate blue */
  --taupe-light: #8EA3BB;    /* light slate */
  --sand: #7FA7CF;           /* steel blue accent */
  --cream: #EEF3F8;          /* pale blue-grey */
  --paper: #F7F9FC;           /* near-white blue tint */
  --ink: #0C1624;            /* near-black navy */
  --ink-2: #2E3A4C;          /* dark slate */
  --muted: #667587;          /* cool grey */
  --line: rgba(15, 26, 43, 0.10);
  --line-strong: rgba(15, 26, 43, 0.18);
  --accent: #2F6FB5;         /* brand blue */
  --accent-hover: #235891;   /* darker blue */

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 26, 43, 0.06), 0 2px 8px rgba(15, 26, 43, 0.04);
  --shadow: 0 10px 30px rgba(15, 26, 43, 0.08), 0 2px 8px rgba(15, 26, 43, 0.05);
  --shadow-lg: 0 30px 60px rgba(15, 26, 43, 0.15), 0 10px 20px rgba(15, 26, 43, 0.08);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', 'Inter', Georgia, serif;

  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

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

/* ===================== Typography ===================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); font-weight: 500; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.accent {
  background: linear-gradient(120deg, var(--sand), var(--taupe));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-family: var(--font-display);
}

.lede {
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 560px;
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--espresso-2);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: white;
  border-color: var(--taupe);
}

/* ===================== Nav ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.75);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(250, 247, 242, 0.92);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 2rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  height: 42px;
  width: auto;
  display: block;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line-1 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.brand-line-2 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--taupe);
  margin-top: 3px;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 10%, transparent 80%);
  opacity: 0.5;
}
.hero-glow {
  position: absolute;
  top: -200px;
  right: -100px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(127, 167, 207, 0.35) 0%, transparent 60%);
  filter: blur(40px);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}
.hero-copy h1 {
  margin-bottom: 1.5rem;
}
.hero-cta {
  display: flex;
  gap: 0.75rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.hero-stats > div {
  display: flex;
  flex-direction: column;
}
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-stats span {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Hero visual */
.hero-visual {
  position: relative;
  height: 480px;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
}
.orb-1 {
  width: 320px; height: 320px;
  background: linear-gradient(135deg, var(--espresso-2), var(--taupe));
  top: 40px;
  right: 20px;
  box-shadow: var(--shadow-lg);
}
.orb-2 {
  width: 180px; height: 180px;
  background: linear-gradient(135deg, var(--sand), var(--cream));
  bottom: 30px;
  left: 20px;
  box-shadow: var(--shadow);
}
.card-stack {
  position: absolute;
  inset: 0;
}
.float-card {
  position: absolute;
  background: white;
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  color: var(--ink-2);
  animation: float 6s ease-in-out infinite;
  border: 1px solid var(--line);
}
.fc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3FB26F;
  box-shadow: 0 0 0 4px rgba(63, 178, 111, 0.15);
  animation: pulse 2s ease-in-out infinite;
}
.fc-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.fc-val { font-size: 0.95rem; font-weight: 600; color: var(--ink); margin-top: 2px; }
.fc-1 { top: 20px; left: -20px; animation-delay: 0s; }
.fc-2 { top: 200px; right: -10px; animation-delay: 2s; color: var(--taupe); }
.fc-3 { bottom: 40px; left: 40px; animation-delay: 4s; color: var(--accent); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(63, 178, 111, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(63, 178, 111, 0.05); }
}

/* ===================== Trust strip ===================== */
.trust {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.25rem 0;
}
.trust-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe);
}
.trust-logos {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-logos span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  opacity: 0.65;
  transition: opacity 0.2s ease;
}
.trust-logos span:hover { opacity: 1; }

/* ===================== Sections ===================== */
.section { padding: 100px 0; }
.section-alt {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  max-width: 720px;
  margin: 0 auto 4rem;
  text-align: center;
}
.section-sub {
  font-size: 1.1rem;
  color: var(--ink-2);
  margin-top: 1rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-copy h2 { margin-bottom: 1.5rem; }
.about-copy p { margin-bottom: 1.2rem; color: var(--ink-2); font-size: 1.05rem; }
.about-copy blockquote {
  margin-top: 2rem;
  padding: 1.75rem;
  background: var(--cream);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.about-copy blockquote p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.about-copy blockquote cite {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--taupe);
  font-weight: 500;
}
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.value-card {
  background: white;
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--taupe-light);
}
.value-icon {
  width: 44px;
  height: 44px;
  background: var(--cream);
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.value-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.value-card p { font-size: 0.92rem; color: var(--muted); }

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.service-card {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--taupe-light);
}
.service-card.featured {
  grid-column: span 1;
  background: linear-gradient(135deg, var(--espresso-2), var(--ink));
  color: var(--cream);
  border-color: transparent;
}
.service-card.featured h3 { color: var(--paper); }
.service-card.featured p { color: rgba(238, 243, 248, 0.75); }
.service-card.featured .service-icon {
  background: rgba(127, 167, 207, 0.18);
  color: var(--sand);
}
.service-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(127, 167, 207, 0.14);
  border: 1px solid rgba(127, 167, 207, 0.35);
}
.service-icon {
  width: 52px;
  height: 52px;
  background: var(--cream);
  color: var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { color: var(--muted); font-size: 0.95rem; }
.tier-list {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tier-list li {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background: rgba(238, 243, 248, 0.08);
  border-radius: 10px;
  border-left: 2px solid var(--sand);
}
.tier-list strong {
  color: var(--sand);
  font-weight: 600;
  font-size: 0.95rem;
}
.tier-list span {
  font-size: 0.85rem;
  color: rgba(238, 243, 248, 0.7);
  margin-top: 2px;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.product-card {
  padding: 2rem 1.75rem;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, background 0.3s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  background: white;
  box-shadow: var(--shadow);
}
.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}
.product-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Contact */
.contact {
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 820px;
  margin: 0 auto;
}
.contact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .contact-list { grid-template-columns: 1fr; }
}
.contact-copy { text-align: center; }
.contact-copy h2 { margin-bottom: 1rem; }
.contact-copy > p { color: var(--ink-2); font-size: 1.05rem; margin-bottom: 2.5rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-item:not(.contact-item-static):hover {
  transform: translateX(4px);
  border-color: var(--taupe);
  box-shadow: var(--shadow-sm);
}
.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--cream);
  color: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.contact-value {
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

.contact-form {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.contact-form h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.75rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.contact-form label span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
  font-size: 0.95rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--taupe);
  background: white;
  box-shadow: 0 0 0 4px rgba(91, 116, 144, 0.15);
}
.contact-form button { margin-top: 0.5rem; width: 100%; justify-content: center; }
.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-align: center;
  min-height: 1.2em;
}

/* ===================== Footer ===================== */
.footer {
  background: var(--espresso);
  color: rgba(238, 243, 248, 0.7);
  padding: 4rem 0 2rem;
}
.footer-inner {
  display: grid;
  gap: 2rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-logo {
  height: 48px;
  width: auto;
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
}
.footer-brand .brand-line-1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--paper);
  font-size: 1.1rem;
}
.footer-brand .brand-line-2 {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--sand);
  margin-top: 3px;
}
.footer-tag {
  max-width: 520px;
  color: rgba(238, 243, 248, 0.6);
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(238, 243, 248, 0.1);
}
.footer-links a {
  color: rgba(238, 243, 248, 0.75);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--sand); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(238, 243, 248, 0.1);
  font-size: 0.82rem;
  color: rgba(238, 243, 248, 0.45);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===================== Reveal animation ===================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .section { padding: 72px 0; }
  .hero { padding: 50px 0 72px; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a:last-child { border-bottom: none; }

  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .service-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .about-values { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.75rem; }
  h1 { font-size: 2.5rem; }
  .footer-bottom { flex-direction: column; }
}
