/* ============================================================
   RPSales inc — site styling. Dark theme + light toggle.
   Colors live in the :root variables below. Change them to
   re-skin the whole site.
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg:        #0e1626;
  --bg-2:      #131d30;
  --surface:   #1a2438;
  --nav-bg:    #0a0f1a;
  --nav-text:  #e8edf5;
  --text:      #e8edf5;
  --muted:     #9aa7bd;
  --brand:     #3b82f6;
  --brand-2:   #2563eb;
  --brand-soft:#5b8def;
  --border:    #283449;
  --card-shadow: 0 10px 30px rgba(0,0,0,.35);
  --hero-overlay: linear-gradient(rgba(17,34,68,.72), rgba(8,16,34,.88));
}

[data-theme="light"] {
  --bg:        #f4f7fc;
  --bg-2:      #ffffff;
  --surface:   #ffffff;
  --nav-bg:    #0a0f1a;
  --nav-text:  #e8edf5;
  --text:      #16202e;
  --muted:     #5a6678;
  --brand:     #2563eb;
  --brand-2:   #1e40af;
  --brand-soft:#2563eb;
  --border:    #e3e8f0;
  --card-shadow: 0 8px 24px rgba(20,40,80,.08);
  --hero-overlay: linear-gradient(rgba(30,58,120,.66), rgba(20,40,90,.82));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .25s ease, color .25s ease;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }
a { color: var(--brand-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; }
section { padding: 70px 0; }

/* ---------------- Header (logo band + nav) ---------------- */
.brand-band {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #1e40af 100%);
  text-align: center;
  padding: 22px 16px;
}
.brand-band img { height: 86px; width: auto; display: inline-block; vertical-align: middle; }
.brand-band .brand-text { color:#fff; font-weight:800; font-size:1.9rem; letter-spacing:.5px; }

.nav {
  background: var(--nav-bg);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner { display: flex; align-items: center; justify-content: center; gap: 8px; height: 60px; flex-wrap: wrap; position: relative; }
.nav a {
  color: var(--nav-text); font-weight: 600; font-size: .98rem;
  padding: 8px 18px; border-radius: 8px; text-decoration: none; opacity: .85;
}
.nav a:hover { opacity: 1; text-decoration: none; background: rgba(255,255,255,.06); }
.nav a.active { opacity: 1; color: #fff; box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }
.theme-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.08); color: var(--nav-text);
  border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: rgba(255,255,255,.18); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block; padding: 14px 34px; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; cursor: pointer; border: none;
  background: var(--brand-2); color: #fff; transition: transform .06s ease, background .15s ease;
}
.btn:hover { background: var(--brand); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 16px 44px; font-size: 1.1rem; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: 460px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--hero-overlay), url('images/hero.svg');
  background-size: cover; background-position: center;
  color: #fff; padding: 80px 20px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; margin-bottom: 18px; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.hero p { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 680px; margin: 0 auto 30px; opacity: .96; }

/* ---------------- Section headings ---------------- */
.section-title { text-align: center; font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--brand-soft); font-weight: 800; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 42px; }

/* ---------------- Feature cards (Why Choose) ---------------- */
.features { background: var(--bg-2); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 30px 24px; text-align: center; box-shadow: var(--card-shadow);
  transition: transform .15s ease;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-card .icon {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand) , var(--brand-2)); color: #fff;
}
.feature-card .icon svg { width: 28px; height: 28px; }
.feature-card h3 { color: var(--brand-soft); font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .96rem; }

/* ---------------- Page header (inner pages) ---------------- */
.page-head { background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 46px 0; text-align: center; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--brand-soft); }
.narrow { max-width: 760px; }
.lead { font-size: 1.1rem; color: var(--muted); }
.prose { font-size: 1.05rem; }
.prose p { margin-bottom: 1rem; }

/* ---------------- Products grid ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; box-shadow: var(--card-shadow); transition: transform .15s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); }
.product-card .img-wrap { aspect-ratio: 4/3; background: var(--bg-2); overflow: hidden; }
.product-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .info { padding: 16px; text-align: center; }
.product-card .info h3 { font-size: 1.08rem; color: var(--text); }
.product-card { text-decoration: none; color: inherit; }
.product-card:hover { text-decoration: none; }
.no-results { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------------- Product detail page ---------------- */
.back-link { display: inline-block; margin: 6px 0 24px; color: var(--brand-soft); font-weight: 600; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.detail-img { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--card-shadow); }
.detail-img img { width: 100%; display: block; }
.detail-info h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--text); margin-bottom: 16px; }
.detail-desc { font-size: 1.08rem; color: var(--muted); line-height: 1.7; }
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; gap: 22px; } }

