/* ==========================================================================
   crisprmart.ir — HUB page styles (on top of /shared/css/brand.css)
   01 Hero + radial stage   02 Marketplace   03 Services + content
   04 Cart drawer           05 Responsive
   ========================================================================== */

.muted { color: var(--muted); font-size: .88rem; }

/* 01 — HERO ------------------------------------------------------------- */
.hero { position: relative; padding: 52px 20px 100px; text-align: center; overflow-x: clip; }
.hero__intro { position: relative; max-width: 800px; margin: 0 auto; }
.hero__title { margin-top: 18px; font-size: clamp(28px, 4.4vw, 52px); font-weight: 800; line-height: 1.45; text-wrap: balance; }
.hero__lead { max-width: 660px; margin: 14px auto 0; color: var(--muted); font-size: clamp(14.5px, 1.5vw, 17px); text-wrap: balance; }

/* ---- Radial stage: every child anchored at the stage centre ---- */
.stage {
  --radius: 320px;                 /* distance core → node centres */
  --node: 136px;                   /* node diameter                */
  --core: 272px;                   /* core diameter                */
  --stage: calc(var(--radius) * 2 + var(--node) + 24px);
  position: relative; width: var(--stage); height: var(--stage); margin: 34px auto 0;
}
.stage__decor { position: absolute; inset: 0; pointer-events: none; }
.ring, .orbiter { position: absolute; top: 50%; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.ring--outer { width: calc(var(--radius) * 2); height: calc(var(--radius) * 2); border: 1.5px dashed rgba(var(--blue-rgb), .5); box-shadow: inset 0 0 60px rgba(var(--blue-rgb), .06); animation: ring-spin 120s linear infinite; }
.ring--mid   { width: calc(var(--radius) * 1.28); height: calc(var(--radius) * 1.28); border: 2px dotted rgba(var(--gold-rgb), .22); animation: ring-spin-rev 150s linear infinite; }
.ring--inner { width: calc(var(--core) + 70px); height: calc(var(--core) + 70px); border: 1px solid rgba(var(--blue-rgb), .3); }
.orbiter { width: calc(var(--radius) * 2); height: calc(var(--radius) * 2); animation: ring-spin 26s linear infinite; }
.orbiter::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px 2px var(--gold), 0 0 30px 8px rgba(var(--gold-rgb), .45); }

.spoke {
  position: absolute; top: 50%; left: 50%; width: 1px; height: var(--radius);
  transform-origin: 0 0; transform: rotate(calc(var(--i) * 36deg + 180deg));
  background: linear-gradient(to bottom, transparent calc(var(--core) / 2 + 6px), rgba(var(--blue-rgb), .55) 42%, rgba(var(--blue-rgb), .12) calc(100% - var(--node) / 2 - 6px), transparent calc(100% - var(--node) / 2 - 6px));
}
.stage__decor > .spoke:nth-child(5)  { --i: 0; } .stage__decor > .spoke:nth-child(6)  { --i: 1; }
.stage__decor > .spoke:nth-child(7)  { --i: 2; } .stage__decor > .spoke:nth-child(8)  { --i: 3; }
.stage__decor > .spoke:nth-child(9)  { --i: 4; } .stage__decor > .spoke:nth-child(10) { --i: 5; }
.stage__decor > .spoke:nth-child(11) { --i: 6; } .stage__decor > .spoke:nth-child(12) { --i: 7; }
.stage__decor > .spoke:nth-child(13) { --i: 8; } .stage__decor > .spoke:nth-child(14) { --i: 9; }

