/* ==========================================================================
   Dealerkeys, LLC — shared design system
   Mobile-first. Breakpoints widen up, not down.
   ========================================================================== */

:root{
  --ink:#12161c;
  --steel:#25415c;
  --steel-dark:#152738;
  --paper:#eef1f4;
  --surface:#ffffff;
  --muted:#5b6773;
  --amber:#e8a33d;
  --amber-dark:#c07f22;
  --line:#d8dee4;
  --radius:3px;
  --header-h:60px;
  --mobile-bar-h:64px;
}

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  padding-bottom:var(--mobile-bar-h);
}
h1,h2,h3,h4{
  font-family:'Barlow Condensed',sans-serif;
  font-weight:800;
  letter-spacing:.01em;
  line-height:1.08;
  text-transform:uppercase;
}
.mono{font-family:'IBM Plex Mono',monospace;}
a{color:inherit;text-decoration:none;}
img,svg{display:block;max-width:100%;}
ul{list-style:none;}
button{font:inherit;}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{
  outline:2px solid var(--amber);
  outline-offset:3px;
}
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important;scroll-behavior:auto !important;}
}

.wrap{max-width:1180px;margin:0 auto;padding:0 20px;}

/* ---------- key-cut divider ---------- */
.keycut{width:100%;height:12px;display:block;}
.keycut path{stroke:var(--line);stroke-width:2;fill:none;}

/* ---------- header / nav ---------- */
header{
  position:sticky;top:0;z-index:60;
  background:rgba(238,241,244,.98);
  border-bottom:1px solid var(--line);
  height:var(--header-h);
}
.nav{
  display:flex;align-items:center;justify-content:space-between;
  height:var(--header-h);
  padding:0 16px;
}
.brand{display:flex;align-items:center;gap:9px;font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:19px;text-transform:uppercase;letter-spacing:.02em;}
.brand .mark{width:40px;height:40px;flex-shrink:0;}
.brand .mark img{width:100%;height:100%;object-fit:contain;display:block;}
.brand .mark svg{width:14px;height:14px;}
.brand small{display:block;font-family:'IBM Plex Mono',monospace;font-weight:400;font-size:8.5px;letter-spacing:.1em;color:var(--muted);text-transform:uppercase;}

.hamburger{
  width:44px;height:44px;border:none;background:transparent;
  display:flex;flex-direction:column;justify-content:center;gap:5px;align-items:center;
  cursor:pointer;
  flex-shrink:0;
}
.hamburger span{width:20px;height:2px;background:var(--steel-dark);transition:transform .2s ease,opacity .2s ease;}
.hamburger.open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.hamburger.open span:nth-child(2){opacity:0;}
.hamburger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

.navlinks{
  position:fixed;
  top:var(--header-h);left:0;right:0;bottom:0;
  background:var(--steel-dark);
  display:flex;flex-direction:column;
  padding:24px 20px;
  gap:4px;
  transform:translateX(100%);
  transition:transform .25s ease;
  z-index:120;
  overflow-y:auto;
  box-shadow:-12px 0 32px rgba(0,0,0,.25);
}
.navlinks.open{transform:translateX(0);}
/* While the menu is open it's the only thing on screen that matters:
   scroll locks and the sticky bottom action bar steps out of the way
   so nothing sits on top of, or behind, the open menu. */
body.nav-open{overflow:hidden;}
body.nav-open .mobile-bar{display:none;}
.navlinks a{
  color:#fff;font-size:20px;font-family:'Barlow Condensed',sans-serif;font-weight:700;text-transform:uppercase;
  padding:16px 4px;border-bottom:1px solid rgba(255,255,255,.1);
}
.navlinks .nav-call{
  margin-top:16px;
  background:var(--amber);color:var(--steel-dark);
  text-align:center;padding:16px;border-radius:var(--radius);
  font-weight:800;
}
.navlinks .nav-note{color:rgba(255,255,255,.45);font-size:12px;font-family:'IBM Plex Mono',monospace;margin-top:auto;padding-top:24px;}

@media (min-width:900px){
  header{height:76px;--header-h:76px;}
  .brand{font-size:22px;}
  .brand .mark{width:48px;height:48px;}
  .brand small{font-size:9.5px;}
  .hamburger{display:none;}
  .navlinks{
    position:static;transform:none;background:transparent;
    flex-direction:row;align-items:center;padding:0;gap:26px;
    width:auto;
  }
  .navlinks a{
    color:var(--steel-dark);font-size:14px;font-family:'Inter',sans-serif;font-weight:600;text-transform:none;
    padding:4px 0;border-bottom:2px solid transparent;
  }
  .navlinks a:hover{border-color:var(--amber);}
  .navlinks .nav-call{
    background:var(--steel);color:#fff;padding:10px 18px;margin-top:0;
    display:flex;align-items:center;gap:8px;white-space:nowrap;
  }
  .navlinks .nav-call:hover{background:var(--steel-dark);}
  .navlinks .nav-note{display:none;}
}