/* ---------------- Contact ---------------- */
.contact-list { list-style: none; margin-top: 18px; display: grid; gap: 14px; }
.contact-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; font-size: 1.05rem;
}
.contact-list strong { display: inline-block; min-width: 100px; color: var(--brand-soft); }

/* ---------------- Fun Corner ---------------- */
.fun-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.fun-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; box-shadow: var(--card-shadow); }
.fun-card h3 { color: var(--brand-soft); margin-bottom: 10px; }
.fun-card p { color: var(--muted); }
.fun-card .joke-img { width: 100%; border-radius: 10px; margin-bottom: 12px; display: block; }
.fun-card .joke-img:last-child { margin-bottom: 0; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--nav-bg); color: #aab4c5; text-align: center; padding: 30px 0; border-top: 1px solid rgba(255,255,255,.06); }
.site-footer a { color: #fff; }

/* ---------------- Responsive ---------------- */
@media (max-width: 620px) {
  .nav-inner { gap: 2px; }
  .nav a { padding: 8px 11px; font-size: .9rem; }
  .theme-toggle { position: static; transform: none; margin-left: 4px; width: 36px; height: 36px; }
  section { padding: 48px 0; }
  .brand-band img { height: 60px; }
}

/* ============================================================
   WOW FACTOR — scroll-in animations, hero bubbles, hover polish
   ============================================================ */

/* ----- Scroll-in reveal ----- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ----- Floating bubbles in the hero ----- */
.hero { overflow: hidden; }
.hero .container { position: relative; z-index: 2; }
.bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bubbles span {
  position: absolute; bottom: -80px; display: block; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.18);
  animation: bubble-rise linear infinite;
}
@keyframes bubble-rise {
  0%   { transform: translateY(0) scale(.7);  opacity: 0; }
  12%  { opacity: .7; }
  85%  { opacity: .5; }
  100% { transform: translateY(-620px) scale(1.15); opacity: 0; }
}
.bubbles span:nth-child(1){ left: 6%;  width: 28px; height: 28px; animation-duration: 9s;  animation-delay: 0s;   }
.bubbles span:nth-child(2){ left: 18%; width: 16px; height: 16px; animation-duration: 7s;  animation-delay: 1.5s; }
.bubbles span:nth-child(3){ left: 30%; width: 40px; height: 40px; animation-duration: 12s; animation-delay: .6s;  }
.bubbles span:nth-child(4){ left: 44%; width: 14px; height: 14px; animation-duration: 6.5s;animation-delay: 2.2s; }
.bubbles span:nth-child(5){ left: 57%; width: 32px; height: 32px; animation-duration: 10s; animation-delay: .3s;  }
.bubbles span:nth-child(6){ left: 70%; width: 20px; height: 20px; animation-duration: 8s;  animation-delay: 1.1s; }
.bubbles span:nth-child(7){ left: 82%; width: 44px; height: 44px; animation-duration: 13s; animation-delay: 1.8s; }
.bubbles span:nth-child(8){ left: 92%; width: 18px; height: 18px; animation-duration: 7.5s;animation-delay: .9s;  }
@media (prefers-reduced-motion: reduce) { .bubbles { display: none; } }

/* ----- Snazzier buttons (shine + lift) ----- */
.btn { position: relative; overflow: hidden; transition: transform .12s ease, background .15s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37,99,235,.45); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn:hover::after { left: 140%; }

/* ----- Snazzier product cards (glow + image zoom) ----- */
.product-card { transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease; }
.product-card .img-wrap img { transition: transform .4s ease; }
.product-card:hover { transform: translateY(-7px); border-color: var(--brand); box-shadow: 0 16px 40px rgba(59,130,246,.28); }
.product-card:hover .img-wrap img { transform: scale(1.08); }

/* ----- Snazzier feature & fun cards ----- */
.feature-card { transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease; }
.feature-card:hover { transform: translateY(-7px); border-color: var(--brand); box-shadow: 0 16px 40px rgba(59,130,246,.25); }
.feature-card:hover .icon { transform: scale(1.1) rotate(-4deg); }
.feature-card .icon { transition: transform .25s ease; }
.fun-card { transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease; }
.fun-card:hover { transform: translateY(-6px); border-color: var(--brand); box-shadow: 0 16px 40px rgba(59,130,246,.22); }
.fun-card .joke-img { transition: transform .4s ease; }
.fun-card:hover .joke-img { transform: scale(1.03); }
