/* ============================================
   SDFM GROUP LIMITED — Website Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red: #EC3013;
  --red-hover: #c42810;
  --charcoal: #201E1D;
  --surface: #EAE9E9;
  --bg-gray: #F3F2F2;
  --bg-warm: #F7F5F2;
  --white: #FFFFFF;
  --text-body: #555555;
  --text-muted: #777777;
  --text-light: #888888;
  --divider: rgba(32, 30, 29, 0.15);
  --max-width: 1240px;
  --nav-max: 1400px;
  --side-pad: 80px;
  --section-pad: 100px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: 'DM Sans', Arial, Helvetica, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--red);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--red-hover); }

/* Focus states for keyboard accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

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

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


/* --- Navigation --- */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(32, 30, 29, 0.08);
  transition: box-shadow 0.3s ease;
}
.nav-wrapper.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--side-pad);
  max-width: var(--nav-max);
  margin: 0 auto;
}

.nav-logo img { height: 44px; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--red); }

.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover {
  background: var(--red-hover);
  color: var(--white) !important;
  transform: translateY(-1px);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  transition: all 0.3s;
}


/* --- Buttons --- */
.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 16px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--red-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(236, 48, 19, 0.3);
}

.btn-secondary {
  display: inline-block;
  border: 2px solid var(--charcoal);
  color: var(--charcoal);
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
}
.btn-secondary:hover {
  background: var(--charcoal);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-large { padding: 18px 40px; font-size: 16px; }


/* --- Shared Typography --- */
.eyebrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-heading {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtext {
  font-size: 17px;
  color: var(--text-body);
  line-height: 1.7;
  max-width: 700px;
}

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


/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* --- Hero Section --- */
.hero {
  padding: 80px var(--side-pad) 100px;
  max-width: var(--nav-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content { flex: 1; min-width: 0; }

.hero-eyebrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 58px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 28px;
}

.hero-subtext {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 520px;
  margin-bottom: 40px;
}

.hero-buttons { display: flex; gap: 16px; }

.hero-image { flex: 1.15; min-width: 0; }

/* Hero image */
.hero-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  object-fit: cover;
  aspect-ratio: 16/10;
}


/* --- Problem Section --- */
.problem {
  background: var(--bg-gray);
  padding: var(--section-pad) var(--side-pad);
}
.problem .section-subtext { margin-bottom: 60px; }

.problem-cards { display: flex; gap: 32px; }

.problem-card {
  flex: 1;
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.problem-card .card-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 12px;
}
.problem-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.problem-card p { font-size: 15px; line-height: 1.7; color: var(--text-body); }


/* --- What We Do Section --- */
.what-we-do { padding: var(--section-pad) var(--side-pad); }
.what-we-do .section-heading { margin-bottom: 60px; max-width: 700px; }

.pillars { display: flex; flex-direction: column; gap: 48px; }

.pillar { display: flex; gap: 40px; align-items: flex-start; }

.pillar-number {
  font-size: 64px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  min-width: 80px;
}
.pillar h3 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.pillar p { font-size: 16px; line-height: 1.7; color: var(--text-body); max-width: 700px; }

.pillar-divider { height: 1px; background: var(--surface); }


/* --- How It Works Section --- */
.how-it-works {
  background: var(--bg-gray);
  padding: var(--section-pad) var(--side-pad);
}
.how-it-works .section-heading { margin-bottom: 60px; }

.phases { display: flex; gap: 32px; }

.phase-card {
  flex: 1;
  background: var(--white);
  border-radius: 12px;
  padding: 44px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.phase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.phase-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }

.phase-number {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--red); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.phase-card h3 { font-size: 24px; font-weight: 700; }
.phase-card p { font-size: 15px; line-height: 1.7; color: var(--text-body); }


/* --- Offer Section --- */
.offer { padding: var(--section-pad) var(--side-pad); text-align: center; }
.offer .container { max-width: 800px; }
.offer .section-heading { margin-bottom: 20px; }
.offer .section-subtext { margin: 0 auto 20px; max-width: 700px; }

.offer-list {
  font-size: 16px; line-height: 2; color: #444;
  text-align: left; max-width: 560px;
  margin: 0 auto 40px; list-style: none;
}
.offer-list li::before { content: "→ "; color: var(--red); font-weight: 700; }

.offer-note { font-size: 15px; color: var(--text-muted); margin-bottom: 40px; }


/* --- Selected Work / Projects Section --- */
.selected-work {
  background: var(--bg-warm);
  padding: var(--section-pad) var(--side-pad);
}
.selected-work .eyebrow { margin-bottom: 24px; }

.work-divider-thick { height: 3px; background: var(--charcoal); margin-bottom: 0; }

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px 0;
  border-bottom: 1px solid #D5D0CA;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity var(--transition);
}
.project-row:hover { opacity: 0.75; }

.project-name {
  font-size: 48px; font-weight: 900; line-height: 1.1;
  color: var(--charcoal); max-width: 560px;
}

.project-meta {
  display: flex; align-items: center; gap: 40px;
  flex-shrink: 0; white-space: nowrap;
}
.project-industry {
  font-size: 13px; font-weight: 500; letter-spacing: 1.5px;
  color: var(--text-light); text-transform: uppercase;
}
.project-scope {
  font-size: 13px; font-weight: 500; letter-spacing: 1px; color: var(--text-light);
}
.project-arrow { font-size: 22px; color: var(--red); font-weight: 400; }

.view-all-link { margin-top: 48px; text-align: center; }
.view-all-link a { font-size: 15px; font-weight: 700; color: var(--red); letter-spacing: 0.5px; }


/* --- FAQ Section --- */
.faq { padding: var(--section-pad) var(--side-pad); }
.faq .container { max-width: 800px; }
.faq .section-heading { margin-bottom: 60px; text-align: center; }

.faq-top-border { border-top: 1px solid var(--surface); }

.faq-item { padding: 28px 0; border-bottom: 1px solid var(--surface); }

.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; width: 100%; background: none; border: none;
  text-align: left; font-family: inherit; padding: 0;
}
.faq-question h3 { font-size: 18px; font-weight: 700; color: var(--charcoal); padding-right: 20px; }

