/* Stamps Steel — shared upgrade styles (forms, sticky, lightbox, estimator) */
/* FORMSPREE: set endpoint in js/quote-form.js */

.stamps-quote {
  --sq-copper: #c97b3a;
  --sq-copper-dark: #b87333;
  --sq-steel: #0f172a;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
}
@media (min-width: 640px) {
  .stamps-quote { padding: 2rem 2.25rem; }
}
.stamps-quote .sq-steps {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.stamps-quote .sq-step-dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 0.25s;
}
.stamps-quote .sq-step-dot.is-done,
.stamps-quote .sq-step-dot.is-active { background: var(--sq-copper); }
.stamps-quote .sq-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}
.stamps-quote .sq-step-label strong { color: var(--sq-steel); }
.stamps-quote .sq-panel { display: none; }
.stamps-quote .sq-panel.is-active { display: block; animation: sq-fade 0.28s ease; }
@keyframes sq-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.stamps-quote label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #0f172a;
}
.stamps-quote .req { color: var(--sq-copper); }
.stamps-quote input,
.stamps-quote select,
.stamps-quote textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #0f172a;
}
.stamps-quote input:focus,
.stamps-quote select:focus,
.stamps-quote textarea:focus {
  border-color: var(--sq-copper);
  box-shadow: 0 0 0 3px rgba(201, 123, 58, 0.2);
}
.stamps-quote input.is-invalid,
.stamps-quote select.is-invalid,
.stamps-quote textarea.is-invalid {
  border-color: #dc2626;
}
.stamps-quote .sq-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
}
.stamps-quote .sq-error {
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 0.35rem;
  display: none;
}
.stamps-quote .sq-error.is-visible { display: block; }
.stamps-quote .sq-grid-2 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .stamps-quote .sq-grid-2 { grid-template-columns: 1fr 1fr; }
}
.stamps-quote .sq-field { margin-bottom: 1rem; }
.stamps-quote .sq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.stamps-quote .sq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.stamps-quote .sq-btn:disabled { opacity: 0.65; cursor: wait; }
.stamps-quote .sq-btn-primary {
  background: var(--sq-copper);
  color: #fff;
  flex: 1;
  min-width: 8rem;
}
.stamps-quote .sq-btn-primary:hover { background: var(--sq-copper-dark); }
.stamps-quote .sq-btn-secondary {
  background: #f1f5f9;
  color: var(--sq-steel);
}
.stamps-quote .sq-btn-secondary:hover { background: #e2e8f0; }
.stamps-quote .sq-success {
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.stamps-quote .sq-success h3 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--sq-steel);
  margin: 0.75rem 0 0.5rem;
}
.stamps-quote .sq-success p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}
.stamps-quote .sq-check {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
}
.stamps-quote .sq-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}
.stamps-quote .sq-alert.is-visible { display: block; }
.stamps-quote .sq-footer-links {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 1.25rem;
}
.stamps-quote .sq-footer-links a { color: var(--sq-copper); font-weight: 600; }

