/* ============================================================
   MM Custom Woodworks - homepage concept
   Design language: Bold Contrast (#3) for type, scale, rhythm, motion.
   Palette: MM Custom Woodworks' own. Navy #1b3865 sampled from their
   logo mark (mmcw_logo.png); steel greys sampled from the logo plate;
   near-black deepened from their own cabinetry photography.
   ============================================================ */

:root {
  /* Their brand */
  --navy:        #1b3865;   /* exact logo navy */
  --navy-deep:   #12274a;
  --navy-lift:   #7ea8dd;   /* navy lightened in-family for text on dark */
  --steel:       #cfd0d2;   /* logo plate light */
  --steel-mid:   #a9acae;   /* logo plate mid */

  /* Neutrals from their photography */
  --ink:         #0b0e13;
  --ink-2:       #141922;
  --ink-3:       #1c222d;
  --paper:       #f4f5f6;
  --paper-2:     #e6e7e8;
  --white:       #ffffff;

  /* Text */
  --text-dark:   #0b0e13;
  --text-body:   #464d58;
  --text-muted:  #5f6774;
  --text-light:  #ffffff;
  --text-on-dark:#b6c0cd;

  /* Type */
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --wrap: min(90%, 1240px);
  --wrap-tight: min(90%, 980px);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 78px;

  /* Motion */
  --snap: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out:  cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  background: var(--ink);
  color: var(--text-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--navy); color: #fff; }

/* ---------- Type scale (Bold Contrast: extreme) ---------- */

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.94;
  margin: 0;
  text-transform: uppercase;
}

.display-xl { font-size: clamp(2.6rem, 6.4vw, 5.4rem); }
.display-l  { font-size: clamp(2.1rem, 5vw, 4.1rem); }
.display-m  { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }

p { margin: 0; line-height: 1.65; }

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  font-weight: 300;
}

.body-copy { font-size: clamp(0.98rem, 1.15vw, 1.08rem); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: currentColor;
  flex: none;
}
.eyebrow--dark { color: var(--navy-lift); }
.eyebrow--light { color: var(--navy); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.02rem 1.7rem;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s var(--out), color .3s var(--out), border-color .3s var(--out), transform .35s var(--snap);
  min-height: 46px;
}
.btn__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
  transition: transform .35s var(--snap);
}
.btn:hover .btn__dot { transform: scale(1.9); }

.btn--solid { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--solid:hover { background: #23477c; border-color: #23477c; }

.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.34); }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--ink:hover { background: var(--navy); border-color: var(--navy); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .4s var(--out), box-shadow .4s var(--out);
}
.nav.is-stuck {
  background: rgba(11,14,19,0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}
.nav__inner {
  width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav__logo img {
  width: auto;
  height: 54px;
  max-width: 150px;
  object-fit: contain;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.4vw, 2.4rem);
}
.nav__link {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  padding-block: 0.5rem;
  position: relative;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--navy-lift);
  transition: width .3s var(--out);
}
.nav__link:hover::after { width: 100%; }
.nav__cta { padding: 0.78rem 1.35rem; min-height: 42px; }