.faq-toggle {
  font-size: 24px; color: var(--red); font-weight: 300;
  flex-shrink: 0; transition: transform 0.3s;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); }

.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, margin 0.3s ease;
}
.faq-answer p { font-size: 15px; line-height: 1.7; color: var(--text-body); padding-top: 16px; }

.faq-item.open .faq-answer { max-height: 300px; }


/* --- Final CTA (Dark) --- */
.final-cta {
  background: var(--charcoal);
  padding: var(--section-pad) var(--side-pad);
  text-align: center;
}
.final-cta .container { max-width: 700px; }
.final-cta h2 {
  font-size: 42px; font-weight: 900; line-height: 1.2;
  color: var(--white); margin-bottom: 20px;
}
.final-cta p {
  font-size: 17px; color: rgba(255,255,255,0.6);
  line-height: 1.7; margin-bottom: 40px;
}


/* --- Footer --- */
.footer {
  background: #191716; padding: 48px var(--side-pad);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-left { display: flex; align-items: center; gap: 32px; }
.footer-logo img { height: 36px; object-fit: contain; margin-bottom: 8px; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.footer-location { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-copyright { font-size: 13px; color: rgba(255,255,255,0.4); }

.footer-social {
  display: flex; gap: 12px; margin-top: 4px;
}
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px;
  background: rgba(255,255,255,0.08);
  transition: background var(--transition);
}
.footer-social a:hover {
  background: rgba(255,255,255,0.15);
}
.footer-social svg {
  width: 18px; height: 18px;
  fill: rgba(255,255,255,0.5);
  transition: fill var(--transition);
}
.footer-social a:hover svg {
  fill: var(--white);
}


/* --- Case Study Page --- */
.page-header {
  padding: 60px var(--side-pad) 80px;
  max-width: var(--nav-max); margin: 0 auto;
}
.back-link {
  font-size: 14px; font-weight: 600; color: var(--red);
  margin-bottom: 32px; display: inline-block;
}

.case-study-header .eyebrow { margin-bottom: 12px; }
.case-study-header h1 { font-size: 48px; font-weight: 900; line-height: 1.15; margin-bottom: 20px; }
.case-study-header .subtitle {
  font-size: 18px; line-height: 1.7; color: var(--text-body);
  max-width: 700px; margin-bottom: 32px;
}

.case-study-tags { display: flex; gap: 24px; flex-wrap: wrap; }
.case-study-tag {
  font-size: 14px; font-weight: 600; color: var(--charcoal);
  background: var(--bg-gray); padding: 8px 20px; border-radius: 100px;
}

.case-section { padding: 80px var(--side-pad); }
.case-section.gray-bg { background: var(--bg-gray); }
.case-section .container { max-width: var(--max-width); }
.case-section .section-heading { margin-bottom: 20px; }
.case-section .section-subtext { margin-bottom: 48px; }

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

.module-card {
  background: var(--white); border-radius: 12px; padding: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.module-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--charcoal); }
.module-card p { font-size: 15px; line-height: 1.7; color: var(--text-body); }

.results-grid { display: flex; gap: 40px; margin-bottom: 48px; flex-wrap: wrap; }
.result-stat { flex: 1; min-width: 200px; }
.result-number { font-size: 48px; font-weight: 900; color: var(--red); line-height: 1.1; margin-bottom: 8px; }
.result-label { font-size: 15px; color: var(--text-body); line-height: 1.5; }

.results-changes { margin-top: 40px; }
.results-changes h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.results-changes ul { list-style: none; }
.results-changes li {
  font-size: 16px; line-height: 1.8; color: var(--text-body);
  padding-left: 24px; position: relative;
}
.results-changes li::before {
  content: "→"; color: var(--red); font-weight: 700;
  position: absolute; left: 0;
}

.why-it-worked {
  display: flex; flex-direction: column; gap: 32px;
}
.why-item {
  padding: 32px; background: var(--bg-gray); border-radius: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.why-item h3 {
  font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--charcoal);
}
.why-item p {
  font-size: 15px; line-height: 1.7; color: var(--text-body);
}

.pipeline-stages {
  display: flex; flex-direction: column; gap: 0;
}
.stage-item {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--divider);
}
.stage-item:first-child { border-top: 1px solid var(--divider); }
.stage-number {
  width: 40px; height: 40px; min-width: 40px;
  background: var(--red); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; margin-top: 2px;
}
.stage-content h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--charcoal);
}
.stage-content p {
  font-size: 15px; line-height: 1.7; color: var(--text-body);
}


