/* NOVARIS CLEAN – Mobile High-End-Refinement v1 */

:root {
  --novaris-gold: #c9a84c;
  --novaris-gold-bright: #e5ca78;
  --novaris-ink: #070706;
  --novaris-paper: #fffdf8;
}

/* 1. Mobile Hero: klare, ruhige Text-Hierarchie und genug Luft über den Systemleisten. */
@media (max-width: 767px) {
  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:66"] {
    min-height: max(53rem, 100svh) !important;
    padding-top: 80px !important;
    padding-bottom: 4.75rem !important;
    background: #080705 !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:66"] > .container {
    transform: translate3d(0, -6.15rem, 0) !important;
    padding: 0 1.5rem 6.35rem !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:66"] p[data-loc="client/src/pages/Home.tsx:72"] {
    display: inline-block !important;
    max-width: 18.5rem !important;
    margin: 0 0 1.3rem !important;
    padding: .85rem 1rem .9rem !important;
    border-left: 2px solid var(--novaris-gold) !important;
    background: linear-gradient(90deg, rgba(5,5,4,.92), rgba(5,5,4,.75)) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.20) !important;
    color: var(--novaris-paper) !important;
    font-size: .69rem !important;
    line-height: 1.65 !important;
    letter-spacing: .12em !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:66"] h1[data-loc="client/src/pages/Home.tsx:73"] {
    max-width: 20rem !important;
    margin: 0 !important;
    font-size: clamp(3.02rem, 13.2vw, 4.15rem) !important;
    line-height: .92 !important;
    letter-spacing: -.055em !important;
    text-wrap: balance !important;
    text-shadow: 0 3px 1px rgba(0,0,0,.95), 0 13px 30px rgba(0,0,0,.56) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:66"] h1[data-loc="client/src/pages/Home.tsx:73"] span {
    display: block !important;
    margin-top: .15rem !important;
    color: #d9b85f !important;
    font-size: clamp(2.5rem, 11vw, 3.3rem) !important;
    letter-spacing: -.072em !important;
    white-space: nowrap !important;
    text-wrap: nowrap !important;
    text-shadow: 0 3px 1px rgba(0,0,0,.92), 0 12px 26px rgba(84,56,12,.34) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:66"] p[data-loc="client/src/pages/Home.tsx:77"] {
    width: min(100%, 22.25rem) !important;
    max-width: 22.25rem !important;
    margin: 1.55rem 0 0 !important;
    padding: 1.15rem 1.15rem 1.2rem !important;
    border-left: 2px solid rgba(229,202,120,.9) !important;
    background: linear-gradient(102deg, rgba(4,4,3,.93), rgba(7,7,6,.73)) !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.05) !important;
    color: rgba(255,253,248,.94) !important;
    font-size: 1rem !important;
    line-height: 1.64 !important;
    text-wrap: pretty !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:66"] img[src*="novaris-machine-master-v1"] {
    object-position: 78% center !important;
    transform: none !important;
    filter: brightness(.96) saturate(.92) contrast(1.08) !important;
  }

  body.novaris-stable.is-home-cleanup:not(.is-contact-route) a#novaris-global-whatsapp {
    bottom: max(1.1rem, env(safe-area-inset-bottom)) !important;
    left: 1.1rem !important;
    width: 3.45rem !important;
    height: 3.45rem !important;
    border: 1px solid rgba(255,244,207,.92) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.45), 0 0 0 4px rgba(201,168,76,.10) !important;
  }
}

