/* ==========================================================================
   UPVCLeads.com — Enhancements
   Round 29 — gradients, subtle animation, hero + form polish.
   Loaded AFTER page.css, so same-specificity rules here correctly win
   by cascade order — base.css, components.css, and page.css are all
   completely untouched by this file. Every rule below overrides one
   specific, confirmed-real selector, not a guess.
   ========================================================================== */

/* ---- Gradients on the primary action — subtle, not loud ---- */
.btn--primary {
  background: linear-gradient(135deg, var(--c-glass) 0%, var(--c-glass-deep) 100%);
  border-color: var(--c-glass);
  transition: background var(--d-base) var(--e-out), transform var(--d-fast) var(--e-out),
              box-shadow var(--d-fast) var(--e-out);
}
.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--c-glass-deep) 0%, #1730A0 100%);
  transform: translateY(-1px);
  box-shadow: var(--sh-2);
}
.btn--primary:active:not(:disabled) {
  transform: translateY(0);
}

/* ---- Hero: gradient wash background, gradient emphasis text,
   gentle entrance animation on load ---- */
.hero {
  background: linear-gradient(180deg, var(--c-glass-tint) 0%, var(--c-surface) 65%);
}
.hero__h em {
  background: linear-gradient(135deg, var(--c-glass) 0%, var(--c-glass-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__in > div:first-child {
  animation: heroFadeUp 0.6s var(--e-out) both;
}
.hero__dwg {
  animation: heroFadeUp 0.6s var(--e-out) 0.15s both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__in > div:first-child, .hero__dwg { animation: none; }
}

/* Give the hero diagram's chamber lines a subtle gradient stroke
   feel via a soft drop shadow, without touching the inline SVG
   markup itself. */
.hero__dwg svg {
  filter: drop-shadow(0 8px 24px rgba(37, 99, 235, 0.12));
  transition: transform var(--d-slow) var(--e-out);
}
.hero__dwg svg:hover {
  transform: scale(1.015);
}

/* ---- Type cards (windows/doors listing): gentle lift on hover
   instead of just a flat background tint ---- */
.types .type {
  transition: background var(--d-fast) var(--e-out), transform var(--d-fast) var(--e-out);
}
.types .type:hover {
  transform: translateX(2px);
}

/* ---- Cards generally: soft shadow instead of flat border-only,
   subtle lift on hover where a card is also a link/interactive ---- */
.card {
  box-shadow: var(--sh-1);
}

/* ---- Fabricator registration form: visually grouped sections
   with a small gradient accent bar, replacing the plain 2-column
   grid with no visual grouping. Applies via existing structure —
   for-fabricators/index.php already wraps each field pair in a
   .mullions.mullions--2 block; this styles that pattern specifically
   within the registration form context. ---- */
#firm-form .mullions--2,
#firm-form > .field {
  position: relative;
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-4);
  border-left: 3px solid var(--c-glass-edge);
}
#firm-form .mullions--2 > div {
  border: 0;
  padding: 0;
}
#firm-form .mullions--2 > div:first-child {
  padding-right: var(--s-5);
}

#firm-form .btn--primary.btn--block {
  margin-top: var(--s-2);
}

/* Combobox tags: gradient-tinted instead of flat tint, small pop-in */
.combobox__tag {
  background: linear-gradient(135deg, var(--c-glass-tint) 0%, #E4EDFC 100%);
  animation: tagPopIn 0.15s var(--e-out) both;
}
@keyframes tagPopIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* File input for the GST certificate: give it a slightly more
   inviting drop-zone feel without changing its behaviour. */
#f-gst-cert {
  cursor: pointer;
  transition: border-color var(--d-fast) var(--e-out), background var(--d-fast) var(--e-out);
}
#f-gst-cert:hover {
  border-color: var(--c-glass);
  background: var(--c-glass-tint);
}

/* ---- Hero comparison slider: uPVC vs Aluminium ---- */
.compare-slider { margin: 0; }
.compare-slider__frame {
  position: relative;
  aspect-ratio: 400 / 380;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: var(--mullion) solid var(--c-line-strong);
  box-shadow: var(--sh-2);
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
}
.compare-slider__panel {
  position: absolute;
  inset: 0;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  background: var(--c-surface-raised);
}
.compare-slider__panel svg {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: auto;
}
.compare-slider__panel--upvc {
  background: linear-gradient(160deg, var(--c-glass-tint) 0%, var(--c-surface-raised) 60%);
}
.compare-slider__panel--alu {
  background: linear-gradient(160deg, var(--c-steel-tint) 0%, var(--c-surface-raised) 60%);
  clip-path: inset(0 0 0 50%);
}
.compare-slider__points {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  font-size: var(--t-xs);
  color: var(--c-ink-muted);
}
.compare-slider__points li {
  margin-bottom: var(--s-1);
  padding-left: var(--s-4);
  position: relative;
}
.compare-slider__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}
.compare-slider__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 40px;
  margin-left: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}
