/* ==========================================================================
   IGO — Home page layout
   Composes tokens/components from design-system.css
   ========================================================================== */

/* ---- Smart sticky header: hides scrolling down, returns scrolling up ------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  max-width: none;
  padding-inline: 0;
  background: transparent;
  transition: transform 320ms var(--ease-out),
              background-color 250ms var(--ease-out),
              box-shadow 250ms var(--ease-out);
}
.site-header .nav {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}
.site-header.is-scrolled {
  background: var(--canvas);
  box-shadow: 0 1px 0 var(--hairline), 0 10px 30px rgba(46, 18, 7, .07);
}
.site-header.is-hidden { transform: translateY(-102%); }
@media (max-width: 720px) {
  .site-header .nav { padding-inline: var(--space-5); }
}

/* ---- Nav ----------------------------------------------------------------- */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 15px;
}
.nav__group { display: flex; gap: 28px; align-items: center; }
.nav__logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  color: var(--espresso);
}
/* Uploaded logo images (CMS): desktop variant ≥721px, mobile variant below */
.nav__logo.has-img { display: flex; align-items: center; }
.nav__logo.has-img img { height: 48px; width: auto; display: block; }
.nav__logo.has-img .logo-mobile { display: none; }
@media (max-width: 720px) {
  .nav__logo.has-img .logo-desktop { display: none; }
  .nav__logo.has-img .logo-mobile { display: block; height: 42px; }
}

/* Mobile nav: hamburger + wordmark, links move into a full-screen menu */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--espresso);
}
/* Slide-in drawer from the right, with dimmed backdrop */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  transition: visibility 0s 450ms;
}
.mobile-menu.is-open {
  visibility: visible;
  transition: visibility 0s;
}
.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 18, 7, .38);
  opacity: 0;
  transition: opacity 350ms var(--ease-out);
}
.mobile-menu.is-open .mobile-menu__backdrop { opacity: 1; }
.mobile-menu__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(84vw, 340px);
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  transform: translateX(103%);
  transition: transform 420ms cubic-bezier(.32, .72, .28, 1);
  box-shadow: -24px 0 60px rgba(46, 18, 7, .2);
}
.mobile-menu.is-open .mobile-menu__drawer { transform: none; }
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 12px 24px;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu__head .wordmark { margin: 0; color: var(--espresso); font-size: 1.5rem; }
.mobile-menu__close {
  background: none;
  border: 0;
  padding: 10px;
  color: var(--espresso);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.mobile-menu__links {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 24px 0;
  overflow-y: auto;
}
.mobile-menu__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--espresso);
  text-decoration: none;
  opacity: 0;
  transform: translateX(26px);
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}
.mobile-menu__links a::after {
  content: "→";
  color: var(--sage);
  font-size: .9em;
}
.mobile-menu__links a:active { color: var(--sage); }
.mobile-menu.is-open .mobile-menu__links a { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(1) { transition-delay: 100ms; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(2) { transition-delay: 145ms; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(3) { transition-delay: 190ms; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(4) { transition-delay: 235ms; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(5) { transition-delay: 280ms; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(6) { transition-delay: 325ms; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(7) { transition-delay: 370ms; }
.mobile-menu__foot {
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-menu__foot .btn { width: 100%; }
.mobile-menu__meta {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--sage);
}

/* Hamburger morphs into an × while open */
.nav__toggle span {
  transition: transform 300ms var(--ease-out), opacity 200ms var(--ease-out);
  transform-origin: center;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 720px) {
  .nav__group { display: none; }
  .nav__toggle { display: inline-flex; order: 2; align-items: flex-end; }
  .nav__logo { position: static; transform: none; }
  .nav { justify-content: space-between; }
}

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  width: calc(100% - 42px);
  margin-inline: auto;
  height: min(710px, 88vh);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: url("../assets/hero-bg.png") center 30% / cover no-repeat;
  transform: scale(1.02);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(46, 18, 7, .45), transparent 55%);
}
.hero__content {
  position: relative;
  padding: var(--space-7) var(--page-pad);
  color: var(--cream);
  max-width: 900px;
}
.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-tag);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(250, 242, 229, .68);
  margin: 0 0 var(--space-4);
}
.hero__title {
  margin: 0;
  font-size: clamp(2.75rem, 1.4rem + 4.2vw, 4.5rem); /* quieter than the 96px token */
}
.hero__sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
  line-height: 1.6;
  color: rgba(250, 242, 229, .82);
  margin: var(--space-4) 0 0;
  max-width: 46ch;
}

/* ---- Laser / Skin duo ------------------------------------------------------ */
.duo {
  width: calc(100% - 42px);
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.duo .panel { justify-content: space-between; gap: var(--space-6); }
.duo__title { margin: 0; }
.duo__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
}
.duo__foot p { margin: 0; max-width: 390px; font-size: var(--text-body); }

/* ---- Generic section spacing ---------------------------------------------- */
.section { padding-block: var(--space-7) var(--space-9); }
.section--surface { background: var(--surface); }
.section--tight { padding-block: var(--space-7); }
.section--flush-bottom { padding-bottom: 0; }
.section--flush-top { padding-top: 0; }

.section-head { margin-bottom: var(--space-6); }

/* ---- Services -------------------------------------------------------------- */
.services { margin-top: 58px; }
.services__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 var(--space-7);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  transition: opacity 250ms var(--ease-out);
}
.services__grid.is-swapping { opacity: 0; }

/* ---- Split feature (How we practice / Why DMK) ------------------------------ */
.split {
  display: flex;
  gap: clamp(48px, 8vw, 126px);
  align-items: flex-end;
  padding-top: var(--space-8);
}
.split__media {
  /* 677:526 image-to-copy ratio from Figma — the asymmetry is intentional */
  flex: 677 1 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 677 / 780;
  max-height: 780px;
}
.split__media > img.cover,
.split__media > video.cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split__media .float {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  border-radius: var(--radius-photo);
  box-shadow: 0 24px 60px rgba(46, 18, 7, .35);
}
.split__copy {
  flex: 526 1 0;
  min-width: 0;
  max-width: 526px;
  display: flex;
  flex-direction: column;
  gap: 39px;
  padding-bottom: var(--space-2);
}
.split__copy header { display: flex; flex-direction: column; gap: 15px; }
.split__copy header p { margin: 0; max-width: 44ch; }

/* Why DMK: narrow, full-height image column; the text takes the horizontal room */
.split--reverse .split__media { flex: 500 1 0; }
.split--reverse .split__copy { flex: 710 1 0; max-width: 660px; }
.split--reverse .split__copy .display-h3 { font-size: clamp(1.5rem, 1.3rem + 0.7vw, 1.875rem); }
.split--reverse .split__media .float { width: 52%; }
@media (min-width: 1101px) {
  /* fixed height so shrinking the width doesn't shorten the image */
  .split--reverse .split__media { aspect-ratio: auto; height: 780px; }
}

/* ---- Products -------------------------------------------------------------- */
.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

/* ---- Special offers --------------------------------------------------------- */
.offers__grid {
  display: grid;
  grid-template-columns: 1.005fr 1fr;
  gap: 16px;
}
.offer { justify-content: space-between; gap: var(--space-5); }
.offer__lead { margin: var(--space-5) 0 0; font-size: var(--text-lead); }
.offer__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}
.offer__foot p { margin: 0; max-width: 390px; font-size: var(--text-body); }
.offer__price {
  flex: none;
  display: inline-flex;
  padding: 10px 15px;
  font-size: var(--text-body);
  white-space: nowrap;
}
.offer__price--cream { background: var(--cream); color: var(--sage); }
.offer__price--outline { border: 1px solid var(--espresso); color: var(--espresso); }