/* --- Projects Page --- */
.projects-header {
  padding: 60px var(--side-pad) 0;
  max-width: var(--nav-max); margin: 0 auto;
}
.projects-header .section-subtext { margin-bottom: 40px; }
.projects-header .section-heading { margin-bottom: 16px; }

.projects-list {
  padding: 0 var(--side-pad) var(--section-pad);
  max-width: var(--nav-max); margin: 0 auto;
}

.project-row.disabled { opacity: 0.35; cursor: default; }
.project-row.disabled:hover { opacity: 0.35; }


/* --- Selection color --- */
::selection {
  background: var(--red);
  color: var(--white);
}


/* --- Skip to content (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--red);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  z-index: 200;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}


/* --- Responsive --- */
@media (max-width: 1024px) {
  :root { --side-pad: 40px; --section-pad: 80px; }

  .hero { flex-direction: column; padding: 60px var(--side-pad) 80px; }
  .hero h1 { font-size: 44px; }
  .hero-image { width: 100%; }

  .problem-cards { flex-direction: column; }
  .phases { flex-direction: column; }

  .pillar { flex-direction: column; gap: 16px; }
  .pillar-number { font-size: 48px; }

  .project-name { font-size: 32px; }
  .project-meta { gap: 20px; }

  .modules-grid { grid-template-columns: 1fr; }
  .section-heading { font-size: 34px; }
  .case-study-header h1 { font-size: 36px; }
}

