
/* FACETED PAPER BACKGROUND FINAL — exact user reference texture */

/* The prior textile assets were nearly transparent. This pass deliberately
   uses the faceted texture as a visible page-level material. */

html[data-theme="light"]{
  background:#f5f4f0!important;
}
html[data-theme="light"] body{
  background-color:#f5f4f0!important;
  background-image:
    linear-gradient(rgba(248,247,243,.38),rgba(248,247,243,.38)),
    url('../assets/ui/faceted-paper-light.webp')!important;
  background-repeat:repeat,repeat!important;
  background-size:auto,1300px 1670px!important;
  background-position:0 0,center top!important;
  background-attachment:fixed,fixed!important;
}

/* Major light sections must not paint over the texture. */
html[data-theme="light"] .hero{
  background:
    radial-gradient(circle at 78% 20%,rgba(91,186,228,.11),transparent 30%),
    radial-gradient(circle at 68% 70%,rgba(217,112,179,.055),transparent 25%),
    linear-gradient(135deg,rgba(250,249,246,.61),rgba(240,245,245,.53) 56%,rgba(231,241,244,.55))!important;
  border-bottom-color:rgba(37,75,91,.075)!important;
}
html[data-theme="light"] .services,
html[data-theme="light"] .projects,
html[data-theme="light"] .process-section,
html[data-theme="light"] .faq-section,
html[data-theme="light"] .contact-section{
  background:
    linear-gradient(180deg,rgba(249,248,244,.48),rgba(246,246,242,.34))!important;
  border-top:1px solid rgba(31,66,82,.035);
  border-bottom:1px solid rgba(31,66,82,.03);
}
html[data-theme="light"] .pricing-section,
html[data-theme="light"] .about-section{
  background:
    radial-gradient(circle at 84% 18%,rgba(219,124,184,.035),transparent 26%),
    linear-gradient(180deg,rgba(237,242,240,.50),rgba(246,245,241,.36))!important;
}

/* Glass surfaces: enough opacity for readability, but texture still visible around them. */
html[data-theme="light"] .service-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .price-card,
html[data-theme="light"] .lead-form,
html[data-theme="light"] .contact-aside,
html[data-theme="light"] .advantages{
  background:
    linear-gradient(145deg,rgba(255,255,255,.78),rgba(249,250,248,.58))!important;
  border-color:rgba(37,73,89,.10)!important;
  box-shadow:
    0 28px 68px rgba(48,67,76,.085),
    0 8px 22px rgba(48,67,76,.055),
    inset 0 1px 0 rgba(255,255,255,.94)!important;
  backdrop-filter:blur(14px) saturate(112%);
  -webkit-backdrop-filter:blur(14px) saturate(112%);
}

/* Contact section was previously still painted dark in light theme. */
html[data-theme="light"] .contact-section{
  color:#102633!important;
}
html[data-theme="light"] .contact-layout{
  position:relative;
}

/* Footer gets a frosted panel rather than a solid strip. */
html[data-theme="light"] .footer{
  background:rgba(244,245,242,.72)!important;
  border-top:1px solid rgba(31,66,82,.08)!important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

/* The project modal also receives the material. */
html[data-theme="light"] .project-modal__dialog{
  background:
    linear-gradient(145deg,rgba(255,255,255,.88),rgba(246,247,244,.83)),
    url('../assets/ui/faceted-paper-light.webp')!important;
  background-repeat:no-repeat,repeat!important;
  background-size:auto,1300px 1670px!important;
  border-color:rgba(36,72,89,.13)!important;
}

/* DARK: same facet geometry in navy, visible but controlled. */
html[data-theme="dark"],
html:not([data-theme="light"]){
  background:#021421!important;
}
html[data-theme="dark"] body,
html:not([data-theme="light"]) body{
  background-color:#021421!important;
  background-image:
    linear-gradient(rgba(2,20,33,.54),rgba(2,20,33,.54)),
    url('../assets/ui/faceted-paper-dark.webp')!important;
  background-repeat:repeat,repeat!important;
  background-size:auto,1300px 1670px!important;
  background-position:0 0,center top!important;
  background-attachment:fixed,fixed!important;
}
html[data-theme="dark"] .services,
html[data-theme="dark"] .projects,
html[data-theme="dark"] .process-section,
html[data-theme="dark"] .faq-section,
html[data-theme="dark"] .contact-section,
html:not([data-theme="light"]) .services,
html:not([data-theme="light"]) .projects,
html:not([data-theme="light"]) .process-section,
html:not([data-theme="light"]) .faq-section,
html:not([data-theme="light"]) .contact-section{
  background:linear-gradient(180deg,rgba(2,20,33,.72),rgba(3,24,39,.60))!important;
}
html[data-theme="dark"] .pricing-section,
html[data-theme="dark"] .about-section,
html:not([data-theme="light"]) .pricing-section,
html:not([data-theme="light"]) .about-section{
  background:
    radial-gradient(circle at 82% 18%,rgba(242,93,173,.035),transparent 26%),
    linear-gradient(180deg,rgba(3,26,41,.72),rgba(2,20,33,.62))!important;
}

/* Preserve the cinematic hero while showing facets at the edges. */
html[data-theme="dark"] .hero,
html:not([data-theme="light"]) .hero{
  background:
    radial-gradient(circle at 77% 22%,rgba(62,176,255,.14),transparent 29%),
    radial-gradient(circle at 72% 65%,rgba(240,93,173,.075),transparent 24%),
    linear-gradient(135deg,rgba(1,17,29,.82) 0%,rgba(2,26,45,.82) 52%,rgba(5,43,71,.82) 100%)!important;
}

/* Tablet/mobile: fixed texture can cause browser repaint jank. */
@media(max-width:760px){
  html[data-theme="light"] body,
  html[data-theme="dark"] body,
  html:not([data-theme="light"]) body{
    background-attachment:scroll,scroll!important;
    background-size:auto,900px auto!important;
  }
  html[data-theme="light"] .hero{
    background:
      linear-gradient(135deg,rgba(250,249,246,.66),rgba(235,242,243,.58))!important;
  }
}