/* core */
.core { position: absolute; top: 50%; left: 50%; z-index: 3; width: var(--core); height: var(--core); margin: calc(var(--core) / -2) 0 0 calc(var(--core) / -2); border-radius: 50%; }
.core::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), #fff 10%, var(--gold) 24%, var(--tq) 44%, var(--panel) 58%, var(--blue) 78%, var(--blue));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: spin-plain 10s linear infinite;
}
.core__body {
  position: absolute; inset: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px; border-radius: 50%;
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.12), transparent 42%), radial-gradient(circle at 50% 120%, rgba(var(--blue-rgb), .4), transparent 60%), linear-gradient(160deg, rgba(8,48,90,.95), rgba(3,23,41,.97));
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(var(--blue-rgb), .45), 0 0 100px rgba(var(--blue-rgb), .22), inset 0 0 40px rgba(var(--blue-rgb), .2);
  animation: core-glow 3.6s ease-in-out infinite;
}
.core__badge { width: 124px; height: 124px; filter: drop-shadow(0 6px 18px rgba(var(--gold-rgb), .35)); }
.core__tag { font-size: .78rem; color: var(--muted); line-height: 1.4; margin-bottom: 4px; }
.core__pulse { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(var(--blue-rgb), .7); pointer-events: none; animation: ripple 3.6s ease-out infinite; }
.core__pulse--2 { animation-delay: 1.8s; }

/* nodes */
.nodes { position: absolute; inset: 0; z-index: 2; }
.node {
  position: absolute; top: 50%; left: 50%; width: var(--node); height: var(--node); margin: calc(var(--node) / -2) 0 0 calc(var(--node) / -2);
  /* ★ radial placement ★ */
  transform: rotate(calc(var(--i) * 36deg)) translateY(calc(var(--radius) * -1)) rotate(calc(var(--i) * -36deg));
  animation: node-in .9s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 150ms);
}
.node:hover, .node:focus-within { z-index: 10; }
.node:nth-child(1) { --i: 0; } .node:nth-child(2) { --i: 1; } .node:nth-child(3) { --i: 2; } .node:nth-child(4) { --i: 3; } .node:nth-child(5) { --i: 4; }
.node:nth-child(6) { --i: 5; } .node:nth-child(7) { --i: 6; } .node:nth-child(8) { --i: 7; } .node:nth-child(9) { --i: 8; } .node:nth-child(10) { --i: 9; }

.node__card {
  position: relative; isolation: isolate; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 14px 10px; text-align: center; border-radius: 50%;
  border: 1px solid rgba(var(--blue-rgb), .4);
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.09), transparent 45%), var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(130%); backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1), 0 0 22px rgba(var(--blue-rgb), .12);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.node__card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), rgba(255,255,255,.22), transparent 55%), linear-gradient(150deg, #0d6bb5 0%, var(--panel) 100%); opacity: 0; transition: opacity .4s; }
.node__card::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 50%; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.24) 50%, transparent 62%) 100% 0 / 300% 100% no-repeat; transition: background-position .9s var(--ease); }
.node__icon { font-size: 27px; line-height: 1.1; filter: drop-shadow(0 0 8px rgba(var(--blue-rgb), .6)); transition: transform .45s var(--ease); }
.node__name { font-size: 12.5px; font-weight: 800; letter-spacing: .07em; line-height: 1.3; }
.node__role { max-width: 104px; font-size: 11.5px; line-height: 1.45; color: var(--muted); transition: color .3s; }
.node__domain { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 2; padding: 3px 12px; font-size: 11.5px; letter-spacing: .05em; white-space: nowrap; background: rgba(3,23,41,.9); border: 1px solid rgba(var(--gold-rgb), .6); color: var(--gold); border-radius: 999px; box-shadow: var(--glow-gold); opacity: 0; transform: translate(-50%, -6px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }

.node__card:hover, .node__card:focus-visible {
  transform: scale(1.16); border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), .6), 0 0 36px rgba(var(--blue-rgb), .75), 0 0 100px rgba(var(--blue-rgb), .4), inset 0 0 30px rgba(var(--blue-rgb), .35);
}
.node__card:hover::before, .node__card:focus-visible::before { opacity: 1; }
.node__card:hover::after, .node__card:focus-visible::after { background-position: 0 0; }
.node__card:hover .node__icon { transform: scale(1.15) translateY(-1px); }
.node__card:hover .node__role, .node__card:focus-visible .node__role { color: var(--text); }
.node__card:hover .node__domain, .node__card:focus-visible .node__domain { opacity: 1; transform: translate(-50%, 0); }
.node__card:focus-visible { outline: none; }

