/* ==========================================================================
   DMU Construction — Index page
   Design system + page-specific section architecture

   Sections mirror the live index page exactly:
   Header · Hero slideshow · Honest & Efficient Work · Footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette, sampled from the DMU Construction logo */
  --dmu-navy:        #2A2F52;   /* logo wordmark — headings, dark surfaces */
  --dmu-navy-deep:   #1E2240;   /* deeper step for footer base */
  --dmu-red:         #A5302A;   /* logo roof + "CONSTRUCTION" — accent */
  --dmu-red-deep:    #8A2622;

  /* Neutrals */
  --dmu-ink:         #1A1C2B;
  --dmu-body:        #565A6E;
  --dmu-muted:       #8C90A3;
  --dmu-paper:       #FFFFFF;
  --dmu-sand:        #F6F4F1;
  --dmu-line:        #E4E2DE;
  --dmu-line-dark:   rgba(255, 255, 255, .16);

  /* Typography */
  --font-display: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --font-ui:      'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --fs-h1:   clamp(2.75rem, 1.30rem + 6.20vw, 5.25rem);   /* 44 → 84 */
  --fs-h2:   clamp(2.00rem, 1.13rem + 3.72vw, 3.375rem);  /* 32 → 54 */
  --fs-lead: clamp(1.0625rem, 0.96rem + 0.46vw, 1.3125rem);
  --fs-body: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
  --fs-small: 0.9375rem;
  --fs-eyebrow: 0.75rem;

  /* Spacing */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 40px);
  --sp-section: clamp(80px, 9vw, 150px);

  /* Motion */
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --dur-fast: .25s;
  --dur-base: .45s;
  --dur-slow: .9s;

  --util-h: 44px;
  --bar-h: 92px;
  --header-h: calc(var(--util-h) + var(--bar-h));
}

@media (max-width: 991px) {
  :root { --util-h: 40px; --bar-h: 74px; }
}
@media (max-width: 575px) {
  :root { --util-h: 0px; }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 16px);
}

body.index-page {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.78;
  color: var(--dmu-body);
  background: var(--dmu-paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
button { font: inherit; color: inherit; }

h1, h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--dmu-navy);
  letter-spacing: -0.02em;
}
h1 { font-size: var(--fs-h1); line-height: 1.06; font-weight: 300; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.025em; }

:focus-visible {
  outline: 2px solid var(--dmu-red);
  outline-offset: 3px;
}

.index-skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--dmu-navy);
  color: #fff;
  font-size: var(--fs-small);
  transition: top var(--dur-fast) var(--ease-out);
}
.index-skip:focus { top: 16px; }

/* Shared container */
.index-header__utility-inner,
.index-header__inner,
.index-hero__inner,
.index-hero__ui-inner,
.index-work__inner,
.index-footer__inner,
.index-footer__base-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   3. Motion utilities
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-revealed { opacity: 1; transform: none; will-change: auto; }

/* --------------------------------------------------------------------------
   4. HEADER — utility strip + main bar
   -------------------------------------------------------------------------- */
.index-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: transform var(--dur-base) var(--ease-out);
}
.index-header.is-hidden { transform: translateY(-100%); }

/* -- utility strip -- */
.index-header__utility {
  height: var(--util-h);
  background: var(--dmu-navy-deep);
  color: rgba(255, 255, 255, .82);
  overflow: hidden;
  transition: height var(--dur-base) var(--ease-out);
}
.index-header__utility-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 3vw, 36px);
  height: var(--util-h);
}
.index-header.is-stuck .index-header__utility { height: 0; }

.index-header__contact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  transition: color var(--dur-base) var(--ease-out);
}
.index-header__contact:hover { color: #fff; }
.index-header__contact-icon { color: var(--dmu-red); flex: none; }
.index-header__contact-icon svg { width: 15px; height: 15px; }
.index-header__contact--email .index-header__contact-value { letter-spacing: 0.06em; }

@media (max-width: 575px) { .index-header__utility { display: none; } }

/* -- main bar -- */
/* No backdrop-filter here: it would become the containing block for the
   position:fixed mobile drawer, collapsing it to the height of the bar.
   The bar is opaque anyway, so the blur bought nothing. */
.index-header__bar {
  background: #fff;
  border-bottom: 1px solid var(--dmu-line);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.index-header.is-stuck .index-header__bar {
  box-shadow: 0 14px 40px -28px rgba(26, 28, 43, .8);
}

.index-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  height: var(--bar-h);
  transition: height var(--dur-base) var(--ease-out);
}
.index-header.is-stuck .index-header__inner { height: calc(var(--bar-h) - 12px); }

.index-header__brand { flex: none; }
.index-header__brand img {
  width: auto;
  height: clamp(46px, 5vw, 66px);
  transition: height var(--dur-base) var(--ease-out);
}
.index-header.is-stuck .index-header__brand img { height: clamp(40px, 4.2vw, 54px); }

/* -- desktop nav -- */
.index-header__nav { margin-left: auto; }

/* horizontal bar only while StellarNav is NOT in mobile mode */
.index-header__nav.stellarnav:not(.mobile) > ul {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.9vw, 30px);
}

