/* =========================================================
  R&Q Hardware (One-Page) - Custom CSS
  Brand palette based on logo (blue + orange)
========================================================= */

:root{
  /* Brand (from logo) */
  --rq-primary: #2123E8;     /* Electric Blue */
  --rq-primary-2: #230FB9;   /* Deep Royal Blue */
  --rq-accent: #E68C19;      /* Construction Orange */
  --rq-blue-light: #86ACE9;

  /* Neutrals */
  --rq-dark: #111111;
  --rq-text: #0f172a;
  --rq-muted: #64748b;
  --rq-border: rgba(17, 17, 17, 0.12);
  --rq-shadow: 0 10px 30px rgba(2, 6, 23, 0.14);
  --rq-radius: 18px;

  --rq-soft: #f7f8ff; /* subtle blue-tint background */
}

html { scroll-behavior: smooth; }

body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans";
  color: var(--rq-text);
  background: #ffffff;
  line-height: 1.6;
}

/* Accessible focus */
:focus-visible{
  outline: 3px solid rgba(33, 35, 232, 0.5);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Topbar */
.topbar{
  background: #0b1220;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}
.topbar a{ color: rgba(255, 255, 255, 0.92); text-decoration: none; }
.topbar a:hover{ color: #fff; text-decoration: underline; }

/* Navbar */
.navbar{
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.08);
}
.brand-logo{
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.brand-text{
  letter-spacing: -0.01em;
}
.navbar .nav-link{
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
}
.navbar .nav-link:hover,
.navbar .nav-link.active{
  color: var(--rq-primary);
}

/* Sections */
.section-pad{ padding: 72px 0; }
.section-title{ font-weight: 900; letter-spacing: -0.02em; }
.section-subtitle{ color: rgba(15, 23, 42, 0.7); }

.bg-soft{ background: var(--rq-soft); }

/* Hero */
.hero{
  background:
    radial-gradient(900px 500px at 15% 20%, rgba(33, 35, 232, 0.15), transparent 60%),
    radial-gradient(800px 450px at 85% 25%, rgba(230, 140, 25, 0.14), transparent 55%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

/* Pills */
.pill{
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.10);
  background: #fff;
  font-weight: 700;
  font-size: .92rem;
}

/* Badge */
.rq-badge{
  background: rgba(33, 35, 232, 0.10);
  color: var(--rq-primary-2);
  border: 1px solid rgba(33, 35, 232, 0.22);
  font-weight: 800;
}

/* Cards / Panels */
.rq-card{
  border: 1px solid var(--rq-border);
  border-radius: var(--rq-radius);
  background: #fff;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.rq-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.12);
}

.rq-panel{
  border: 1px solid rgba(33, 35, 232, 0.16);
  border-radius: var(--rq-radius);
  background: linear-gradient(180deg, #ffffff, rgba(134, 172, 233, 0.18));
  box-shadow: var(--rq-shadow);
}

/* Icons */
.rq-icon{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(33, 35, 232, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.rq-icon-accent{
  background: rgba(230, 140, 25, 0.16);
}

/* Category tiles */
.category-tile{
  border: 1px solid rgba(33, 35, 232, 0.12);
  border-radius: var(--rq-radius);
  padding: 18px;
  background: #fff;
  height: 100%;
  transition: transform .18s ease, border-color .18s ease;
}
.category-tile:hover{
  transform: translateY(-3px);
  border-color: rgba(33, 35, 232, 0.35);
}
.category-tile h3{ font-size: 1.05rem; margin: 0; font-weight: 900; }
.category-tile p{ margin: 8px 0 0; color: rgba(15, 23, 42, 0.68); font-size: .95rem; }

/* Buttons */
.btn-rq{
  background: var(--rq-primary);
  border-color: var(--rq-primary);
  color: #fff;
  font-weight: 800;
}
.btn-rq:hover{
  background: var(--rq-primary-2);
  border-color: var(--rq-primary-2);
  color: #fff;
}
.btn-rq-outline{
  border: 2px solid rgba(33, 35, 232, 0.28);
  color: var(--rq-primary-2);
  font-weight: 800;
  background: transparent;
}
.btn-rq-outline:hover{
  border-color: rgba(230, 140, 25, 0.7);
  color: var(--rq-accent);
}

/* CTA strip */
.cta-strip{
  background: linear-gradient(135deg, var(--rq-primary-2), var(--rq-primary));
  color: #fff;
  border-radius: var(--rq-radius);
  box-shadow: var(--rq-shadow);
}
.cta-strip a{ color: #fff; font-weight: 900; text-decoration: underline; }

/* Footer */
.footer{
  background: #0b1220;
  color: rgba(255, 255, 255, 0.92);
}
.footer a{ color: rgba(255, 255, 255, 0.92); text-decoration: none; }
.footer a:hover{ color: #fff; text-decoration: underline; }
.footer-logo{ width: 34px; height: 34px; object-fit: contain; }
.footer small{ color: rgba(255, 255, 255, 0.72); }

/* Back to top */
#backToTop{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: none;
  background: var(--rq-accent);
  color: #111;
  font-weight: 900;
  box-shadow: var(--rq-shadow);
  display: none;
  z-index: 999;
}
#backToTop:hover{ filter: brightness(0.95); }

.rounded-rq{ border-radius: var(--rq-radius); }

/* Preloader */
#preloader{
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: grid;
  place-items: center;
  z-index: 2000;
}
.preloader-inner{
  width: min(340px, 88vw);
  text-align: center;
}
.preloader-logo{
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.preloader-bar{
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.preloader-bar > span{
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rq-primary), var(--rq-accent));
  animation: rqLoad 1.1s infinite ease-in-out;
}
@keyframes rqLoad{
  0% { transform: translateX(-20%); }
  50% { transform: translateX(140%); }
  100% { transform: translateX(-20%); }
}

/* Reveal on scroll */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Required label */
.required::after{ content:" *"; color: #dc2626; font-weight: 900; }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce){
  html { scroll-behavior: auto; }
  .rq-card, .category-tile, .reveal { transition: none !important; }
  .preloader-bar > span{ animation: none !important; width: 70%; }
}


/* Iframe reset */
.ratio iframe{ border: 0; width: 100%; height: 100%; }

/* Address card layout (Contact) */
.address-head .btn{ white-space: nowrap; }
.address-map{ border: 1px solid rgba(17,17,17,0.10); }


/* Live Catalogue embed sizing
   The embedded POS site is scroll-heavy; on mobile we give it more height. */
.catalogue-embed{
  border-radius: var(--rq-radius);
  border: 1px solid rgba(17,17,17,0.10);
  height: 70vh;           /* mobile-friendly */
  min-height: 520px;      /* ensures usable view on small phones */
  max-height: 900px;
}
@media (min-width: 992px){
  .catalogue-embed{
    height: 620px;        /* desktop/tablet */
    min-height: 620px;
    max-height: none;
  }
}
.catalogue-embed iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