.compare-slider__handle::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--c-line-strong);
}
.compare-slider__grip {
  position: relative;
  z-index: 1;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-glass) 0%, var(--c-glass-deep) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-sm);
  box-shadow: var(--sh-2);
}
.compare-slider__handle:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--r-pill);
}
.compare-slider__labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s-3);
  font-family: var(--f-mono);
  font-size: var(--t-2xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-ink-muted);
}

/* ---- Inner-page polish ----
   Plain <h1> (product pages, category pages, informational pages)
   was sitting at the same size as the homepage's hero heading —
   fine on the hero where it has a lot of supporting visual weight
   around it, too heavy on a page that's otherwise a simple block of
   text. This only affects a bare h1 tag — .hero__h is a class
   selector with higher specificity than a plain element selector,
   so the actual hero heading is completely unaffected regardless of
   which stylesheet loads last; confirmed directly, not assumed. */
h1 {
  font-size: var(--t-xl);
  position: relative;
  padding-bottom: var(--s-3);
}
h1::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--c-glass) 0%, var(--c-glass-edge) 100%);
}
.hero__h {
  padding-bottom: 0;
}
.hero__h::after {
  content: none;
}

/* Secondary sections on inner pages (the "By location" notes, the
   related-products block) were plain text floating in whitespace —
   give them a light card so the page reads as designed sections,
   not leftover space. */
.section .wrap > p.label + p:not(.lead) {
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-4);
}

/* ---- Type cards: defensive height fix ----
   Something in the base stylesheet chain is giving these a lot more
   vertical space than the content needs — visible as a large gap
   before the divider line on every product-listing row. Rather than
   guess at which rule is responsible without being able to see the
   live CSS in full, this pins the actual height directly, in the
   LAST-loaded stylesheet, which wins regardless of what else is
   setting it. */
.types .type {
  min-height: 0;
  height: auto;
}
.types .type > div {
  padding-block: var(--s-4) !important;
}

/* ---- Context gallery: Homes / Offices / Factories ---- */
.context-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
  margin-top: var(--s-6);
}
@media (max-width: 900px) {
  .context-gallery__grid { grid-template-columns: 1fr; }
}
.context-gallery__card {
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform var(--d-base) var(--e-out), box-shadow var(--d-base) var(--e-out);
}
.context-gallery__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
}
.context-gallery__card svg {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: var(--mullion) solid var(--c-line);
}
.context-gallery__card h3 {
  margin: var(--s-4) var(--s-4) 0;
}
.context-gallery__card p {
  margin: var(--s-2) var(--s-4) var(--s-4);
}

/* ---- Product page redesign: hero grid, icon badge, facts sidebar ---- */
.pp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: var(--s-7);
  align-items: start;
  margin-top: var(--s-4);
}
@media (max-width: 900px) {
  .pp-grid { grid-template-columns: 1fr; }
}
.pp-main { max-width: 64ch; }
.pp-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--c-glass-tint) 0%, #E4EDFC 100%);
  color: var(--c-glass);
  margin-bottom: var(--s-4);
}
.pp-icon svg { width: 28px; height: 28px; }

.pp-facts-card {
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-left: 3px solid var(--c-glass-edge);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-1);
}
.pp-facts {
  margin: var(--s-3) 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-2) var(--s-3);
}
.pp-facts dt {
  font-size: var(--t-xs);
  color: var(--c-ink-muted);
  white-space: nowrap;
}
.pp-facts dd {
  margin: 0;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--c-ink);
  text-align: right;
}

.pp-cta__card {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  background: linear-gradient(135deg, var(--c-glass-tint) 0%, var(--c-surface-raised) 70%);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.pp-cta__card > div:nth-child(2) { flex: 1; }
.pp-cta__icon {
  flex: none;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--c-glass);
  color: #fff;
}
.pp-cta__icon svg { width: 24px; height: 24px; }
@media (max-width: 720px) {
  .pp-cta__card { flex-direction: column; align-items: flex-start; }
}

/* ---- Pillar page product grid: real cards with icons, replacing
   the thin divider-list .types treatment for category pages ---- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* v3: fixed 3-up so 5 cards read 3+2, never an orphan */
  gap: var(--s-5);
  margin-top: var(--s-5);
}
@media (max-width: 860px) { .pillar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pillar-grid { grid-template-columns: 1fr; } }
.pillar-card {
  display: block;
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-1);
  transition: transform var(--d-base) var(--e-out), box-shadow var(--d-base) var(--e-out), border-color var(--d-base) var(--e-out);
}
.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  border-color: var(--c-glass-edge);
  text-decoration: none;
}
.pillar-card .pillar-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: var(--s-3);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--c-glass-tint) 0%, #E4EDFC 100%);
  color: var(--c-glass);
}
.pillar-card .pillar-card__icon svg { width: 22px; height: 22px; }
.pillar-card h3 { font-size: var(--t-md); margin-bottom: var(--s-1); }