.index-header__nav.stellarnav > ul > li > a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3F4459;
  transition: color var(--dur-base) var(--ease-out);
}
.index-header__nav.stellarnav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--dmu-red);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--dur-base) var(--ease-out);
}
.index-header__nav.stellarnav > ul > li > a:hover,
.index-header__nav.stellarnav > ul > li > a.is-active { color: var(--dmu-navy); }
.index-header__nav.stellarnav > ul > li > a:hover::after,
.index-header__nav.stellarnav > ul > li > a.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* -- StellarNav overrides -- */
.index-header__nav.stellarnav,
.index-header__nav.stellarnav.dark,
.index-header__nav.stellarnav.light { background: transparent; }

.index-header__nav.stellarnav { position: relative; }
.index-header__nav.stellarnav > ul { background: transparent; text-align: left; }
.index-header__nav.stellarnav > ul > li { display: block; background: transparent; }

.index-header__nav.stellarnav .menu-toggle {
  color: var(--dmu-navy);
  font-size: 0;
  padding: 10px 0 10px 14px;
}
.index-header__nav.stellarnav .menu-toggle span.bars { margin-right: 0; }
/* matches StellarNav's own `.stellarnav.dark .menu-toggle span.bars span`
   specificity so the burger inherits the header colour instead of white */
.index-header__nav.stellarnav .menu-toggle span.bars span {
  background: currentColor;
  width: 22px;
  height: 2px;
  margin: 0 0 5px;
}

/* shrink the nav to the toggle so it sits at the right edge */
.index-header__nav.stellarnav.mobile {
  width: auto;
  margin-left: auto;
}

/* Side drawer — StellarNav owns geometry and the .active toggle; skin only. */
.index-header__nav.stellarnav.mobile.right > ul {
  padding: 76px 0 28px;
  background: var(--dmu-navy);
  box-shadow: -30px 0 70px -30px rgba(0, 0, 0, .75);
  text-align: left;
}
.index-header__nav.stellarnav.mobile > ul > li { border-bottom: 1px solid var(--dmu-line-dark); }
.index-header__nav.stellarnav.mobile > ul > li:last-child { border-bottom: 0; }
.index-header__nav.stellarnav.mobile > ul > li > a {
  display: block;
  padding: 15px 24px;
  color: rgba(255, 255, 255, .82);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.index-header__nav.stellarnav.mobile > ul > li > a::after { display: none; }
.index-header__nav.stellarnav.mobile > ul > li > a:hover,
.index-header__nav.stellarnav.mobile > ul > li > a.is-active { color: #fff; }

.index-header__nav.stellarnav.mobile .close-menu {
  position: absolute;
  top: 20px;
  right: 14px;
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, .6);
}
.index-header__nav.stellarnav.mobile .close-menu .icon-close { margin-right: 8px; }

/* --------------------------------------------------------------------------
   5. HERO — three-slide showcase
   -------------------------------------------------------------------------- */
.index-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--dmu-navy);
  isolation: isolate;
  overflow: hidden;
}

.index-hero__slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.index-hero__slide { overflow: hidden; }

.index-hero__media { position: absolute; inset: 0; }
.index-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 7s linear;
}
/* Ken Burns settles only on the active slide */
.swiper-slide-active .index-hero__media img { transform: scale(1); }

.index-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(26, 28, 43, .72) 0%, rgba(26, 28, 43, .18) 38%, rgba(26, 28, 43, .86) 100%),
    linear-gradient(90deg, rgba(26, 28, 43, .74) 0%, rgba(26, 28, 43, 0) 66%);
}

.index-hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(24px, 4vw, 56px));
  padding-bottom: clamp(120px, 15vw, 190px);
  pointer-events: none;
}
.index-hero__content a,
.index-hero__content button { pointer-events: auto; }

.index-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #fff;
}
.index-hero__eyebrow::before {
  content: "";
  width: clamp(32px, 5vw, 64px);
  height: 3px;
  background: var(--dmu-red);
  flex: none;
}

.index-hero__heading {
  max-width: 14ch;
  color: #fff;
  text-shadow: 0 2px 40px rgba(15, 16, 26, .35);
}
.index-hero__line { display: block; overflow: hidden; }
.index-hero__line > span {
  display: block;
  transform: translate3d(0, 105%, 0);
  transition: transform 1.05s var(--ease-out);
}
.index-hero.is-ready .index-hero__line > span { transform: none; }
.index-hero.is-ready .index-hero__line:nth-child(2) > span { transition-delay: .12s; }

/* -- slider UI -- */
.index-hero__ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(28px, 4.5vw, 56px);
  z-index: 4;
}
.index-hero__ui-inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}

