/* ===========================
   MarginBuilt — Styles
   =========================== */

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

:root {
  --color-bg: #FFFFFF;
  --color-bg-alt: #F4F2EF;
  --color-bg-dark: #1C1C1C;
  --color-text: #2A2A2A;
  --color-text-muted: #6B6B6B;
  --color-text-light: #999999;
  --color-accent: #2A2A2A;
  --color-border: #E0DDD8;
  --color-border-light: #ECEAE6;
  --color-white: #FFFFFF;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-max: 1120px;
  --container-narrow: 780px;
  --section-pad: 120px;
  --section-pad-mobile: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-text-muted);
}

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

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

.container-narrow {
  max-width: var(--container-narrow);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.nav-logo img {
  height: 30px;
  width: auto;
  transition: opacity 0.3s ease;
}

.nav-logo-white {
  display: block;
}

.nav-logo-light {
  display: none;
}

.nav.scrolled .nav-logo-white {
  display: none;
}

.nav.scrolled .nav-logo-light {
  display: block;
}

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 8px 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.nav.scrolled .nav-cta {
  color: var(--color-white);
  background-color: var(--color-bg-dark);
  border-color: var(--color-bg-dark);
  backdrop-filter: none;
}

.nav.scrolled .nav-cta:hover {
  background-color: #333;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  padding: 14px 32px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-bg-dark);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #333;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-full {
  width: 100%;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: url('../img/hero.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(27, 42, 58, 0.6);
  z-index: 1;
}

.hero-texture {
  display: none;
}

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

.hero-headline {
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-sub {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.hero .btn-primary {
  background-color: #FFFFFF;
  color: var(--color-bg-dark);
}

.hero .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-bg-dark);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

/* --- Sections --- */
.section {
  padding: var(--section-pad) 24px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 40px;
}

/* --- Prose --- */
.prose p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose-center {
  text-align: center;
}

/* --- The Problem (alt bg) --- */
.section-problem {
  background-color: var(--color-bg-alt);
}

.section-problem .prose p:last-child {
  color: var(--color-text);
  font-weight: 600;
  font-size: 20px;
  margin-top: 32px;
}

/* --- What We Do (white bg) --- */
.section-what {
  background-color: var(--color-bg);
}

.capabilities {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 48px 0;
}

.capability {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  padding: 28px 28px 24px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.capability:hover {
  border-color: var(--color-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.capability-icon {
  width: 36px;
  height: 36px;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.capability-icon svg {
  width: 100%;
  height: 100%;
}

.capability h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.capability p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.capability-summary {
  font-size: 22px !important;
  font-weight: 700;
  color: var(--color-text) !important;
  margin-top: 12px;
}

.capability-proof {
  font-size: 16px !important;
  font-weight: 400;
  color: var(--color-text-light) !important;
  font-style: italic;
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* --- How It Works (image bg) --- */
.section-how {
  position: relative;
  background: url('../img/midpage.jpg') center/cover no-repeat;
  background-attachment: fixed;
}

.section-how::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(27, 42, 58, 0.65);
  z-index: 1;
}

.section-how > * {
  position: relative;
  z-index: 2;
}

.section-how .section-label {
  color: #FFFFFF;
}

.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 48px 0;
}

.how-step {
  position: relative;
  padding: 32px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.how-step-label {
  font-size: 28px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.how-step p {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

.how-tagline {
  font-size: 17px !important;
  font-weight: 500;
  color: #FFFFFF !important;
  font-style: italic;
}

@media (min-width: 640px) {
  .how-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .section-how {
    background-attachment: scroll;
  }
}

/* --- Who It's For (white bg) --- */
.section-who {
  background-color: var(--color-bg);
}

.who-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 40px 0;
}

.who-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-text);
  border-radius: 0 8px 8px 0;
}

.who-marker {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background-color: var(--color-text);
  border-radius: 50%;
  margin-top: 10px;
}

.who-item p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.who-close {
  font-size: 22px !important;
  font-weight: 700;
  color: var(--color-text) !important;
  margin-top: 12px;
}

.who-referral {
  font-size: 15px !important;
  color: var(--color-text-light) !important;
  margin-top: 16px;
}

.who-referral a {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-border);
  transition: text-decoration-color 0.2s ease;
}

.who-referral a:hover {
  text-decoration-color: var(--color-text);
}

/* --- Contact (image bg) --- */
.section-contact {
  position: relative;
  background: url('../img/mechanical.jpg') center/cover no-repeat;
  background-color: var(--color-bg-dark);
  color: #F0EDE8;
}

.section-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.82);
  z-index: 1;
}

.section-contact > * {
  position: relative;
  z-index: 2;
}

.section-contact .section-label {
  color: #FFFFFF;
}

.contact-intro {
  font-size: 18px;
  color: #FFFFFF;
  margin-bottom: 48px;
  max-width: 520px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-col-heading {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 20px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.required {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-family);
  font-size: 16px;
  padding: 12px 16px;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #F0EDE8;
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-alt {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.contact-alt p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.contact-alt a {
  color: #FFFFFF;
  font-weight: 500;
}

.contact-alt a:hover {
  color: #FFFFFF;
}

/* Calendly widget container */
.calendly-inline-widget {
  border-radius: 8px;
  overflow: hidden;
}

/* --- Footer --- */
.footer {
  padding: 40px 24px;
  text-align: center;
  border-top: none;
  background-color: var(--color-bg-dark);
}

.footer-logo {
  height: 24px;
  width: auto;
  margin: 0 auto 12px;
  display: block;
  opacity: 0.85;
}

.footer-brand {
  font-size: 13px;
  font-weight: 600;
  color: rgba(240, 237, 232, 0.5);
  margin-bottom: 4px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(240, 237, 232, 0.35);
}

/* ===========================
   Responsive
   =========================== */

@media (min-width: 640px) {
  .capabilities {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .who-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .section {
    padding: var(--section-pad-mobile) 24px;
  }

  .hero {
    padding: 100px 24px 64px;
    min-height: auto;
    min-height: 90vh;
  }

  .capabilities {
    grid-template-columns: 1fr;
  }

  .who-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .nav-cta {
    font-size: 13px;
    padding: 7px 14px;
  }

  .section-label {
    font-size: 12px;
  }

  .prose p {
    font-size: 16px;
  }

  .capability {
    padding: 22px 20px 18px;
  }
}