/* ---- Numbered step list (replaces plain <ol>1.2.3.) ---- */
.steps-list {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  margin: 0;
}
.steps-list__num {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-glass) 0%, var(--c-glass-deep) 100%);
  color: #fff;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Informational pages (about, contact, privacy, terms,
   how-we-verify): give raw content real visual containment ---- */
.static-content-card {
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  box-shadow: var(--sh-1);
}
@media (max-width: 720px) {
  .static-content-card { padding: var(--s-5); }
}

/* ---- Locations index: icon chips instead of a plain text-link grid ---- */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-6);
}
.loc-chip {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--c-surface-sunk);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-md);
  color: var(--c-ink-body);
  text-decoration: none;
  font-size: var(--t-sm);
  transition: all var(--d-fast) var(--e-out);
}
.loc-chip:hover {
  background: var(--c-glass-tint);
  border-color: var(--c-glass-edge);
  color: var(--c-glass-deep);
  transform: translateX(2px);
  text-decoration: none;
}
.loc-chip svg {
  flex: none;
  width: 18px; height: 18px;
  color: var(--c-glass);
}

/* ---- Geo pages + placeholder: card treatment, applies to
   thousands of state/district pages that previously had no visual
   containment at all — bare text on the page background. ---- */
.geo-card {
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  box-shadow: var(--sh-1);
}
@media (max-width: 720px) {
  .geo-card { padding: var(--s-5); }
}

/* ---- Geo page content: pros/cons, insights, FAQs ---- */
.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  margin-top: var(--s-5);
}
@media (max-width: 720px) {
  .proscons { grid-template-columns: 1fr; }
}
.proscons__col {
  border-radius: var(--r-lg);
  padding: var(--s-5);
  border: var(--mullion) solid var(--c-line);
}
.proscons__col--pro { background: var(--c-glass-tint); border-color: var(--c-glass-edge); }
.proscons__col--con { background: var(--c-surface-sunk); }
.proscons__col h3 { font-size: var(--t-sm); margin-bottom: var(--s-3); }
.proscons__col ul { margin: 0; padding-left: 1.1em; }
.proscons__col li { margin-bottom: var(--s-2); font-size: var(--t-sm); }
.proscons__col li:last-child { margin-bottom: 0; }

.insights-list {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
}
.insights-list li {
  position: relative;
  padding: var(--s-3) 0 var(--s-3) var(--s-6);
  border-bottom: var(--mullion) solid var(--c-line);
  font-size: var(--t-sm);
}
.insights-list li:last-child { border-bottom: 0; }
.insights-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: var(--s-3);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-glass-tint);
  color: var(--c-glass);
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

.faq-list { margin-top: var(--s-5); }
.faq-item {
  border-bottom: var(--mullion) solid var(--c-line);
  padding: var(--s-4) 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--t-sm);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: var(--t-lg);
  color: var(--c-glass);
  flex: none;
  margin-left: var(--s-3);
  transition: transform var(--d-fast) var(--e-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin: var(--s-3) 0 0;
  font-size: var(--t-sm);
  color: var(--c-ink-muted);
}

/* ---- Blog: index, cards, article body ---- */
.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-5);
}
.blog-cats__link {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: var(--mullion) solid var(--c-line);
  font-size: var(--t-sm);
  color: var(--c-ink-body);
  text-decoration: none;
  transition: all var(--d-fast) var(--e-out);
}
.blog-cats__link:hover { background: var(--c-glass-tint); text-decoration: none; }
.blog-cats__link.is-active {
  background: var(--c-glass);
  border-color: var(--c-glass);
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-5);
}
.blog-card {
  display: block;
  background: var(--c-surface-raised);
  border: var(--mullion) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-1);
  transition: transform var(--d-base) var(--e-out), box-shadow var(--d-base) var(--e-out);
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  text-decoration: none;
}
.blog-card__cat {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: var(--t-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  color: var(--c-glass);
  margin-bottom: var(--s-2);
}
.blog-card h3 { font-size: var(--t-md); margin-bottom: var(--s-2); }

.blog-article-body {
  margin-top: var(--s-6);
  max-width: 68ch;
}
.blog-article-body h2 {
  font-size: var(--t-lg);
  margin-top: var(--s-7);
  margin-bottom: var(--s-3);
}
.blog-article-body h3 {
  font-size: var(--t-md);
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
}
.blog-article-body p { margin-bottom: var(--s-4); line-height: 1.7; }
.blog-article-body ul, .blog-article-body ol {
  margin: 0 0 var(--s-4);
  padding-left: 1.3em;
}
.blog-article-body li { margin-bottom: var(--s-2); line-height: 1.7; }
.blog-article-body strong { color: var(--c-ink); }


/* v3.1: equal-height pillar cards — every card fills the tallest in its
   row, so 2-line and 3-line descriptions still bottom-align the boxes.
   Content stays top-aligned (icon → title → text), which reads naturally. */
.pillar-grid { align-items: stretch; }
.pillar-card { display: flex; flex-direction: column; height: 100%; }
