/* ============================================================================
   ROCKBASE EQUIPMENT SOLUTION — STYLES
   ----------------------------------------------------------------------------
   Mobile-first: the site is designed for phones first, then scaled up.
   Sizes use clamp() / minmax() so nothing is ever squeezed or oversized,
   from a 320px phone to a 4K screen.
   ========================================================================== */

/* ---------- Theme tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-card: #ffffff;
  --text: #1a1d23;
  --text-soft: #5b6470;
  --line: #e6e9ee;
  --line-strong: #cfd6e0;

  --brand: #f97316;          /* construction orange (graphics, borders, glows) */
  --brand-dark: #c2410c;     /* darker orange — used for TEXT so it is readable  */
  --brand-soft: #fff3e9;
  --brand-btn: #c2410c;      /* button fill — white text stays readable          */
  --brand-btn-hover: #9a3412;
  --accent: #facc15;         /* safety yellow                                    */
  --wa: #0d8046;             /* WhatsApp green, darkened so white text is readable */
  --wa-hover: #0a6a39;

  --dark: #14171c;
  --dark-soft: #1f242c;
  --success: #15803d;
  --danger: #b91c1c;

  --shadow: 0 6px 24px rgba(20, 23, 28, .08);
  --shadow-lg: 0 14px 40px rgba(20, 23, 28, .14);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1200px;
  --header-h: 68px;
  --gap: clamp(14px, 2.2vw, 24px);
  --pad-x: clamp(16px, 4vw, 24px);
  --sec-y: clamp(44px, 7vw, 68px);
  --tap: 44px;               /* minimum comfortable tap size on phones */
}

[data-theme="dark"] {
  --bg: #0f1216;
  --bg-soft: #161b21;
  --bg-card: #181d24;
  --text: #eef1f5;
  --text-soft: #a4aebc;
  --line: #2a313b;
  --line-strong: #3a4350;
  --brand-soft: #2a1c10;
  --brand-dark: #fb923c;     /* brighter orange reads well on dark backgrounds */
  --brand-btn: #c2410c;
  --brand-btn-hover: #ea580c;
  --success: #4ade80;
  --danger: #fca5a5;
  --shadow: 0 6px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.55);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the safest way to keep things off screen */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;   /* stops phones from inflating text */
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(15px, 1.05vw + 12px, 17px);
  overflow-x: clip;                 /* safety net against sideways scroll */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
img, svg, video { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { line-height: 1.22; margin: 0 0 .4em; overflow-wrap: break-word; }
p { margin: 0 0 1em; overflow-wrap: break-word; }
ul { padding-left: 1.1em; }
button { font-family: inherit; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  width: 100%;
}
section { padding: var(--sec-y) 0; }
.muted { color: var(--text-soft); }
.center { text-align: center; }

.eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  font-size: 11.5px; color: var(--brand-dark); background: var(--brand-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.section-title { font-size: clamp(23px, 3.2vw + 12px, 38px); font-weight: 800; }
.section-sub { color: var(--text-soft); max-width: 640px; margin: 0 auto 30px; }
.section-sub.left { text-align: left; margin-left: 0; }
.lead { font-size: clamp(15px, 1vw + 12.5px, 18px); color: var(--text-soft); max-width: 720px; }

/* visible keyboard focus everywhere (accessibility) */
:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
  border-radius: 6px;
}
::placeholder { color: var(--text-soft); opacity: 1; }

/* nice, slim scrollbars on desktop */
@media (min-width: 901px) {
  * { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; border: none; border-radius: 999px;
  padding: 13px 22px; font-weight: 700; font-size: 15px; line-height: 1.2;
  text-align: center; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  min-height: var(--tap);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand-btn); color: #fff; box-shadow: 0 8px 20px rgba(194,65,12,.28); }
.btn-primary:hover { background: var(--brand-btn-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: var(--wa-hover); color: #fff; }
.btn-sm { padding: 10px 16px; font-size: 13.5px; min-height: 40px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 12px; height: var(--header-h); }

.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800;
  font-size: clamp(15px, 1.6vw, 18px); min-width: 0; flex: 0 1 auto;
}
.brand > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand img {
  height: 40px; width: 40px; border-radius: 10px; object-fit: contain;
  background: #fff; padding: 3px; flex: none; border: 1px solid var(--line);
}
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--text-soft); letter-spacing: .03em; }

/* desktop pill menu — hidden on phones, replaced by the drawer */
.nav-links { display: none; gap: 2px; margin-left: auto; }
.nav-links a {
  padding: 9px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: var(--text-soft); white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--brand-dark); background: var(--brand-soft); }

