/* ==========================================================================
   Divya Chemicals – UI polish layer
   Loaded LAST (after styles.css and brand-responsive.css). Refinement only:
   no layout/content changes. Guided by Impeccable (polish + craft floor) and
   Emil Kowalski's design-engineering principles.
   Remove this one <link> to revert every change in this file.
   ========================================================================== */

:root{
  /* Motion tokens: strong custom curves (built-in CSS easings are too weak) */
  --ease-out:cubic-bezier(.23,1,.32,1);
  --ease-in-out:cubic-bezier(.77,0,.175,1);
  --dur-press:140ms;
  --dur-hover:200ms;
  --dur-reveal:520ms;
  --focus-ring:0 0 0 3px #fff,0 0 0 5px var(--red,#d92332);
}

/* ---------- 1. Browser surfaces (theme the parts nobody draws) ---------- */
::selection{background:rgba(217,35,50,.16);color:var(--navy,#0c0e10)}
html{scrollbar-color:#c9c4bb transparent;-webkit-tap-highlight-color:transparent}
input,textarea,select{caret-color:var(--red,#d92332);accent-color:var(--red,#d92332)}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}

/* Inline links inside running text: visible, offset underline */
main p a:not(.btn):not([class]),
main li a:not(.btn):not([class]),
.soft-panel a:not(.btn){
  text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.22em;
  text-decoration-color:rgba(217,35,50,.45);
  transition:text-decoration-color var(--dur-hover) ease,color var(--dur-hover) ease;
}
main p a:not(.btn):not([class]):hover,
main li a:not(.btn):not([class]):hover,
.soft-panel a:not(.btn):hover{color:var(--red,#d92332);text-decoration-color:currentColor}

/* One consistent, high-contrast focus ring (keyboard only) */
:focus-visible{outline:none;box-shadow:var(--focus-ring)}
.btn:focus-visible,.nav-cta:focus-visible{box-shadow:var(--focus-ring)}

/* ---------- 2. Typography ---------- */
h1,h2,h3,.section-heading h2,.page-intro h2{text-wrap:balance}
p,li,dd,td{text-wrap:pretty}
/* Tracking floor: display type never tighter than -0.04em (was up to -0.09em) */
.home-hero h1,.page-hero h1,.vm-heading h2,.home-case-copy h2{letter-spacing:-.04em}
/* Comfortable measure for long intros */
.page-intro p,.section-heading p,.home-hero p{max-width:68ch}
.section-heading p,.page-intro p{margin-inline:auto}
/* Numbers line up */
.stat b,.stat-card strong,.spec-table td,.metric-strip strong{font-variant-numeric:tabular-nums}

/* Minimum readable size: nothing on the page below 12px */
.stat small{font-size:12px}
@media(max-width:560px){
  .mega-col a{font-size:13px}
  .mega-col h4{font-size:12px}
  .stat small{font-size:12px}
  /* Long kicker no longer wraps awkwardly on phones */
  .home-hero .eyebrow,.page-hero .eyebrow{letter-spacing:.12em}
}

/* ---------- 3. Interaction: buttons feel pressed ---------- */
.btn,.nav-cta,.btn-secondary,.btn-outline-light,.floating-enquiry a,.mobile-menu-btn{
  transition:transform var(--dur-press) var(--ease-out),
             background-color var(--dur-hover) ease,
             border-color var(--dur-hover) ease,
             color var(--dur-hover) ease,
             box-shadow var(--dur-hover) var(--ease-out);
}
.btn:active,.nav-cta:active,.btn-secondary:active,.btn-outline-light:active,
.floating-enquiry a:active,.mobile-menu-btn:active{transform:scale(.97)}
.btn span[aria-hidden="true"]{transition:transform var(--dur-hover) var(--ease-out)}

/* Hover lift only where a real pointer exists (touch would trigger it on tap) */
@media (hover:none),(pointer:coarse){
  .btn:hover,.card:hover,.vm-card:hover,.vm-card.reveal-on-scroll.is-visible:hover{transform:none}
}
@media (hover:hover) and (pointer:fine){
  .btn:hover span[aria-hidden="true"]{transform:translateX(3px)}
}

/* ---------- 4. Motion: lighter, faster scroll reveal ---------- */
/* Was 700ms with 22–28px travel on every block. Now short, crisp, ease-out. */
.reveal-on-scroll{
  transform:translateY(10px);
  transition:opacity var(--dur-reveal) var(--ease-out),transform var(--dur-reveal) var(--ease-out);
  transition-delay:var(--reveal-delay,0ms);
}
.section-heading.reveal-on-scroll,.vm-heading.reveal-on-scroll{transform:translateY(8px)}
.vm-card.reveal-on-scroll{transform:translateY(12px)}
.reveal-on-scroll.is-visible,
.section-heading.reveal-on-scroll.is-visible,
.vm-heading.reveal-on-scroll.is-visible,
.vm-card.reveal-on-scroll.is-visible{transform:none}
/* Hero image settle: subtler, uses the house curve */
.page-hero:before{animation-duration:.9s;animation-timing-function:var(--ease-out)}

/* ---------- 5. Header ---------- */
.site-header{transition:box-shadow var(--dur-hover) var(--ease-out),background-color var(--dur-hover) ease}
.site-header.scrolled{box-shadow:0 1px 0 rgba(18,20,23,.06),0 8px 24px -12px rgba(18,20,23,.18)}

/* ---------- 6. Floating "Enquire now" on phones ---------- */
/* Smaller and tucked in so it no longer covers hero content/buttons */
@media(max-width:560px){
  .floating-enquiry{bottom:max(14px,env(safe-area-inset-bottom));right:12px}
  .floating-enquiry a{padding:10px 14px;font-size:13px;box-shadow:0 10px 22px -10px rgba(26,27,30,.55)}
  .site-footer{padding-bottom:72px}
}

/* ---------- 7. Spec tables readable on phones (no hidden sideways scroll) ---------- */
@media(max-width:640px){
  .table-wrap{overflow:visible}
  .spec-table{min-width:0;font-size:14px}
  .spec-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .spec-table,.spec-table tbody,.spec-table tr,.spec-table td{display:block;width:100%}
  .spec-table tr{padding:12px 16px;border-bottom:1px solid var(--line)}
  .spec-table tr:last-child{border-bottom:0}
  .spec-table td{padding:0;border:0}
  .spec-table td:first-child{width:auto;font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:3px}
  .spec-table td:last-child{color:var(--navy);font-weight:500}
}

/* ---------- 8. Images: no layout shift, pleasant loading ---------- */
img{height:auto}
.image-frame,.photo-grid figure,.card img{background:var(--limestone,#EFECE6)}

/* ---------- 9. Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion:reduce){
  .reveal-on-scroll{transform:none!important}
  .btn:active,.nav-cta:active{transform:none}
}

/* Comparison tables (3+ columns): show which column each stacked value belongs to */
@media(max-width:640px){
  .spec-table.has-labels td[data-label]{display:grid;grid-template-columns:minmax(0,9.5em) 1fr;gap:10px;padding:3px 0}
  .spec-table.has-labels td[data-label]::before{content:attr(data-label);font-size:12px;color:var(--muted);font-weight:500}
  .spec-table.has-labels td:nth-child(2){color:var(--navy);font-weight:600}
  .spec-table.has-labels td:last-child{font-weight:400;color:var(--ink)}
  .hero-label{letter-spacing:.1em;font-size:12px}
}

/* ---------- 10. Product closing panel: technical note + sibling links ----------
   One composed sample-board panel instead of two floating boxes. */
.section:not(.section-muted) + .product-notes{padding-top:0}
.product-notes{padding-bottom:0}
body .pn-panel{
  display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);
  background:var(--sb-panel,#fff);border:1px solid var(--sb-line,#CFCDC6);
  border-radius:var(--sb-r,3px);box-shadow:var(--sb-shadow);overflow:hidden}
body .pn-panel.pn-single{grid-template-columns:1fr}
.pn-note,.pn-related{padding:36px 40px}
.pn-note{background:var(--sb-ground,#ECECE9) var(--sb-grain)}
.pn-related{border-left:1px solid var(--sb-line-soft,#E2E1DC)}
.pn-single .pn-related{border-left:0}
body .pn-title{font-size:19px;line-height:1.25;font-weight:800;letter-spacing:-.012em;color:var(--sb-char,#1A1B1E);margin:0 0 14px}
body .pn-note p{font-size:16px;line-height:1.65;color:var(--sb-muted,#5B5A56);margin:0;max-width:60ch}

.pn-links{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}
.pn-links li{border-top:1px solid var(--sb-line-soft,#E2E1DC)}
body .pn-links a,body .pn-all{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:13px 0;min-height:48px;text-decoration:none!important;
  font-size:15.5px;font-weight:600;line-height:1.35;color:var(--sb-ink,#25272B)!important;
  transition:color var(--dur-hover,200ms) ease}
.pn-links a svg,.pn-all svg{flex:none;width:17px;height:17px;color:var(--sb-red,#C81E2B);
  transition:transform var(--dur-hover,200ms) var(--ease-out)}
body .pn-all{margin-top:6px;border-top:1px solid var(--sb-line,#CFCDC6);color:var(--sb-red,#C81E2B)!important;font-weight:700;justify-content:flex-start}
@media (hover:hover) and (pointer:fine){
  body .pn-links a:hover{color:var(--sb-red,#C81E2B)!important}
  .pn-links a:hover svg,.pn-all:hover svg{transform:translateX(3px)}
  body .pn-all:hover{color:var(--sb-red-ink,#A3141F)!important}
}
.pn-links a:active svg,.pn-all:active svg{transform:translateX(5px)}

@media(min-width:1200px){.pn-single .pn-links{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:901px){.pn-single .pn-links:has(> li:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Featured cross-link: the panel's printed spec label (charcoal foot strip) */
body .pn-feature{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:24px 40px;
  padding:24px 40px;background:var(--sb-char,#1A1B1E);text-decoration:none!important;color:#fff!important;
  transition:background-color var(--dur-hover,200ms) ease}
.pn-feature-copy{display:grid;gap:4px;max-width:72ch}
.pn-feature-copy strong{font-size:17px;font-weight:800;letter-spacing:-.01em;color:#fff}
.pn-feature-copy span{font-size:15px;line-height:1.55;color:rgba(255,255,255,.74)}
.pn-feature-cta{flex:none;display:inline-flex;align-items:center;gap:10px;font-weight:700;font-size:15px;color:#F0545E}
.pn-feature-cta svg{width:17px;height:17px;transition:transform var(--dur-hover,200ms) var(--ease-out)}
@media (hover:hover) and (pointer:fine){
  body .pn-feature:hover{background:var(--sb-steel,#26282C)}
  .pn-feature:hover .pn-feature-cta svg{transform:translateX(3px)}
}

@media(max-width:900px){
  body .pn-panel{grid-template-columns:1fr}
  .pn-related{border-left:0;border-top:1px solid var(--sb-line-soft,#E2E1DC)}
  .pn-single .pn-related{border-top:0}
  .pn-single .pn-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  body .pn-feature{flex-direction:column;align-items:flex-start}
}
@media(max-width:560px){

  .pn-note,.pn-related{padding:26px 20px}
  .pn-links,.pn-single .pn-links{grid-template-columns:1fr}
  body .pn-feature{padding:22px 20px}
}
@media (prefers-reduced-motion:reduce){
  .pn-links a svg,.pn-all svg,.pn-feature-cta svg{transition:none;transform:none!important}
}

/* ---------- 11. Legal & disclosure text ---------- */
body .pn-disclaimer{margin:14px 2px 0;font-size:13px;line-height:1.55;color:var(--sb-muted,#5B5A56);max-width:90ch}
body .legal-note{margin:28px auto 0;max-width:72ch;text-align:center;font-size:13px;line-height:1.55;color:var(--sb-muted,#5B5A56)}
body .form-privacy{margin:16px 0 0;font-size:13px;line-height:1.55;color:var(--sb-muted,#5B5A56)}
.footer-legal{display:inline-flex;flex-wrap:wrap;align-items:center;gap:10px}
.footer-legal a{color:inherit;text-decoration:underline;text-underline-offset:.22em;text-decoration-color:rgba(255,255,255,.4)}
.footer-legal a:hover{text-decoration-color:currentColor}
body .legal-doc{max-width:72ch;margin-inline:auto}
body .legal-doc h2{font-size:22px;line-height:1.3;margin:40px 0 10px;letter-spacing:-.015em}
body .legal-doc p{font-size:17px;line-height:1.7;margin:0 0 14px}
body .legal-updated{font-size:14px!important;color:var(--sb-muted,#5B5A56);margin-bottom:24px!important}