/* ---------- sticky mobile action bar ---------- */
.mobile-bar{
  position:fixed;bottom:0;left:0;right:0;z-index:70;
  display:flex;height:var(--mobile-bar-h);
  border-top:1px solid var(--line);
  background:var(--surface);
  box-shadow:0 -6px 20px -8px rgba(18,22,28,.18);
}
.mobile-bar a{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--steel-dark);
}
.mobile-bar a svg{width:19px;height:19px;}
.mobile-bar a.primary{background:var(--amber);color:var(--steel-dark);}
@media (min-width:900px){ .mobile-bar{display:none;} body{padding-bottom:0;} }

/* ---------- generic section ---------- */
section{padding:52px 0;}
@media (min-width:900px){ section{padding:88px 0;} }
.section-eyebrow{font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--amber-dark);margin-bottom:10px;font-weight:500;}
.section-head{max-width:640px;margin-bottom:34px;}
.section-head h1,.section-head h2{font-size:clamp(28px,7vw,44px);color:var(--steel-dark);margin-bottom:12px;}
.section-head p{color:var(--muted);font-size:15.5px;}
@media (min-width:900px){ .section-head{margin-bottom:52px;} .section-head p{font-size:16px;} }

/* ---------- buttons ---------- */
.btn-row{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:28px;}
.btn-primary{background:var(--amber);color:var(--steel-dark);font-weight:700;padding:14px 24px;border-radius:var(--radius);font-size:15px;display:inline-flex;align-items:center;gap:9px;border:none;cursor:pointer;transition:background .15s ease;}
.btn-primary:hover{background:var(--amber-dark);}
.btn-secondary{border:1.5px solid var(--steel);color:var(--steel-dark);font-weight:700;padding:12.5px 22px;border-radius:var(--radius);font-size:15px;background:transparent;cursor:pointer;transition:background .15s ease;}
.btn-secondary:hover{background:rgba(37,65,92,.06);}
.btn-block{width:100%;justify-content:center;}

/* ---------- cards / grids ---------- */
.card-grid{display:grid;grid-template-columns:1fr;gap:1px;background:var(--line);border:1px solid var(--line);}
@media (min-width:640px){ .card-grid.cols-2{grid-template-columns:1fr 1fr;} }
@media (min-width:900px){ .card-grid.cols-3{grid-template-columns:repeat(3,1fr);} }
.card{background:var(--surface);padding:26px 22px;display:flex;flex-direction:column;gap:12px;}
.card h3{font-size:21px;color:var(--steel-dark);text-transform:none;letter-spacing:0;}
.card p{color:var(--muted);font-size:14.5px;}
.card-code{font-family:'IBM Plex Mono',monospace;font-size:11.5px;letter-spacing:.08em;color:var(--amber-dark);font-weight:500;}

/* ---------- footer ---------- */
footer{background:var(--steel-dark);color:rgba(255,255,255,.5);padding:24px 0;font-size:12.5px;}
footer .wrap{display:flex;flex-direction:column;gap:8px;}
footer strong{color:rgba(255,255,255,.8);}
@media (min-width:700px){ footer .wrap{flex-direction:row;justify-content:space-between;} }

/* ---------- accordion (guides) ---------- */
.make-accordion{border:1px solid var(--line);border-radius:6px;overflow:hidden;background:var(--surface);margin-bottom:10px;}
.make-accordion summary{
  list-style:none;cursor:pointer;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;
  font-family:'Barlow Condensed',sans-serif;font-weight:700;font-size:19px;color:var(--steel-dark);text-transform:uppercase;
}
.make-accordion summary::-webkit-details-marker{display:none;}
.make-accordion summary .sys{font-family:'IBM Plex Mono',monospace;font-size:10.5px;letter-spacing:.05em;color:var(--muted);text-transform:none;font-weight:500;}
.make-accordion summary::after{content:"+";font-size:22px;color:var(--amber-dark);flex-shrink:0;}
.make-accordion[open] summary::after{content:"–";}
.make-body{padding:0 18px 20px;color:var(--muted);font-size:14.5px;}
.make-body ul{margin:10px 0 14px;display:flex;flex-direction:column;gap:6px;}
.make-body li::before{content:"›";color:var(--amber-dark);margin-right:7px;font-weight:700;}
.make-body .fix-cta{display:inline-flex;align-items:center;gap:8px;margin-top:6px;font-weight:700;color:var(--steel-dark);font-size:14px;}