/* ========== Sticky mobile bottom CTA ========== */
.stamps-sticky-cta {
  display: none; /* desktop: never */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70; /* below nothing critical; above content, below lightbox (100) */
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.97);
  border-top: 1px solid rgba(201, 123, 58, 0.45);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.stamps-sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.stamps-sticky-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 40rem;
  margin: 0 auto;
  position: relative;
}
.stamps-sticky-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 0.65rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.15;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.stamps-sticky-btn:active { transform: scale(0.98); }
.stamps-sticky-btn:focus-visible {
  outline: 2px solid #e0a05a;
  outline-offset: 2px;
}
.stamps-sticky-icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.95;
}
.stamps-sticky-call {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.stamps-sticky-call:hover {
  background: #334155;
  border-color: rgba(224, 160, 90, 0.45);
  color: #fff;
}
.stamps-sticky-quote {
  background: #c97b3a;
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(201, 123, 58, 0.35);
}
.stamps-sticky-quote:hover {
  background: #b87333;
  color: #fff;
}
.stamps-sticky-label-short { display: none; }
.stamps-sticky-dismiss {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.stamps-sticky-dismiss:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.stamps-sticky-dismiss:focus-visible {
  outline: 2px solid #e0a05a;
  outline-offset: 2px;
}

/* Mobile only (< md / 768px) */
@media (max-width: 767.98px) {
  .stamps-sticky-cta { display: block; }
  body.has-sticky-cta {
    padding-bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
  }
}
/* Very narrow phones: shorter call label */
@media (max-width: 380px) {
  .stamps-sticky-label-full { display: none; }
  .stamps-sticky-label-short { display: inline; }
  .stamps-sticky-btn { font-size: 0.8rem; gap: 0.3rem; padding-left: 0.45rem; padding-right: 0.45rem; }
}
/* Landscape phones: slightly tighter bar */
@media (orientation: landscape) and (max-height: 500px) {
  .stamps-sticky-cta {
    padding-top: 0.45rem;
    padding-bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
  }
  .stamps-sticky-btn { min-height: 44px; padding-top: 0.5rem; padding-bottom: 0.5rem; }
  body.has-sticky-cta {
    padding-bottom: calc(3.9rem + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .stamps-sticky-cta { transition: none; }
}
/* Soften sticky while mobile nav is expanded so menu stays primary focus */
body:has(#mobile-menu.open) .stamps-sticky-cta.is-visible {
  opacity: 0.35;
  pointer-events: none;
}

/* Estimator */
.stamps-estimator {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}
.stamps-estimator h3 {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.35rem;
}
.stamps-estimator .se-sub {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}
.stamps-estimator label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}
.stamps-estimator input,
.stamps-estimator select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  font-size: 1rem;
  margin-bottom: 0.85rem;
  background: #fff;
}
.stamps-estimator input:focus,
.stamps-estimator select:focus {
  outline: none;
  border-color: #c97b3a;
  box-shadow: 0 0 0 3px rgba(201, 123, 58, 0.15);
}
.stamps-estimator .se-grid {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .stamps-estimator .se-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.stamps-estimator .se-result {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 0.9rem;
  padding: 1.15rem 1.25rem;
  margin-top: 0.5rem;
}
.stamps-estimator .se-result .se-sqft {
  font-size: 1.75rem;
  font-weight: 900;
  color: #e0a05a;
  letter-spacing: -0.02em;
}
.stamps-estimator .se-result p {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0.4rem 0 0;
  line-height: 1.45;
}
.stamps-estimator .se-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.stamps-estimator .se-actions a {
  flex: 1;
  min-width: 8rem;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.stamps-estimator .se-cta-primary {
  background: #c97b3a;
  color: #fff;
}
.stamps-estimator .se-cta-secondary {
  background: #f1f5f9;
  color: #0f172a;
}

/* Lightbox */
.stamps-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.stamps-lightbox.is-open { display: flex; }
.stamps-lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.stamps-lightbox .slb-close,
.stamps-lightbox .slb-prev,
.stamps-lightbox .slb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 999px;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stamps-lightbox .slb-close { top: 1rem; right: 1rem; }
.stamps-lightbox .slb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.stamps-lightbox .slb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.stamps-lightbox .slb-cap {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: #cbd5e1;
  font-size: 0.85rem;
  max-width: 90vw;
  text-align: center;
}
img[data-lightbox] { cursor: zoom-in; }

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #c97b3a;
  outline-offset: 2px;
}

/* Testimonial cards */
.stamps-testimonial {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.35rem 1.4rem;
  height: 100%;
}
.stamps-testimonial .st-stars { color: #c97b3a; letter-spacing: 0.1em; font-size: 0.85rem; margin-bottom: 0.65rem; }
.stamps-testimonial blockquote {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.55;
  margin: 0 0 1rem;
  font-weight: 500;
}
.stamps-testimonial .st-by {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}
.stamps-testimonial .st-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.15rem;
}
.stamps-placeholder-note {
  font-size: 0.7rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Case study chips */
.case-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b87333;
  background: #fdf6ee;
  border: 1px solid #f0d4b0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* Building types list — mobile-first solutions */
.bt-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bt-list li {
  position: relative;
  padding-left: 1rem;
  line-height: 1.4;
}
.bt-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #c97b3a;
}
.bt-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bt-card:hover {
  border-color: #e0a05a;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.scrollbar-none {
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Desktop header dropdown */
.nav-desktop {
  gap: 0.15rem;
}
.nav-drop {
  position: relative;
}
.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0.5rem;
}
.nav-drop-btn:hover,
.nav-drop:hover .nav-drop-btn,
.nav-drop:focus-within .nav-drop-btn,
.nav-drop.is-open .nav-drop-btn,
.nav-drop-btn.is-current {
  color: #e0a05a;
}
.nav-drop-chevron {
  width: 0.7rem;
  height: 0.7rem;
  transition: transform 0.15s ease;
}
.nav-drop:hover .nav-drop-chevron,
.nav-drop:focus-within .nav-drop-chevron,
.nav-drop.is-open .nav-drop-chevron {
  transform: rotate(180deg);
}
.nav-drop-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 13.75rem;
  padding: 0.45rem;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  z-index: 80;
  display: none;
}
.nav-drop-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.75rem;
  height: 0.75rem;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu,
.nav-drop.is-open .nav-drop-menu {
  display: block;
}
.nav-drop-link {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.25;
}
.nav-drop-link:hover,
.nav-drop-link:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #e0a05a;
  outline: none;
}
.nav-drop-link.is-current {
  color: #e0a05a;
  font-weight: 600;
  background: rgba(201, 123, 58, 0.12);
}

/* ONE fixed building-type photo popover */
.bldg-pop {
  position: fixed;
  z-index: 80;
  width: min(300px, calc(100vw - 1.5rem));
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.85rem;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.bldg-pop.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.bldg-pop img {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
  background: #1e293b;
}
.bldg-pop .bldg-pop-body { padding: 0.75rem 0.9rem 0.95rem; }
.bldg-pop .bldg-pop-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e0a05a;
  margin: 0 0 0.25rem;
}
.bldg-pop .bldg-pop-hook {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #cbd5e1;
  margin: 0 0 0.65rem;
}
.bldg-pop .bldg-pop-cta {
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: #b87333;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  text-decoration: none;
}
.bldg-pop .bldg-pop-cta:hover { background: #c97b3a; }
@media (max-width: 1023px) {
  .bldg-pop { display: none !important; }
}