@media (max-width: 768px) {
  :root { --side-pad: 24px; --section-pad: 64px; }

  /* Prevent horizontal scroll */
  body { overflow-x: hidden; }

  /* Nav - touch-friendly targets */
  .nav { padding: 16px var(--side-pad); }
  .nav-hamburger { display: flex; padding: 8px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 24px;
    gap: 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    border-top: 1px solid var(--surface);
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 14px 16px; border-radius: 8px;
    font-size: 16px; min-height: 48px;
    display: flex; align-items: center;
  }
  .nav-links a:hover { background: var(--bg-gray); }
  .nav-cta {
    justify-content: center; margin-top: 8px;
    padding: 16px 28px !important;
  }
  .nav-links.open { display: flex; }
  .nav-logo img { height: 36px; }

  /* Hero - mobile optimized */
  .hero { padding: 40px var(--side-pad) 48px; gap: 40px; }
  .hero h1 { font-size: 34px; }
  .hero-eyebrow { font-size: 12px; margin-bottom: 16px; }
  .hero-subtext { font-size: 16px; margin-bottom: 32px; }
  .hero-buttons { flex-direction: column; gap: 12px; }
  .hero-buttons a {
    text-align: center; padding: 16px 24px;
    font-size: 16px; min-height: 52px;
    display: flex; align-items: center; justify-content: center;
  }

  /* Section typography */
  .section-heading { font-size: 26px; }
  .section-subtext { font-size: 16px; }
  .eyebrow { font-size: 12px; letter-spacing: 1.5px; }

  /* Problem cards */
  .problem-card { padding: 28px; }
  .problem-card h3 { font-size: 20px; }

  /* Pillars */
  .pillar h3 { font-size: 20px; }
  .pillar-number { font-size: 40px; min-width: 60px; }
  .pillar p { font-size: 15px; }

  /* Phase cards - touch-friendly */
  .phase-card { padding: 28px; }
  .phase-card h3 { font-size: 20px; }
  .phase-number { width: 44px; height: 44px; font-size: 18px; }

  /* Offer section */
  .offer .section-heading { font-size: 26px; }
  .offer-list { font-size: 15px; }
  .offer-note { font-size: 14px; }

  /* Projects - mobile layout */
  .project-row {
    flex-direction: column; align-items: flex-start;
    gap: 12px; padding: 28px 0;
  }
  .project-name { font-size: 26px; }
  .project-meta { gap: 12px; flex-wrap: wrap; }
  .project-industry, .project-scope { font-size: 12px; }

  /* FAQ - touch-friendly tap targets */
  .faq-item { padding: 20px 0; }
  .faq-question { min-height: 48px; padding: 4px 0; }
  .faq-question h3 { font-size: 16px; }
  .faq-toggle { font-size: 22px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }

  /* Final CTA */
  .final-cta { padding: 64px var(--side-pad); }
  .final-cta h2 { font-size: 26px; }
  .final-cta p { font-size: 16px; }
  .final-cta .btn-primary { width: 100%; text-align: center; display: flex; align-items: center; justify-content: center; }

  /* Footer */
  .footer {
    flex-direction: column; gap: 24px;
    text-align: center; padding: 40px var(--side-pad);
  }
  .footer-left { flex-direction: column; gap: 16px; align-items: center; }
  .footer-right { text-align: center; align-items: center; }
  .footer-social { justify-content: center; }
  .footer-social a { width: 44px; height: 44px; }

  /* Case study page */
  .results-grid { flex-direction: column; gap: 24px; }
  .result-number { font-size: 36px; }
  .case-study-header h1 { font-size: 26px; }
  .case-study-header .subtitle { font-size: 16px; }
  .case-study-tags { gap: 12px; }
  .case-study-tag { font-size: 13px; padding: 6px 16px; }
  .case-section { padding: 56px var(--side-pad); }
  .module-card { padding: 28px; }
  .module-card h3 { font-size: 18px; }
  .back-link { font-size: 13px; margin-bottom: 24px; min-height: 44px; display: inline-flex; align-items: center; }
  .why-item { padding: 24px; }
  .why-item h3 { font-size: 18px; }

  /* Projects page */
  .projects-header { padding: 40px var(--side-pad) 0; }
}