/* 2. Galerie: kompakte, redaktionelle Bildbühne statt einer leeren horizontalen Strecke. */
@media (max-width: 767px) {
  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] {
    position: relative !important;
    overflow: hidden !important;
    padding: 4.5rem 0 4.75rem !important;
    background:
      radial-gradient(circle at 88% 7%, rgba(201,168,76,.14), transparent 17rem),
      linear-gradient(150deg, #090908 0%, #060605 56%, #0a0907 100%) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"]::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    pointer-events: none !important;
    opacity: .36 !important;
    background: linear-gradient(90deg, rgba(229,202,120,.10) 1px, transparent 1px) 0 0 / 5rem 5rem !important;
    mask-image: linear-gradient(100deg, transparent, #000 28%, #000 72%, transparent) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] > .container {
    position: relative !important;
    z-index: 1 !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] div[data-loc="client/src/pages/Home.tsx:191"] {
    align-items: flex-start !important;
    margin-bottom: 2rem !important;
    gap: 1.5rem !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] p[data-loc="client/src/pages/Home.tsx:193"] {
    display: flex !important;
    align-items: center !important;
    gap: .7rem !important;
    margin-bottom: .95rem !important;
    color: var(--novaris-gold-bright) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] p[data-loc="client/src/pages/Home.tsx:193"]::before {
    content: "" !important;
    width: 2.25rem !important;
    height: 1px !important;
    background: linear-gradient(90deg, var(--novaris-gold-bright), var(--novaris-gold)) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] h2[data-loc="client/src/pages/Home.tsx:194"] {
    max-width: 12ch !important;
    color: var(--novaris-paper) !important;
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: clamp(2.45rem, 11.5vw, 3.35rem) !important;
    font-weight: 900 !important;
    line-height: .94 !important;
    letter-spacing: -.055em !important;
    text-transform: uppercase !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] button[data-loc="client/src/pages/Home.tsx:197"] {
    min-height: 3.35rem !important;
    padding: 0 1.25rem !important;
    border-color: rgba(229,202,120,.76) !important;
    background: rgba(10,9,7,.62) !important;
    box-shadow: inset 0 0 0 1px rgba(201,168,76,.12), 0 12px 26px rgba(0,0,0,.24) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] [data-loc="client/src/pages/Home.tsx:206"].novaris-gallery-rail {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .78rem !important;
    overflow: visible !important;
    padding: 0 !important;
    scroll-snap-type: none !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] [data-loc="client/src/pages/Home.tsx:206"].novaris-gallery-rail > div,
  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] [data-loc="client/src/pages/Home.tsx:206"].novaris-gallery-rail > div:first-child {
    min-width: 0 !important;
    aspect-ratio: 4 / 5 !important;
    border: 1px solid rgba(229,202,120,.46) !important;
    border-radius: 2px !important;
    box-shadow: 0 18px 36px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.08) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] [data-loc="client/src/pages/Home.tsx:206"].novaris-gallery-rail > div:first-child {
    grid-column: 1 / -1 !important;
    aspect-ratio: 16 / 10 !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] [data-loc="client/src/pages/Home.tsx:206"].novaris-gallery-rail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    filter: saturate(.90) contrast(1.06) brightness(.96) !important;
  }

  html.is-home-cleanup body #root section[data-loc="client/src/pages/Home.tsx:189"] [data-loc="client/src/pages/Home.tsx:206"].novaris-gallery-rail > div:first-child img {
    object-position: 50% 52% !important;
  }
}

/* 3. Footer: Instagram bleibt erreichbar, die leere goldene Kachel verschwindet. */
body #root footer [data-loc="client/src/components/Footer.tsx:17"] {
  align-items: center !important;
  min-height: 2.75rem !important;
}

body #root footer a[href*="instagram.com"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  min-width: 2.75rem !important;
  min-height: 2.75rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--novaris-gold) !important;
}

body #root footer a[href*="instagram.com"]::before,
body #root footer a[href*="instagram.com"]::after {
  content: none !important;
  display: none !important;
}

body #root footer a[href*="instagram.com"] i {
  display: grid !important;
  width: 2.4rem !important;
  height: 2.4rem !important;
  place-items: center !important;
  border: 1px solid rgba(201,168,76,.68) !important;
  border-radius: 50% !important;
  background: rgba(201,168,76,.06) !important;
  color: var(--novaris-gold-bright) !important;
  font-size: .92rem !important;
  line-height: 1 !important;
}