/* 02 — MARKETPLACE ------------------------------------------------------ */
.section { padding-block: 70px 10px; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 30px; }
.section__head h2 { margin: 14px 0 8px; font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.5; }
.section__head p:not(.cm-eyebrow) { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 26px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.product { display: flex; flex-direction: column; gap: 8px; padding: 20px; position: relative; height: 100%; }
.product__ico { width: 54px; height: 54px; display: grid; place-items: center; font-size: 27px; border-radius: 16px; background: rgba(var(--blue-rgb), .12); border: 1px solid rgba(var(--blue-rgb), .35); }
.product__badge { position: absolute; top: 16px; inset-inline-end: 16px; padding: 1px 10px; font-size: .7rem; border-radius: 999px; color: var(--gold); border: 1px solid rgba(var(--gold-rgb), .45); }
.product h3 { font-size: 1.02rem; line-height: 1.6; }
.product p { color: var(--muted); font-size: .88rem; flex: 1; }
.product__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.product__tags span { font-size: .7rem; padding: 0 9px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--muted); direction: ltr; }
.product__price { color: var(--tq); font-weight: 700; font-size: .9rem; }
.product .cm-btn { width: 100%; }

.recs { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: center; margin-top: 34px; padding: 22px 26px; }
.recs h3 { font-size: 1.05rem; margin-bottom: 4px; }
.recs h3 span:first-child { color: var(--gold); }
.recs__list { display: flex; flex-wrap: wrap; gap: 10px; }
.recs__list button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(var(--gold-rgb), .45); background: rgba(var(--gold-rgb), .06); transition: all .25s; font-size: .88rem; }
.recs__list button:hover { background: rgba(var(--gold-rgb), .16); box-shadow: var(--glow-gold); }

/* 03 — SERVICES + CONTENT ---------------------------------------------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.svc-grid li { padding: 24px 22px; }
.svc__ico { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 12px; font-size: 24px; border-radius: 14px; background: linear-gradient(135deg, rgba(var(--blue-rgb), .2), rgba(var(--tq-rgb), .12)); border: 1px solid rgba(var(--blue-rgb), .35); }
.svc-grid h3 { font-size: 1.02rem; margin-bottom: 6px; }
.svc-grid p { color: var(--muted); font-size: .88rem; }
.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.content-card { display: block; height: 100%; padding: 24px; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.content-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 18px 50px rgba(0,0,0,.3), var(--glow-gold); }
.content-card > span { font-size: 28px; }
.content-card h3 { margin: 8px 0 4px; font-size: 1.05rem; }
.content-card p { color: var(--muted); font-size: .88rem; }

/* header cart button */
.cart-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); transition: all .25s; }
.cart-btn:hover { border-color: var(--blue); box-shadow: var(--glow-blue); }
.cart-btn__count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #1b1500; font-size: .7rem; font-weight: 800; line-height: 19px; text-align: center; }