/* action buttons always sit on the RIGHT */
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.icon-btn {
  width: var(--tap); height: var(--tap); flex: none; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--text); cursor: pointer; display: grid; place-items: center; transition: .2s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.nav-quote { padding: 11px 18px; font-size: 14px; white-space: nowrap; }
.hamburger { display: grid; }

/* ---------- Mobile drawer menu ---------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(10, 13, 17, .55);
  opacity: 0; transition: opacity .25s ease; z-index: 200;
}
.drawer-scrim.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 205;
  width: min(88vw, 360px);
  background: var(--bg-card);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: none;                      /* closed = not on the page at all */
  flex-direction: column;
  overflow: hidden;                   /* the link list scrolls, the buttons stay put */
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer.open {
  display: flex;
  animation: rb-slide-in .28s cubic-bezier(.4, 0, .2, 1);
}
@keyframes rb-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-card); z-index: 2;
}
.drawer-title { font-weight: 800; letter-spacing: .02em; }
.drawer-links { display: flex; flex-direction: column; padding: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.drawer-links a {
  padding: 14px 14px; border-radius: 12px; font-weight: 700; font-size: 16px;
  color: var(--text); display: flex; align-items: center; min-height: var(--tap);
}
.drawer-links a.active { background: var(--brand-soft); color: var(--brand-dark); }
.drawer-links a.sub { font-weight: 600; font-size: 14.5px; color: var(--text-soft); }
.drawer-links a:active { background: var(--bg-soft); }
.drawer-foot { margin-top: 0; flex: none; padding: 16px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.drawer-note { font-size: 12.5px; color: var(--text-soft); margin: 4px 0 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--dark); color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(249,115,22,.45), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(250,204,21,.22), transparent 55%),
    linear-gradient(120deg, #14171c, #1d222b);
}
.hero .container { position: relative; padding: clamp(48px, 9vw, 92px) var(--pad-x) clamp(44px, 8vw, 84px); }
.hero h1 { font-size: clamp(28px, 6vw, 58px); font-weight: 900; letter-spacing: -.5px; }
.hero p { font-size: clamp(15.5px, 1.6vw, 20px); color: #c8ced8; max-width: 620px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; margin-top: 38px; }
.hero-stats .stat .num { font-size: clamp(24px, 4vw, 34px); font-weight: 900; color: var(--accent); line-height: 1.1; }
.hero-stats .stat .lbl { font-size: 13px; color: #b9c0cc; letter-spacing: .03em; }

/* ---------- Cards / grids ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: var(--gap); }
.cat-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; transition: .2s; cursor: pointer; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; min-height: 100%;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow-lg); }
.cat-card .ic {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center;
}
.cat-card .ic svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cat-card h4 { margin: 0; font-size: 15.5px; }
.cat-card .count { font-size: 12.5px; color: var(--text-soft); }

/* ---------- Equipment cards ---------- */
.eq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--gap); }
.eq-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .2s; box-shadow: var(--shadow);
}
.eq-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.eq-thumb {
  height: clamp(160px, 42vw, 190px); display: grid; place-items: center; position: relative;
  background: linear-gradient(135deg, #1f242c, #2c333d); overflow: hidden;
}
.eq-thumb svg { width: 64px; height: 64px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .92; position: relative; z-index: 0; }
.eq-thumb .cat-tag {
  position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: rgba(0,0,0,.62); color: #fff; padding: 5px 10px; border-radius: 999px; z-index: 3;
  max-width: calc(100% - 70px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eq-thumb .cmp {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.92); color: #14171c; cursor: pointer; display: grid; place-items: center;
  font-size: 17px; font-weight: 800; transition: .15s; z-index: 3; line-height: 1;
}
.eq-thumb .cmp:hover { background: #fff; transform: scale(1.08); }
.eq-thumb .cmp.on { background: var(--brand-btn); color: #fff; }
.eq-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.eq-body h3 { margin: 0; font-size: 18.5px; }
.eq-body .desc { font-size: 14px; color: var(--text-soft); margin: 0; flex: 1; }
.eq-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; background: var(--bg-soft); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; color: var(--text-soft); }
.eq-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 15px; }
.price small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-soft); }
.eq-foot a.btn { padding: 10px 18px; font-size: 13.5px; }

