/* Sturdy Store - the website's palette and type (site/index.html), laid out as a shop: a top bar, a sidebar of servers
   and their categories, and a content column. */
:root {
  --bg: #0b0b0e; --panel: #131319; --panel-2: #191921; --line: #23232e; --text: #ececf1; --muted: #9a9aab;
  --gold: #e0b11e; --gold-2: #f3d267; --green: #55ff55; --orange: #ffaa00; --red: #ff5555; --purple: #b46cff;
  --side-w: 240px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--gold-2); }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.small { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.busy { opacity: .6; pointer-events: none; }

/* ---------------------------------------------------------------------------------------------- top bar */
.bar { position: sticky; top: 0; z-index: 30; background: rgba(11,11,14,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .05em; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { background: linear-gradient(90deg, var(--gold), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grow { flex: 1; }
.who { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px 5px 5px; color: var(--text); }
.who:hover { border-color: var(--gold); }
.who img { width: 26px; height: 26px; border-radius: 5px; image-rendering: pixelated; background: var(--line); }
.who .name { font-weight: 600; font-size: 14px; }
.who.empty { padding: 7px 12px; color: var(--muted); }
.cart-btn { display: flex; align-items: center; gap: 8px; background: var(--gold); color: #1a1400; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 800; }
.cart-btn:hover { background: var(--gold-2); }
.cart-btn .count { background: #1a1400; color: var(--gold-2); border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.menu-btn { display: none; width: 40px; height: 40px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------------------------------------------------------------------------------------------- the sale */
.sale-bar { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 9px 16px; text-align: center;
  background: linear-gradient(90deg, #7a1010, var(--red), #7a1010); color: #fff; text-decoration: none; font-size: 14px; }
.sale-bar[hidden] { display: none; }
.sale-bar strong { letter-spacing: .08em; }
.sale-bar .left { background: rgba(0,0,0,.28); border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: 12px; }
.sale-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; border-radius: 18px; padding: 26px; margin-bottom: 18px;
  background: radial-gradient(600px 200px at 0% 50%, rgba(255,85,85,.35), transparent 70%), linear-gradient(135deg, #2a0d0d, #140a0a); border: 1px solid #5a1c1c; }
.sale-hero .pct { font-size: clamp(56px, 11vw, 104px); font-weight: 800; line-height: .9; color: #fff; text-shadow: 0 6px 30px rgba(255,85,85,.6); display: flex; flex-direction: column; align-items: center; }
.sale-hero .pct small { font-size: .3em; letter-spacing: .3em; color: #ffb3b3; }
.sale-hero .kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ffb3b3; margin: 0 0 6px; }
.sale-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4.5vw, 40px); }
.sale-hero p { margin: 0; color: #f0d6d6; line-height: 1.55; max-width: 620px; }
.sale-hero .actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.sale-hero .left { font-weight: 800; color: #fff; background: rgba(255,255,255,.1); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
@media (max-width: 560px) { .sale-hero { grid-template-columns: 1fr; text-align: center; } .sale-hero .actions { justify-content: center; } }

/* ---------------------------------------------------------------------------------------------- shell */
.shell { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: var(--side-w) 1fr; gap: 28px; padding: 24px 16px 48px; }
main { min-width: 0; }
.side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.side a { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid transparent; }
.side a:hover { color: var(--text); background: var(--panel); }
.side a[aria-current="page"] { color: var(--text); background: var(--panel); border-color: var(--line); box-shadow: inset 3px 0 0 var(--c, var(--gold)); }
.side a.srv { margin-top: 12px; color: var(--text); font-weight: 800; font-size: 15px; }
.side a.srv .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--gold)); flex: none; }
.side a.cat { padding-left: 31px; font-weight: 500; }
.side .soon, .tag { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; }
.side .home .ico { width: 9px; display: inline-flex; justify-content: center; }

/* ---------------------------------------------------------------------------------------------- blocks */
.notice { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; line-height: 1.5; }
.notice.good { border-left-color: var(--green); }
.notice.bad { border-left-color: var(--red); }
.hero { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 30px 26px; margin-bottom: 26px; background-size: cover; background-position: center right; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(1200px 300px at 0% 0%, color-mix(in srgb, var(--c, var(--gold)) 16%, transparent), transparent 60%), linear-gradient(90deg, rgba(19,19,25,.97) 40%, rgba(19,19,25,.6)); }
.hero > * { position: relative; }
.hero .kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c, var(--gold-2)); margin: 0 0 8px; }
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.1; }
.hero p { margin: 0 0 10px; color: #c9c9d3; max-width: 720px; line-height: 1.6; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-weight: 800; text-decoration: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.btn:hover { border-color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1400; }
.btn.primary:hover { background: var(--gold-2); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); }

.section { margin: 34px 0 0; scroll-margin-top: 84px; }
.section > h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.section > h2::before { content: ""; width: 4px; height: 22px; border-radius: 2px; background: var(--c, var(--gold)); }
.section > .lead { color: var(--muted); margin: 0 0 16px; line-height: 1.55; max-width: 760px; }

.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.srv-card { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; color: var(--text); text-decoration: none; border-top: 3px solid var(--c); transition: transform .15s, border-color .15s; }
.srv-card:hover { transform: translateY(-2px); border-color: var(--c); }
.srv-card h3 { margin: 0; font-size: 19px; color: var(--c); }
.srv-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; flex: 1; }
.srv-card .go { font-weight: 800; font-size: 14px; }
.srv-card.soon { opacity: .75; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--muted); line-height: 1.55; font-size: 14px; }
.feature b { display: block; color: var(--text); margin-bottom: 4px; font-size: 15px; }
.feature .n { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--gold-2); align-items: center; justify-content: center; font-weight: 800; margin-bottom: 8px; }

.legal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 6px 18px; }
.legal details { border-bottom: 1px solid var(--line); }
.legal details:last-child { border-bottom: 0; }
.legal summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 10px; }
.legal summary::-webkit-details-marker { display: none; }
.legal summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 20px; line-height: 1; }
.legal details[open] summary::after { content: "\2212"; }
.legal details p { margin: 0 0 14px; color: var(--muted); line-height: 1.6; }