/* ---------- featured deep-dive cards ---------- */
.deepdive{background:var(--steel-dark);color:#fff;border-radius:8px;padding:28px 24px;display:flex;flex-direction:column;gap:14px;}
.deepdive h3{font-size:24px;letter-spacing:0;text-transform:none;}
.deepdive .sys-tag{display:inline-block;background:rgba(232,163,61,.15);color:var(--amber);font-family:'IBM Plex Mono',monospace;font-size:11px;padding:5px 10px;border-radius:20px;letter-spacing:.05em;width:fit-content;}
.deepdive p{color:rgba(255,255,255,.68);font-size:14.5px;}
.deepdive ul{display:flex;flex-direction:column;gap:7px;font-size:14px;color:rgba(255,255,255,.8);}
.deepdive li::before{content:"›";color:var(--amber);margin-right:8px;}
.deepdive .btn-primary{margin-top:6px;width:fit-content;}

/* ---------- shop: product cards ---------- */
.product-card{background:var(--surface);padding:24px 20px;display:flex;flex-direction:column;gap:10px;}
.product-card .price{font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:26px;color:var(--steel-dark);}
.product-card .price span{font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--muted);font-weight:400;text-transform:none;}
.product-card ul{display:flex;flex-direction:column;gap:5px;font-size:13.5px;color:var(--muted);margin:4px 0 8px;}
.product-card li::before{content:"✓ ";color:var(--amber-dark);font-weight:700;}
.add-cart{background:var(--steel);color:#fff;font-weight:700;padding:12px 16px;border-radius:var(--radius);border:none;cursor:pointer;font-size:14px;transition:background .15s ease;}
.add-cart:hover{background:var(--steel-dark);}
.add-cart.added{background:var(--amber-dark);}

/* ---------- cart drawer ---------- */
.cart-toggle{
  position:relative;background:var(--steel);color:#fff;width:40px;height:40px;border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;flex-shrink:0;
}
.cart-toggle svg{width:18px;height:18px;}
.cart-count{position:absolute;top:-6px;right:-6px;background:var(--amber);color:var(--steel-dark);font-size:10px;font-weight:800;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;}

.cart-drawer{
  position:fixed;top:0;right:0;bottom:0;width:100%;max-width:400px;background:#fff;z-index:90;
  transform:translateX(100%);transition:transform .25s ease;
  display:flex;flex-direction:column;box-shadow:-10px 0 30px rgba(0,0,0,.15);
}
.cart-drawer.open{transform:translateX(0);}
.cart-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line);}
.cart-head h3{font-size:20px;letter-spacing:0;text-transform:none;color:var(--steel-dark);}
.cart-close{background:none;border:none;font-size:22px;line-height:1;cursor:pointer;color:var(--muted);}
.cart-items{flex:1;overflow-y:auto;padding:12px 20px;}
.cart-item{display:flex;justify-content:space-between;gap:10px;padding:14px 0;border-bottom:1px solid var(--line);}
.cart-item .name{font-weight:600;font-size:14.5px;}
.cart-item .qty{color:var(--muted);font-size:13px;font-family:'IBM Plex Mono',monospace;}
.cart-item .remove{color:var(--amber-dark);font-size:12.5px;font-weight:600;background:none;border:none;cursor:pointer;padding:0;margin-top:4px;}
.cart-empty{color:var(--muted);font-size:14px;padding:30px 0;text-align:center;}
.cart-footer{padding:18px 20px;border-top:1px solid var(--line);}
.cart-subtotal{display:flex;justify-content:space-between;font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:20px;color:var(--steel-dark);margin-bottom:14px;}
.cart-scrim{position:fixed;inset:0;background:rgba(18,22,28,.4);z-index:80;opacity:0;pointer-events:none;transition:opacity .2s ease;}
.cart-scrim.open{opacity:1;pointer-events:auto;}

/* ---------- checkout form ---------- */
.form-grid{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:22px;display:grid;grid-template-columns:1fr;gap:14px;}
@media (min-width:640px){ .form-grid{grid-template-columns:1fr 1fr;padding:30px;} }
.form-grid .full{grid-column:1/-1;}
label{font-family:'IBM Plex Mono',monospace;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);display:block;margin-bottom:6px;}
input,textarea,select{width:100%;border:1px solid var(--line);background:#fff;padding:12px;border-radius:3px;font-family:'Inter',sans-serif;font-size:15px;color:var(--ink);}
textarea{resize:vertical;min-height:90px;}

/* ---------- how-it-works steps ---------- */
.steps{display:grid;grid-template-columns:1fr;gap:1px;background:var(--line);border:1px solid var(--line);}
@media (min-width:700px){ .steps{grid-template-columns:repeat(3,1fr);} }
.step{background:var(--surface);padding:24px 22px;}
.step .num{font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:34px;color:var(--amber-dark);display:block;margin-bottom:8px;}
.step h4{font-size:18px;text-transform:none;letter-spacing:0;color:var(--steel-dark);margin-bottom:6px;}
.step p{color:var(--muted);font-size:14px;}

.bg-dark{background:var(--steel-dark);color:#fff;}
.bg-dark .section-head h2{color:#fff;}
.bg-dark .section-head p{color:rgba(255,255,255,.65);}
