/* ============================================================
   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: 26px 16px 18px;
}
.brand-band img { height: 78px; width: auto; display: inline-block; }
.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); }
.no-results { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------------- 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); }

/* ---------------- 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; }
}