/* Der verbliebene alte Social-Link darf keine leere Kachel aufbauen. */
body #root footer a[href*="wa.me"]:not(#novaris-global-whatsapp) {
  display: none !important;
}

/* 4. Keinen angehängten Web-/Empfehlungsblock nach dem Footer darstellen. */
body.is-home-cleanup #root footer ~ *,
body.is-home-cleanup #root > footer ~ * {
  display: none !important;
}

@media (max-width: 767px) {
  body.is-home-cleanup #root footer {
    padding-bottom: max(2.35rem, env(safe-area-inset-bottom)) !important;
  }
}

/* 5. Mobile Footer: Instagram als klarer Premium-Kontaktweg statt als loses Symbol. */
@media (max-width: 767px) {
  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:8"] {
    gap: 1.55rem !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:10"] {
    margin-bottom: 0 !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:17"] {
    display: flex !important;
    align-items: center !important;
    min-height: 0 !important;
    margin-top: 1.15rem !important;
  }

  body.is-home-cleanup #root footer a[href*="instagram.com"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    min-width: 0 !important;
    height: 2.8rem !important;
    min-height: 2.8rem !important;
    padding: 0 .95rem 0 .42rem !important;
    gap: .62rem !important;
    border: 1px solid rgba(229,202,120,.68) !important;
    border-radius: 999px !important;
    background: linear-gradient(100deg, rgba(201,168,76,.17), rgba(201,168,76,.035)) !important;
    box-shadow: inset 0 1px 0 rgba(255,244,207,.14), 0 9px 20px rgba(0,0,0,.18) !important;
    color: #eed487 !important;
    text-decoration: none !important;
  }

  body.is-home-cleanup #root footer a[href*="instagram.com"]::after {
    content: "INSTAGRAM FOLGEN" !important;
    display: inline-block !important;
    color: #eed487 !important;
    font-family: Raleway, Arial, sans-serif !important;
    font-size: .62rem !important;
    font-weight: 800 !important;
    letter-spacing: .13em !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.is-home-cleanup #root footer a[href*="instagram.com"] i {
    display: grid !important;
    width: 1.92rem !important;
    height: 1.92rem !important;
    flex: 0 0 1.92rem !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #d3af55 !important;
    color: #0a0907 !important;
    font-size: .83rem !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.22) !important;
  }
}

/* 6. Mobile Footer v2: kompakte Zielansicht mit ruhiger Marken- und Kontakt-Hierarchie. */
@media (max-width: 767px) {
  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:7"] {
    padding-top: 2.55rem !important;
    padding-bottom: max(1.55rem, env(safe-area-inset-bottom)) !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:8"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.65rem !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:10"] {
    max-width: 31rem !important;
    margin: 0 !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:10"] img[src*="logo"],
  body.is-home-cleanup #root footer img[src*="logo"] {
    width: 9rem !important;
    max-width: 9rem !important;
    max-height: none !important;
    height: auto !important;
    object-fit: contain !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:17"] {
    margin-top: .9rem !important;
  }

  body.is-home-cleanup #root footer a[href*="instagram.com"] {
    justify-content: center !important;
    width: 3rem !important;
    min-width: 3rem !important;
    height: 3rem !important;
    min-height: 3rem !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 1px solid rgba(229,202,120,.65) !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.is-home-cleanup #root footer a[href*="instagram.com"]::after {
    content: none !important;
    display: none !important;
  }

  body.is-home-cleanup #root footer a[href*="instagram.com"] i {
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
    display: inline-block !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #e7cc7c !important;
    font-size: .92rem !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:79"] {
    margin-top: .25rem !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:105"] {
    margin-top: 1.65rem !important;
    padding-top: 1.2rem !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:82"],
  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:93"] {
    gap: .72rem !important;
  }

  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:82"] svg,
  body.is-home-cleanup #root footer [data-loc="client/src/components/Footer.tsx:93"] svg {
    opacity: 1 !important;
    color: #d7b862 !important;
  }
}