/* 04 — CART DRAWER ------------------------------------------------------ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 120; background: rgba(1, 8, 18, .65); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 121; width: min(400px, 100vw); display: flex; flex-direction: column; background: linear-gradient(170deg, var(--panel), var(--bg-deep)); border-inline-start: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.6); animation: drawer-in .35s var(--ease); }
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }
[dir="rtl"] .drawer { animation-name: drawer-in-rtl; }
@keyframes drawer-in { from { translate: 100% 0; } to { translate: 0 0; } }
@keyframes drawer-in-rtl { from { translate: -100% 0; } to { translate: 0 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 1.1rem; }
.drawer__close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: transparent; font-size: 20px; line-height: 1; color: var(--muted); }
.drawer__close:hover { color: var(--text); border-color: var(--blue); }
.drawer__list { flex: 1; overflow-y: auto; padding: 12px 20px; display: grid; align-content: start; gap: 10px; }
.drawer__empty { padding: 30px 20px; text-align: center; color: var(--muted); }
.drawer__empty[hidden] { display: none; }
.cart-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); }
.cart-item__ico { font-size: 22px; }
.cart-item__name { font-size: .9rem; line-height: 1.5; }
.cart-item__qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.cart-item__qty button { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 8px; background: transparent; line-height: 1; }
.cart-item__qty button:hover { border-color: var(--blue); }
.cart-item__rm { border: 0; background: transparent; color: var(--muted); font-size: .78rem; text-decoration: underline; }
.cart-item__rm:hover { color: var(--gold); }
.drawer__foot { display: grid; gap: 12px; padding: 16px 20px 20px; border-top: 1px solid var(--line); }

/* animations */
@keyframes ring-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes ring-spin-rev { to { transform: translate(-50%, -50%) rotate(-360deg); } }
@keyframes spin-plain { to { transform: rotate(360deg); } }
@keyframes core-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(var(--blue-rgb), .45), 0 0 90px rgba(var(--blue-rgb), .22), inset 0 0 40px rgba(var(--blue-rgb), .2); }
  50% { box-shadow: 0 0 70px rgba(var(--blue-rgb), .75), 0 0 150px rgba(var(--blue-rgb), .4), inset 0 0 60px rgba(var(--blue-rgb), .32); }
}
@keyframes ripple { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes node-in { from { opacity: 0; scale: .25; } to { opacity: 1; scale: 1; } }
@keyframes fade-up { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

/* 05 — RESPONSIVE ------------------------------------------------------- */
@media (min-width: 851px) and (max-width: 1000px) {
  .stage { --radius: 300px; --node: 128px; --core: 252px; }
  .node__role { font-size: 11px; }
}
@media (max-width: 1000px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .recs { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .hero { padding: 32px 16px 64px; }
  .cm-eyebrow { font-size: .7rem; letter-spacing: .05em; padding: 5px 12px; }

  /* radial → stacked: core on top, then 2-column grid */
  .stage { width: 100%; height: auto; margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 34px; }
  .stage__decor { display: none; }
  .core { position: relative; top: auto; left: auto; margin: 0; flex: none; width: 262px; height: 262px; }
  .nodes { position: static; width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .node { position: static; width: auto; height: auto; margin: 0; transform: none; animation: fade-up .7s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 100ms); }
  .node__card { min-height: 168px; padding: 20px 12px 16px; gap: 3px; border-radius: 26px; }
  .node__card::before, .node__card::after { border-radius: 26px; }
  .node__icon { font-size: 32px; } .node__name { font-size: 13.5px; } .node__role { font-size: 12.5px; max-width: none; }
  .node__domain { position: static; margin-top: 8px; opacity: 1; transform: none; font-size: 11px; padding: 2px 10px; background: rgba(3,23,41,.55); border-color: rgba(var(--gold-rgb), .4); box-shadow: none; }
  .node__card:hover, .node__card:focus-visible { transform: scale(1.03); }
  .node__card:hover .node__domain { transform: none; }

  .section { padding-top: 54px; }
  .content-grid { grid-template-columns: 1fr; }
  .recs { padding: 18px; }
}
@media (max-width: 560px) {
  .svc-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .nodes { gap: 10px; } .node__card { padding-inline: 8px; } .node__name { font-size: 12.5px; letter-spacing: .04em; }
  .core { width: 236px; height: 236px; } .core__badge { width: 104px; height: 104px; }
}
@media (prefers-reduced-motion: reduce) { .node, .core__body { animation: none !important; } }

/* offline.html */
.offline { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.offline h1 { font-size: 1.6rem; }