/* equipment photo sits over the icon artwork */
.eq-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; transition: transform .4s ease;
  background: linear-gradient(135deg, #1f242c, #2c333d);
}
.eq-card:hover .eq-photo { transform: scale(1.06); }

/* ---------- Stars / rating ---------- */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; fill: #d4d8df; }
[data-theme="dark"] .stars svg { fill: #3a4350; }
.stars svg.on { fill: #b45309; }
[data-theme="dark"] .stars svg.on { fill: var(--accent); }
.rating-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; flex-wrap: wrap; }
.rating-pill .score { color: var(--brand-dark); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.search-box { position: relative; flex: 1 1 220px; min-width: 0; }
.search-box input {
  width: 100%; padding: 13px 14px 13px 42px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--bg); color: var(--text); font-size: 16px; outline: none; transition: .2s; min-height: var(--tap);
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--text-soft); stroke-width: 2; pointer-events: none; }
.select, .sort {
  padding: 12px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--bg);
  color: var(--text); font-size: 15px; cursor: pointer; outline: none; min-height: var(--tap);
  flex: 1 1 150px; min-width: 0;
}
.select:focus, .sort:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.result-count { font-size: 14px; color: var(--text-soft); margin-bottom: 18px; }

/* ---------- Detail page ---------- */
.detail-hero { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
.detail-thumb {
  height: clamp(210px, 52vw, 300px); border-radius: var(--radius); display: grid; place-items: center;
  background: linear-gradient(135deg,#1f242c,#2c333d); position: relative; overflow: hidden;
}
.detail-thumb svg { width: 96px; height: 96px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 0; }
.detail-thumb .eq-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; margin: 22px 0; }
.spec { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; min-width: 0; }
.spec h5 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.rating-bars { display: flex; flex-direction: column; gap: 12px; }
.rate-row { display: grid; grid-template-columns: minmax(96px, 130px) 1fr 42px; align-items: center; gap: 12px; font-size: 14px; }
.bar { height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 999px; }
.rate-row .val { font-weight: 800; text-align: right; color: var(--brand-dark); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-weight: 600; margin-bottom: 18px; min-height: var(--tap); }
.back-link:hover { color: var(--brand-dark); }

/* ---------- Services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: var(--gap); }
.svc-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 26px); box-shadow: var(--shadow); transition: .2s; }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.svc-card .ic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; margin-bottom: 14px; }
.svc-card .ic svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svc-card h3 { margin: 0 0 6px; font-size: 19px; }
.svc-card .feat { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.svc-card .feat li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-soft); }
.svc-card .feat li::before { content: "✓"; color: var(--success); font-weight: 800; flex: none; }

/* ---------- Compare bar ---------- */
.compare-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 175; background: var(--bg-card);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0,0,0,.12);
  display: none;                                   /* closed = not on the page at all */
  padding: 12px var(--pad-x) calc(12px + env(safe-area-inset-bottom));
  max-height: 46vh; overflow-y: auto;
}
.compare-bar.open { display: block; animation: rb-slide-up .3s ease; }
@keyframes rb-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.compare-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.compare-inner .chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 100%; }
.cmp-chip { background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cmp-chip button { border: none; background: transparent; color: var(--brand-dark); cursor: pointer; font-weight: 900; font-size: 17px; line-height: 1; width: 26px; height: 26px; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { width: 100%; min-width: 520px; border-collapse: collapse; margin-top: 10px; }
.compare-table th, .compare-table td { border: 1px solid var(--line); padding: 12px; text-align: left; font-size: 14px; }
.compare-table th { background: var(--bg-soft); }
.compare-table td.label { font-weight: 700; color: var(--text-soft); background: var(--bg-soft); }
/* keep floating buttons from sitting on top of the compare bar */
body.compare-open .wa-float, body.compare-open .to-top { bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- Contact / forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
.info-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); min-width: 0; }
.info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row .ic { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; }
.info-row .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.info-row h4 { margin: 0; font-size: 14px; }
.info-row a, .info-row span { font-weight: 600; overflow-wrap: anywhere; }
form .field { margin-bottom: 16px; }
form label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
form input, form textarea, form select {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong);
  background: var(--bg); color: var(--text); font-size: 16px; outline: none; transition: .2s; font-family: inherit;
  min-height: var(--tap);
}
form input:focus, form textarea:focus, form select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
form textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--text-soft); }
.field-error { color: var(--danger); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
input.invalid, textarea.invalid, select.invalid { border-color: var(--danger); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #c8ced8; padding: clamp(38px, 6vw, 54px) 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.site-footer .brand { color: #fff; }
.site-footer .brand img { background: #fff; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.site-footer a { color: #c2c9d4; display: block; padding: 6px 0; font-size: 14.5px; }
.site-footer a:hover { color: var(--accent); }
.footer-intro { margin-top: 14px; max-width: 320px; color: #c2c9d4; }
.footer-muted { color: #c2c9d4; font-size: 14px; margin: 0 0 6px; }
.footer-muted.small { color: #aeb6c2; font-size: 13px; margin-top: 8px; }
.footer-bottom {
  border-top: 1px solid #2a313b; margin-top: 30px; padding-top: 18px; font-size: 13px; color: #b3bbc7;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a { display: inline; padding: 0; font-size: 13px; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: var(--tap); height: var(--tap); border-radius: 50%; border: 1px solid #2a313b; display: grid; place-items: center; color: #c8ced8; padding: 0; }
.socials a:hover { background: var(--brand-btn); border-color: var(--brand-btn); color: #fff; }

/* ---------- Floating WhatsApp + back to top ---------- */
.wa-float {
  position: fixed; right: clamp(12px, 3vw, 20px); bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 65; display: flex; align-items: center; gap: 10px;
  background: var(--wa); color: #fff; padding: 13px 18px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(13,128,70,.4); transition: transform .15s ease; font-size: 15px;
}
.wa-float:hover { transform: scale(1.04); background: var(--wa-hover); }
.wa-float svg { width: 22px; height: 22px; fill: #fff; flex: none; }
.to-top {
  position: fixed; right: clamp(12px, 3vw, 20px); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 65;
  width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--brand-btn); color: #fff;
  cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow-lg);
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Notice / toast ---------- */
.notice {
  background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.rb-toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  z-index: 230; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow-lg); max-width: 90vw; text-align: center;
}
.rb-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Cookie banner ---------- */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 180;
  background: var(--bg-card); border-top: 1px solid var(--line); box-shadow: 0 -12px 34px rgba(0,0,0,.16);
  display: none;                                   /* closed = not on the page at all */
  padding-bottom: env(safe-area-inset-bottom);
}
.cookie-bar.show { display: block; animation: rb-slide-up .35s cubic-bezier(.4,0,.2,1); }
.cookie-bar a { color: var(--brand-dark); font-weight: 700; text-decoration: underline; }
body.cookie-open .wa-float, body.cookie-open .to-top { bottom: auto; opacity: 0; pointer-events: none; }

/* ---------- Accordion (FAQ) ---------- */
.acc { display: grid; gap: 10px; }
.acc-item { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.acc-item.open { border-color: var(--brand); }
.acc-q {
  width: 100%; text-align: left; background: transparent; border: none; cursor: pointer;
  padding: 16px 46px 16px 18px; font-size: 16px; font-weight: 700; color: var(--text);
  position: relative; min-height: var(--tap); font-family: inherit;
}
.acc-q::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 800; color: var(--brand-dark); transition: transform .2s;
}
.acc-item.open .acc-q::after { content: "–"; }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc-a-inner { padding: 0 18px 18px; color: var(--text-soft); font-size: 15px; }
.acc-a-inner p:last-child { margin-bottom: 0; }

/* ---------- Legal / long-form pages ---------- */
.legal { max-width: 820px; }
.legal h2 { font-size: clamp(19px, 2.4vw, 24px); margin-top: 30px; }
.legal h3 { font-size: 17px; margin-top: 22px; }
.legal p, .legal li { color: var(--text-soft); font-size: 15.5px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal .updated { font-size: 13.5px; color: var(--text-soft); border-left: 3px solid var(--brand); padding-left: 12px; }

/* ---------- Machine finder ---------- */
.finder-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow);
}
.finder-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.fstep {
  font-size: 12.5px; font-weight: 700; color: var(--text-soft); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.fstep.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.opt {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; font-family: inherit; font-size: 15px; font-weight: 700; color: var(--text);
  transition: .18s; min-height: var(--tap);
}
.opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(249,115,22,.14); }
.opt span { font-size: 13px; font-weight: 500; color: var(--text-soft); }
.finder-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.result-card {
  background: var(--bg-card); border: 1px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.result-card h4 { margin: 0 0 4px; font-size: 17px; }
.match-badge { background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.estimate-box {
  background: linear-gradient(135deg, var(--dark), #232a34); color: #fff; border-radius: var(--radius);
  padding: clamp(18px, 3vw, 26px); margin-top: 22px;
}
.estimate-box .big { font-size: clamp(24px, 4.4vw, 34px); font-weight: 900; color: var(--accent); line-height: 1.15; }
.estimate-box .small { color: #c8ced8; font-size: 14px; }
.estimate-box .rows { display: grid; gap: 8px; margin: 14px 0; }
.estimate-box .row-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; border-bottom: 1px dashed rgba(255,255,255,.18); padding-bottom: 6px; }
.estimate-box input[type="number"] { max-width: 130px; }

/* ---------- Analytics dashboard (private page) ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.kpi { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.kpi .k-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); font-weight: 700; }
.kpi .k-value { font-size: clamp(24px, 3.6vw, 32px); font-weight: 900; color: var(--brand-dark); line-height: 1.15; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr minmax(38px, auto); align-items: center; gap: 10px; font-size: 14px; }
.bar-row .b-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bar-row .b-track { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-row .b-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 999px; }
.bar-row .b-val { text-align: right; font-weight: 800; color: var(--brand-dark); }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 8px; }
.spark .col { flex: 1; background: linear-gradient(180deg, var(--brand), var(--accent)); border-radius: 6px 6px 0 0; min-height: 4px; position: relative; }
.spark .col span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--text-soft); white-space: nowrap; }
.spark-wrap { padding-bottom: 26px; }

/* ---------- 404 ---------- */
.err-hero { text-align: center; padding: clamp(48px, 10vw, 100px) 0; }
.err-code { font-size: clamp(64px, 18vw, 130px); font-weight: 900; line-height: 1; color: var(--brand-dark); letter-spacing: -2px; }

/* ---------- Rates table (becomes cards on phones) ---------- */
.table-scroll-hint { font-size: 12.5px; color: var(--text-soft); margin: 6px 0 0; }
.rates-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rates-table { width: 100%; border-collapse: collapse; margin-top: 8px; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 640px; }
.rates-table th, .rates-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.rates-table thead th { background: var(--dark); color: #fff; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.rates-table tbody tr:hover { background: var(--bg-soft); }
.rates-table td:first-child { font-weight: 700; }
.eq-link { color: var(--brand-dark); font-weight: 700; }
.eq-link:hover { text-decoration: underline; }

/* ---------- Brand wall ---------- */
.brand-wall { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.brand-pill {
  font-weight: 800; letter-spacing: .03em; font-size: 14.5px; color: var(--text-soft);
  border: 1px solid var(--line); background: var(--bg-card); padding: 10px 16px;
  border-radius: 12px; transition: .2s;
}
.brand-pill:hover { color: var(--brand-dark); border-color: var(--brand); transform: translateY(-2px); background: var(--brand-soft); }

/* ---------- Trust ribbon ---------- */
.trust-ribbon { background: linear-gradient(90deg, #c2410c, #9a3412); color: #fff; }
.trust-ribbon .container { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; padding-top: 15px; padding-bottom: 15px; }
.trust-ribbon span { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.trust-ribbon span::before { content: "✓"; font-weight: 900; font-size: 16px; }

/* ---------- Quote card ---------- */
.quote-card { background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius); padding: clamp(18px, 3vw, 24px); margin-top: 22px; }
.quote-card h4 { margin: 0 0 6px; color: var(--brand-dark); }

/* ---------- Hero with real background photo ---------- */
.hero-home {
  background-image: linear-gradient(rgba(15,18,22,.72), rgba(15,18,22,.84)), url("../assets/hero.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-home::before { display: none; }

/* ---------- Rental rate badge ---------- */
.rate-badge {
  display: inline-block; font-weight: 800; font-size: 15px; color: #fff;
  background: var(--brand-btn); padding: 7px 14px; border-radius: 999px; margin-bottom: 4px;
}
.spec.rental { text-align: center; }
.spec.rental .big { font-size: clamp(19px, 2.6vw, 23px); font-weight: 900; color: var(--brand-dark); margin: 6px 0 2px; line-height: 1.15; }
.spec.rental .muted { font-size: 12.5px; }

/* ---------- Brands page ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 14px; }
.brand-card {
  display: flex; flex-direction: column; gap: 4px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  transition: .2s; box-shadow: var(--shadow); min-height: 100%;
}
.brand-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-lg); }
.brand-card .bc-name { font-weight: 800; font-size: 16px; }
.brand-card .bc-count { font-size: 13px; color: var(--brand-dark); font-weight: 700; }

/* --- short screens (most phones): tighten the menu so every item fits --- */
@media (max-height: 820px) {
  .drawer-links a { min-height: 44px; padding: 10px 14px; font-size: 15px; }
  .drawer-links a.sub { min-height: 38px; padding: 8px 14px; font-size: 13.5px; }
  .drawer-foot { padding: 12px; gap: 8px; }
  .drawer-foot .btn { padding: 11px 16px; }
  .drawer-note { display: none; }
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS  (mobile first → tablet → desktop)
   ========================================================================== */

/* --- small phones (≤380px): tighten, never squeeze --- */
@media (max-width: 380px) {
  :root { --pad-x: 14px; --header-h: 62px; }
  .brand img { height: 34px; width: 34px; }
  .icon-btn { width: 40px; height: 40px; }
  .nav-quote { padding: 10px 12px; font-size: 13px; }
  .hero-stats { gap: 16px 12px; }
  .eq-body { padding: 15px; }
}

/* --- phones (≤560px) --- */
@media (max-width: 560px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { gap: 8px; }
  .filters .select, .filters .sort { flex: 1 1 100%; }
  .eq-foot { flex-direction: column; align-items: stretch; }
  .eq-foot a.btn { width: 100%; }
  .wa-float { padding: 12px 14px; font-size: 14px; }
  .wa-float-text { display: none; }          /* icon only, so it never covers content */
  .footer-bottom { flex-direction: column; }
  .btn-row .btn { width: 100%; }
  .estimate-box input[type="number"] { max-width: 100%; }
}

/* --- phones & tablets up to 999px: drawer menu --- */
@media (max-width: 999px) {
  .hamburger { display: grid; }
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  /* hide the header subtitle on smaller screens so the brand never wraps */
  .site-header .brand small { display: none; }
}

/* --- tablet and up (>900px): roomier layout --- */
@media (min-width: 901px) {
  :root { --header-h: 74px; }
  .container { padding-left: 24px; padding-right: 24px; }
  .hero-stats { grid-template-columns: repeat(4, auto); gap: 36px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .detail-hero { grid-template-columns: minmax(260px, 340px) 1fr; gap: 30px; }
  .detail-thumb { position: sticky; top: calc(var(--header-h) + 16px); height: 280px; }
  .compare-inner .chips { flex: 1 1 auto; }
}

/* --- the wide menu bar only appears when there is real room for it (≥1000px).
       Below that the ☰ drawer is used, so the header can never look squeezed. --- */
@media (min-width: 1000px) {
  .nav-links { display: flex; margin-left: auto; align-items: center; }
  /* the logo + business name is never allowed to shrink or truncate */
  .site-header .brand { flex: 0 0 auto; }
  .nav-links a { font-size: 13px; padding: 9px 10px; }
  /* items are added back as the screen gets wider — see RB_MENU ranks in main.js */
  .nav-links a.rank-2 { display: none; }
  .nav-links a.rank-3 { display: none; }
  .hamburger { display: none; }
  .drawer, .drawer-scrim { display: none !important; }
}
@media (min-width: 1200px) {
  .nav-links a.rank-2 { display: inline-block; }
}
@media (min-width: 1700px) {
  .nav-links a.rank-3 { display: inline-block; }
}

/* --- the full business name next to the logo needs ≈250px; only show it
       when the screen is definitely wide enough --- */
@media (max-width: 1279px) {
  .site-header .brand > span { display: none; }
}
@media (min-width: 1280px) {
  :root { --maxw: 1240px; }
  .site-header .brand > span { display: block; }
}

/* --- large desktop (>1400px) --- */
@media (min-width: 1400px) {
  :root { --maxw: 1280px; }
  .footer-grid { gap: 40px; }
}

/* --- very wide screens (>1700px): room for the full menu AND a wider page --- */
@media (min-width: 1700px) {
  :root { --maxw: 1400px; }
  .nav-links a.rank-3 { display: inline-block; }
}

/* ============================================================================
   EXTRA PIECES USED BY THE NEW PAGES  (added with the update)
   ========================================================================== */

/* a simple two-sided row (title on the left, badge on the right) */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* On phones the rental-rate table turns into stacked cards, so nothing is
   ever cut off or squeezed sideways. */
@media (max-width: 760px) {
  .rates-table-wrap { overflow: visible; }
  .rates-table { min-width: 0; display: block; background: transparent; box-shadow: none; border-collapse: separate; }
  .rates-table thead { display: none; }
  .rates-table tbody { display: block; }
  .rates-table tr {
    display: block; background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow);
  }
  .rates-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: none; padding: 5px 0; text-align: right; font-size: 14.5px;
  }
  .rates-table td::before {
    content: attr(data-label); font-weight: 700; color: var(--text-soft); font-size: 13px;
    text-align: left; flex: none;
  }
  .rates-table td:first-child {
    display: block; text-align: left; font-size: 17px; font-weight: 800;
    border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 8px;
  }
  .rates-table td:first-child::before { content: ""; }
  .rates-table td:last-child { padding-top: 12px; justify-content: stretch; }
  .rates-table td:last-child::before { content: ""; }
  .rates-table td:last-child .btn { width: 100%; }
  .table-scroll-hint { display: none; }
}

/* nicer, scrollable comparison modal on phones */
@media (max-width: 760px) {
  .cmp-modal-inner { padding: 16px !important; }
  .compare-table { min-width: 460px; }
  .compare-table th, .compare-table td { padding: 10px; font-size: 13px; }
}

/* the private activity page uses <span> tracks, not <div>, so they stay inline */
.b-track { display: block; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; height: 12px; overflow: hidden; }
.b-track .b-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 999px; }

/* small helper for long code/IDs on the analytics page */
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; word-break: break-all; }