.index-hero__count {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
  font-family: var(--font-display);
  color: #fff;
}
.index-hero__count-current { font-size: 1.375rem; }
.index-hero__count-sep {
  width: 26px;
  height: 1px;
  background: rgba(255, 255, 255, .5);
  transform: translateY(-6px);
}
.index-hero__count-total { font-size: 0.9375rem; color: rgba(255, 255, 255, .6); }

.index-hero__progress {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, .24);
  overflow: hidden;
}
.index-hero__progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--dmu-red);
  transform: scaleX(0);
  transform-origin: left center;
}
.index-hero__progress > span.is-running {
  transition: transform var(--hero-delay, 6s) linear;
  transform: scaleX(1);
}

.index-hero__nav { display: flex; gap: 10px; flex: none; }
.index-hero__btn {
  display: grid;
  place-items: center;
  width: clamp(44px, 4vw, 54px);
  height: clamp(44px, 4vw, 54px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.index-hero__btn svg { width: 18px; height: 18px; }
.index-hero__btn:hover {
  background: var(--dmu-red);
  border-color: var(--dmu-red);
  color: #fff;
}

@media (max-width: 767px) {
  .index-hero__ui-inner { gap: 14px; }
  .index-hero__count-sep { width: 16px; }
}
@media (max-width: 480px) {
  .index-hero__count { display: none; }
}

/* --------------------------------------------------------------------------
   6. HONEST & EFFICIENT WORK — editorial statement band
   -------------------------------------------------------------------------- */
.index-work {
  position: relative;
  padding-block: var(--sp-section);
  background: var(--dmu-sand);
  overflow: hidden;
}

/* faint brand monogram, purely decorative */
.index-work__watermark {
  position: absolute;
  top: 50%;
  right: clamp(12px, 3vw, 56px);
  width: clamp(200px, 24vw, 360px);
  transform: translateY(-50%);
  opacity: .045;
  pointer-events: none;
}
.index-work__watermark img { width: 100%; height: auto; }

.index-work__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 6vw, 96px);
}

.index-work__eyebrow {
  margin: 0 0 16px;
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dmu-red);
}

.index-work__heading {
  max-width: 12ch;
  color: var(--dmu-navy);
}

.index-work__rule {
  display: block;
  width: clamp(64px, 8vw, 110px);
  height: 3px;
  margin-top: clamp(24px, 3vw, 36px);
  background: var(--dmu-red);
  transform-origin: left center;
}

.index-work__body {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.4vw, 30px);
  padding-top: clamp(6px, 1.4vw, 18px);
}

.index-work__text {
  font-size: var(--fs-lead);
  line-height: 1.72;
  color: var(--dmu-body);
  max-width: 54ch;
}
.index-work__text:first-child {
  color: var(--dmu-ink);
  padding-left: clamp(18px, 2vw, 26px);
  border-left: 2px solid var(--dmu-line);
}

@media (max-width: 991px) {
  .index-work__inner { grid-template-columns: 1fr; }
  .index-work__heading { max-width: 16ch; }
  /* the mark would sit directly behind body copy once stacked */
  .index-work__watermark { display: none; }
}

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.index-footer {
  background: var(--dmu-navy);
  color: rgba(255, 255, 255, .68);
}

.index-footer__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(36px, 4.5vw, 60px);
}

.index-footer__brand {
  display: inline-block;
  padding: 12px 16px;
  background: #fff;
  border-radius: 4px;
}
.index-footer__brand img { width: auto; height: clamp(44px, 4.5vw, 58px); }

.index-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 26px);
}
.index-footer__nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .66);
  transition: color var(--dur-base) var(--ease-out);
}
.index-footer__nav a:hover { color: #fff; }

.index-footer__contact { display: grid; gap: 6px; justify-items: end; }
.index-footer__contact a {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  background-image: linear-gradient(var(--dmu-red), var(--dmu-red));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size var(--dur-base) var(--ease-out);
}
.index-footer__contact a:hover { background-size: 100% 2px; }

.index-footer__base { background: var(--dmu-navy-deep); }
.index-footer__base-inner { padding-block: 20px; }
.index-footer__copy {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, .5);
  text-align: center;
}

@media (max-width: 991px) {
  .index-footer__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .index-footer__contact { justify-items: center; }
}

/* keep the footer links inside the gutter on small screens */
@media (max-width: 575px) {
  .index-footer__nav { gap: 10px 14px; }
  .index-footer__nav a { font-size: 0.75rem; letter-spacing: 0.05em; }
}

/* --------------------------------------------------------------------------
   8. Back to top
   -------------------------------------------------------------------------- */
.index-totop {
  position: fixed;
  right: clamp(16px, 2vw, 32px);
  bottom: clamp(16px, 2vw, 32px);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--dmu-navy);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out);
}
.index-totop svg { width: 18px; height: 18px; }
.index-totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.index-totop:hover { background: var(--dmu-red); }

/* --------------------------------------------------------------------------
   9. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .index-hero__line > span { transform: none !important; transition: none !important; }
  .index-hero__media img { transform: none !important; transition: none !important; }
  .index-hero__progress > span { transition: none !important; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