.burger {
  display: none;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 140;
  position: relative;
}
.burger span {
  display: block;
  width: 26px; height: 2px;
  background: #fff;
  position: relative;
  transition: background .2s linear;
}
.burger span::before, .burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px; height: 2px;
  background: #fff;
  transition: transform .32s var(--out);
}
.burger span::before { top: -8px; }
.burger span::after  { top: 8px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: translateY(8px) rotate(45deg); }
.burger.is-open span::after  { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--gutter) 3rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5%);
  transition: opacity .35s var(--out), transform .35s var(--out), visibility .35s;
}
.menu.is-open { opacity: 1; visibility: visible; transform: none; }
.menu__link {
  display: block;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  padding-block: 0.55rem;
  color: #fff;
}
.menu__rule { height: 1px; background: rgba(255,255,255,0.14); margin: 1.8rem 0; }
.menu__meta { color: var(--text-on-dark); font-size: 0.95rem; line-height: 1.9; }
.menu__meta a { color: #fff; }

/* ---------- Hero (split) ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  background: var(--ink);
}
.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem)) clamp(1.5rem, 4.2vw, 4.2rem) clamp(2.5rem, 5vw, 4rem) max(var(--gutter), 5vw);
  position: relative;
  z-index: 2;
}
.hero__title { color: #fff; margin-bottom: 1.5rem; }
.hero__title span { display: block; }
.hero__title .accent { color: var(--navy-lift); }
.hero__sub {
  color: var(--text-on-dark);
  max-width: 34rem;
  margin-bottom: 2.3rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero__media { position: relative; overflow: hidden; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(11,14,19,0.92) 0%, rgba(11,14,19,0.42) 26%, rgba(11,14,19,0) 52%);
  pointer-events: none;
}
.hero__tag {
  position: absolute;
  left: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  z-index: 3;
  max-width: 100%;
  background: rgba(11,14,19,0.82);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--navy-lift);
  padding: 0.7rem 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}

/* ---------- Capability strip ---------- */

.strip { background: var(--navy); padding: clamp(1.6rem, 3vw, 2.2rem) 0; }
.strip__inner {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.18);
  border-block: 1px solid rgba(255,255,255,0.18);
}
.strip__item {
  background: var(--navy);
  padding: 1.2rem 0.9rem;
  text-align: center;
  font-size: clamp(0.66rem, 0.95vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

/* ---------- Intro ---------- */

.intro { background: var(--ink); padding: clamp(4rem, 9vw, 7.5rem) 0; }
.intro__inner {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.intro__title { color: #fff; }
.intro__body { color: var(--text-on-dark); display: grid; gap: 1.3rem; }
.intro__quote {
  border-left: 3px solid var(--navy-lift);
  padding-left: 1.3rem;
  color: #fff;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.6;
}
.intro__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.14);
  margin-top: 0.6rem;
}
.intro__fact { background: var(--ink); padding: 1.15rem 1.15rem 1.15rem 0; }
.intro__fact dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-lift);
  margin-bottom: 0.45rem;
}
.intro__fact dd { margin: 0; color: #fff; font-size: 0.98rem; line-height: 1.5; }

/* ---------- The Index (signature moment) ---------- */

.index-sec { background: var(--paper); color: var(--text-dark); padding: clamp(4rem, 9vw, 7.5rem) 0; }
.index-sec__head {
  width: var(--wrap);
  margin: 0 auto clamp(2.2rem, 4vw, 3.4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}
.index-sec__head h2 { color: var(--text-dark); }
.index-sec__head p { color: var(--text-body); }

.index {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: start;
}
.index__list { border-top: 2px solid var(--ink); }
.index__row {
  display: flex;
  align-items: baseline;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  width: 100%;
  padding: clamp(1rem, 2.1vw, 1.5rem) 0;
  border-bottom: 1px solid rgba(11,14,19,0.16);
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  color: var(--text-dark);
  transition: color .3s var(--out), padding-left .35s var(--out);
}
.index__row:hover, .index__row.is-active { color: var(--navy); padding-left: 0.7rem; }
.index__num {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  flex: none;
  min-width: 2.1rem;
}
.index__row.is-active .index__num { color: var(--navy); }
.index__name {
  font-size: clamp(1.32rem, 3.1vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}
.index__thumb { display: none; }

.index__stage {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  overflow: hidden;
}
.index__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity .55s var(--out), transform .8s var(--out);
}
.index__stage img.is-shown { opacity: 1; transform: none; }
.index__caption {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 2;
  max-width: 100%;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Statement band ---------- */

.statement {
  background: var(--navy);
  padding: clamp(4rem, 9vw, 7rem) 0;
  text-align: center;
}
.statement__inner { width: var(--wrap-tight); margin: 0 auto; }
.statement h2 { color: #fff; margin-bottom: 1.4rem; }
.statement p { color: rgba(255,255,255,0.86); max-width: 48rem; margin: 0 auto; }

/* ---------- Ask section ---------- */

.ask { background: var(--paper); padding: clamp(4rem, 9vw, 7.5rem) 0; color: var(--text-dark); }
.ask__inner {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.ask__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.ask__media img { width: 100%; height: 100%; object-fit: cover; }
.ask h2 { color: var(--text-dark); margin-bottom: 1.5rem; }
.ask__q {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 1.8rem;
  color: var(--text-body);
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.6;
}
.ask__q strong { color: var(--text-dark); font-weight: 600; }

/* ---------- Contact ---------- */

.contact { background: var(--ink); padding: clamp(4rem, 9vw, 7.5rem) 0; }
.contact__inner {
  width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.contact h2 { color: #fff; margin-bottom: 1.2rem; }
.contact__sub { color: var(--text-on-dark); margin-bottom: 2rem; max-width: 32rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.contact__card {
  background: var(--ink-2);
  border: 1px solid rgba(255,255,255,0.12);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  display: grid;
  gap: 1.35rem;
}
.contact__row dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-lift);
  margin-bottom: 0.4rem;
}
.contact__row dd { margin: 0; color: #fff; font-size: 1rem; line-height: 1.6; }
.contact__row dd a {
  display: inline-block;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-block: 0.65rem;
}
.contact__row dd a:hover { border-bottom-color: var(--navy-lift); }

/* ---------- Footer ---------- */

.footer { background: var(--ink-2); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer__inner { width: var(--wrap); margin: 0 auto; }
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__logo img { width: auto; height: 76px; max-width: 200px; object-fit: contain; }
.footer h3 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--navy-lift);
  margin-bottom: 1rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li a, .footer__list li span {
  display: block;
  color: var(--text-on-dark);
  font-size: 0.92rem;
  line-height: 1.55;
  padding-block: 0.65rem;
}
.footer__list li a:hover { color: #fff; }
.footer__bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  justify-content: space-between;
  color: var(--text-on-dark);
  font-size: 0.8rem;
}

/* ---------- 404 ---------- */

.error {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--ink);
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
}
.error__inner { width: var(--wrap-tight); margin: 0 auto; }
.error__code {
  font-size: clamp(5rem, 20vw, 13rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: rgba(126,168,221,0.22);
  margin-bottom: 1.5rem;
}
.error h1 { color: #fff; margin-bottom: 1.2rem; }
.error p { color: var(--text-on-dark); max-width: 34rem; margin-bottom: 2rem; }

/* ---------- Reveal animation ---------- */

.js .reveal { opacity: 0; transform: translateY(26px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

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

@media (max-width: 1024px) {
  .index-sec__head { grid-template-columns: minmax(0, 1fr); }
  .footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .burger { display: flex; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }
  .hero__text {
    order: 2;
    padding: clamp(2rem, 7vw, 3rem) var(--gutter) clamp(2.5rem, 8vw, 3.5rem);
  }
  .hero__media {
    order: 1;
    min-height: 58svh;
    padding-top: var(--nav-h);
  }
  .hero__media::after {
    background: linear-gradient(to bottom, rgba(11,14,19,0.86) 0%, rgba(11,14,19,0.18) 34%, rgba(11,14,19,0) 62%);
  }
  .hero__sub { max-width: none; }

  .strip__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__item { padding: 0.95rem 0.7rem; }

  .intro__inner,
  .ask__inner,
  .contact__inner { grid-template-columns: minmax(0, 1fr); }

  .index { grid-template-columns: minmax(0, 1fr); }
  .index__stage { display: none; }
  .index__row { flex-wrap: wrap; }
  .index__thumb {
    display: block;
    width: 100%;
    margin-top: 1rem;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }
  .index__row:hover, .index__row.is-active { padding-left: 0; }

  .ask__media { order: 2; }
}

@media (max-width: 640px) {
  :root { --nav-h: 66px; }
  .footer__top { grid-template-columns: minmax(0, 1fr); }
  .intro__fact { padding-right: 0; }
  .hero__media { min-height: 52svh; }
  .btn { width: 100%; justify-content: center; }
  .hero__actions, .contact__actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 400px) {
  .strip__inner { grid-template-columns: minmax(0, 1fr); }
}