/* ---------------------------------------------------------------------------------------------- products */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--c, var(--gold)); transform: translateY(-2px); }
.card .img { position: relative; aspect-ratio: 1 / 1; background: var(--panel-2); border: 0; padding: 0; display: block; width: 100%; }
.card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em; border-radius: 8px; padding: 4px 8px; }
.badge.bulk { background: var(--gold); color: #1a1400; left: auto; right: 10px; }
.card .body { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; flex: 1; }
.card h3 { margin: 0; font-size: 17px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; font-weight: 800; font-size: 21px; color: var(--gold-2); }
.price s { color: var(--muted); font-weight: 600; font-size: 14px; }
.price .per { color: var(--muted); font-size: 12px; font-weight: 600; }
.tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.tiers span { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 7px; }
.tiers span.on { color: #1a1400; background: var(--gold); border-color: var(--gold); }
.save { font-size: 13px; font-weight: 700; color: var(--green); min-height: 1.2em; }
.details { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.details:hover { color: var(--text); }
.buy { margin-top: auto; display: flex; gap: 8px; }
.qty { display: inline-flex; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.qty button { width: 34px; height: 40px; background: none; border: 0; color: var(--text); font-size: 18px; font-weight: 800; }
.qty button:hover:not(:disabled) { color: var(--gold-2); }
.qty output { min-width: 30px; text-align: center; font-weight: 800; }
.add { flex: 1; white-space: nowrap; background: var(--gold); color: #1a1400; border: 0; border-radius: 10px; font-weight: 800; padding: 0 12px; min-height: 42px; }
.add:hover:not(:disabled) { background: var(--gold-2); }
.add.done { background: var(--green); }
.soon-card { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 150px; background: repeating-linear-gradient(135deg, var(--panel), var(--panel) 12px, var(--panel-2) 12px, var(--panel-2) 24px); border: 1px dashed var(--line); border-radius: 16px; padding: 20px; color: var(--muted); line-height: 1.5; }
.soon-card b { color: var(--text); font-size: 17px; }

/* ---------------------------------------------------------------------------------------------- footer */
.foot-legal { border-top: 1px solid var(--line); background: #09090c; color: var(--muted); font-size: 13px; }
.foot-in { max-width: 1280px; margin: 0 auto; padding: 22px 16px 30px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; line-height: 1.6; }
.foot-in b { color: var(--text); }
.foot-in p { margin: 4px 0; }
.foot-in a { color: var(--muted); }
.foot-in a:hover { color: var(--text); }
.fine { font-size: 12px; }

/* ---------------------------------------------------------------------------------------------- basket drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 50; transform: translateX(100%); transition: transform .22s; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer header { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font-size: 18px; flex: 1; }
.x { background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; padding: 4px 8px; }
.x:hover { color: var(--text); }
.lines { flex: 1; overflow-y: auto; padding: 8px 16px; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--panel-2); }
.line .n { font-weight: 700; }
.line .p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.line .p .g { color: var(--green); font-weight: 700; }
.line .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line .rm { background: none; border: 0; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 0; }
.line .rm:hover { color: var(--red); }
.line .qty button { width: 28px; height: 30px; font-size: 15px; }
.drawer-foot { padding: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 10px 12px; font: inherit; text-transform: uppercase; }
.coupon input:focus { border-color: var(--gold); outline: none; }
.coupons { display: flex; flex-wrap: wrap; gap: 6px; }
.coupons span { display: inline-flex; align-items: center; gap: 6px; background: rgba(85,255,85,.1); color: var(--green); border: 1px solid rgba(85,255,85,.3); border-radius: 8px; padding: 3px 4px 3px 8px; font-size: 13px; font-weight: 700; }
.coupons button { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
.coupons button:hover { color: var(--red); }
.saved { color: var(--green); font-weight: 700; font-size: 14px; min-height: 0; }
.total { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; }
.total span:last-child { color: var(--gold-2); }
.checkout { background: var(--gold); color: #1a1400; border: 0; border-radius: 12px; padding: 14px; font-weight: 800; font-size: 16px; }
.checkout:hover:not(:disabled) { background: var(--gold-2); }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 16px; padding: 30px 18px; text-align: center; color: var(--muted); line-height: 1.6; }
.empty strong { color: var(--text); display: block; font-size: 17px; margin-bottom: 4px; }

/* ---------------------------------------------------------------------------------------------- dialogs + toast */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(0,0,0,.65); }
.dlg { display: flex; flex-direction: column; max-height: calc(100vh - 50px); }
.dlg header { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.dlg header h2 { margin: 0; font-size: 19px; flex: 1; }
.dlg .content { padding: 16px; overflow-y: auto; line-height: 1.6; color: #d6d6de; }
.dlg .content img { max-width: 100%; border-radius: 10px; }
.dlg .content ul { padding-left: 20px; }
.dlg footer { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.user { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
form.user label { font-weight: 700; }
form.user input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 12px 14px; font: inherit; font-size: 17px; }
form.user input:focus { border-color: var(--gold); outline: none; }
form.user .row { display: flex; gap: 10px; }
form.user .row button { flex: 1; min-height: 44px; }
.ghost { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 14px; font-weight: 700; }
.ghost:hover { border-color: var(--gold); }
.err { color: var(--red); min-height: 1.2em; margin: 0; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; z-index: 60; transition: .2s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------------------------------------------------------------------------------------------- small screens */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 0; padding-top: 16px; }
  .menu-btn { display: inline-flex; }
  .side { position: fixed; top: 61px; left: 0; bottom: 0; width: min(300px, 86vw); max-height: none; z-index: 35; background: var(--bg); border-right: 1px solid var(--line); padding: 12px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .who .name, .brand span, .cart-btn .label { display: none; } .hero { padding: 24px 18px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