/* ---- Journal ---------------------------------------------------------------- */
.journal__grid {
  display: flex;
  gap: clamp(32px, 4.6vw, 64px);
  align-items: stretch;
}
.journal__media {
  flex: 1 1 50%;
  min-width: 0;
  overflow: hidden;
}
.journal__media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}
.journal__list { flex: 1 1 50%; min-width: 0; }
.journal-row--feature { border-top-color: transparent; padding-top: 0; }
.journal-row--feature .journal-row__title {
  font-size: var(--text-feature);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.journal__list .journal-row:last-child { border-bottom: 1px solid var(--hairline-strong); }

/* ---- Closing CTA ------------------------------------------------------------- */
.cta {
  position: relative;
  height: min(710px, 92vh);
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
}
.cta__bg {
  position: absolute;
  inset: 0;
  background: url("../assets/cta-bg.png") center bottom / cover no-repeat;
}
.cta__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(46, 18, 7, .18);
}
.cta__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 21px;
  max-width: 692px;
  padding-inline: var(--space-5);
  color: var(--cream);
}
.cta__content > p { margin: 0; }
.cta__blurb { font-size: var(--text-lead); max-width: 608px; }

/* ---- Footer ------------------------------------------------------------------ */
.footer {
  background: var(--cream);
  padding: 80px 0 40px;
  overflow: hidden;
}
.footer__cols {
  display: flex;
  justify-content: space-between;
  gap: var(--space-7);
  flex-wrap: wrap;
}
.footer__news { display: flex; flex-direction: column; gap: 18px; }
.footer__news .input-capture { border-color: var(--hairline); }
.footer .watermark { margin-top: var(--space-8); }
.footer__legal {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
  margin-top: var(--space-5);
  font-size: var(--text-caption);
  color: var(--sage);
}
.footer__legal a { color: var(--sage); text-decoration: none; }
.footer__legal a:hover { color: var(--espresso); }
.footer__legal nav { display: flex; gap: 28px; }

/* ---- Reveal motion ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--dur-slow) var(--ease-out),
                transform var(--dur-slow) var(--ease-out);
  }
  .reveal.is-in { opacity: 1; transform: none; }

  .hero__content > * {
    animation: rise 900ms var(--ease-out) both;
  }
  .hero__content > *:nth-child(2) { animation-delay: 140ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(34px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---- Responsive ---------------------------------------------------------------- */
@media (max-width: 1100px) {
  .services__grid, .products__grid { grid-template-columns: repeat(2, 1fr); }
  .duo, .offers__grid { grid-template-columns: 1fr; }
  .split, .split--reverse { flex-direction: column; align-items: stretch; }
  .split__media, .split__copy,
  .split--reverse .split__media, .split--reverse .split__copy { flex: 0 0 auto; }
  .split__copy { max-width: 640px; }
  .journal__grid { flex-direction: column; }
  .journal__media img { min-height: 320px; }
  .nav__group { gap: 16px; }
}
@media (max-width: 640px) {
  .services__grid, .products__grid { grid-template-columns: 1fr; }
  .hero, .duo { width: calc(100% - 24px); }
  .panel { min-height: 0; padding: var(--space-6) var(--space-5); }
  .duo__foot, .offer__foot { flex-direction: column; align-items: flex-start; }
}
