:root{
  --net:#a78bfa; --compute:#fb923c; --storage:#86efac; --db:#818cf8;
  --intg:#f472b6; --search:#5eead4; --actor:#94a3b8; --misc:#fbbf24;
  --ink:#e2e8f0; --ink2:#94a3b8; --ink3:#64748b;
  --line:rgba(255,255,255,0.08); --line2:rgba(255,255,255,0.12);
  --bg:#08080e; --card:#12121e; --surface:#0e0e18;
  --disp:'Space Grotesk',sans-serif; --mono:'JetBrains Mono',monospace;
  --ease:cubic-bezier(.16,1,.3,1);
}
*{ box-sizing:border-box; margin:0; }
html,body{ height:100%; }
body{
  font-family:'Inter',system-ui,sans-serif; color:var(--ink); background:var(--bg);
  background-image:
    radial-gradient(1100px 600px at 78% -10%, rgba(167,139,250,0.06), transparent 60%),
    radial-gradient(900px 520px at 5% 110%, rgba(94,234,212,0.04), transparent 55%);
}
a{ color:inherit; text-decoration:none; }
::selection{ background:var(--net); color:var(--bg); }

/* ── Header ────────────────────────────────────────── */
header{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  padding:12px 24px; border-bottom:1px solid var(--line);
  background:rgba(8,8,14,0.85); backdrop-filter:blur(16px);
  position:sticky; top:0; z-index:40;
}
.header-left{ display:flex; align-items:center; gap:14px; }
.back-link{
  display:flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:10px;
  color:var(--ink2); border:1px solid var(--line);
  background:rgba(255,255,255,0.03);
  transition:color .2s, border-color .2s, background .2s;
}
.back-link:hover{ color:var(--net); border-color:rgba(167,139,250,0.3); background:rgba(167,139,250,0.06); }
.header-eyebrow{
  font-family:var(--mono); font-size:10px; letter-spacing:2px;
  text-transform:uppercase; color:var(--net); display:block;
}
header h1{
  font-family:var(--disp); font-weight:600; font-size:18px;
  letter-spacing:-.3px; color:var(--ink); margin-top:2px;
}

/* ── Toolbar ───────────────────────────────────────── */
.toolbar{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.toolbar-sep{ width:1px; height:24px; background:var(--line2); margin:0 4px; }

.btn{
  display:inline-flex; align-items:center; gap:7px;
  padding:8px 14px; border-radius:10px;
  border:1px solid var(--line2); background:rgba(255,255,255,0.03);
  color:var(--ink2); font-size:12.5px; font-weight:600;
  cursor:pointer; transition:.18s var(--ease); white-space:nowrap;
}
.btn:hover{ border-color:rgba(255,255,255,0.2); color:var(--ink); background:rgba(255,255,255,0.06); }
.btn .ic{ width:14px; height:14px; display:block; }
.btn .sw{ width:9px; height:9px; border-radius:3px; }

.btn--booking{
  background:linear-gradient(135deg,rgba(167,139,250,0.15),rgba(129,140,248,0.1));
  border-color:rgba(167,139,250,0.35); color:#c4b5fd;
}
.btn--booking:hover{ border-color:rgba(167,139,250,0.6); background:rgba(167,139,250,0.2); box-shadow:0 4px 20px -6px rgba(167,139,250,.3); }

.btn--listing{
  background:linear-gradient(135deg,rgba(251,146,60,0.12),rgba(251,146,60,0.06));
  border-color:rgba(251,146,60,0.35); color:#fdba74;
}
.btn--listing:hover{ border-color:rgba(251,146,60,0.6); background:rgba(251,146,60,0.18); box-shadow:0 4px 20px -6px rgba(251,146,60,.3); }

.btn--reset{ color:var(--ink3); border-color:var(--line); }
.btn--reset:hover{ color:var(--ink2); }

.btn.on[data-path="read"]{ background:rgba(129,140,248,0.12); border-color:rgba(129,140,248,0.5); color:#a5b4fc; }
.btn.on[data-path="write"]{ background:rgba(244,114,182,0.12); border-color:rgba(244,114,182,0.5); color:#f9a8d4; }
.sw--read{ background:#818cf8; }
.sw--write{ background:#f472b6; }

/* ── Diagram stage ─────────────────────────────────── */
#wrap{ overflow:hidden; padding:20px 26px 12px; }
#fit{ margin:0 auto; transform-origin:top left; }
#stage{ position:relative; width:1680px; height:940px; }
#wires{ position:absolute; inset:0; width:1680px; height:940px; overflow:visible; pointer-events:none; }
#wires path{ fill:none; stroke:rgba(255,255,255,0.10); stroke-width:2.4; transition:stroke .25s, opacity .25s, stroke-width .25s; }
#wires path.read{ stroke:rgba(129,140,248,0.55); }
#wires path.write{ stroke:rgba(244,114,182,0.55); }
#wires path.dim{ opacity:.1; }
#wires path.hot{ stroke-width:3.6; }
#wires path.flow{ stroke:#a78bfa; stroke-width:3.8; }

/* ── Nodes ─────────────────────────────────────────── */
.node{ position:absolute; cursor:pointer; user-select:none; }
.card{
  background:var(--card); border:1.5px solid var(--line2); border-radius:14px; height:100%;
  box-shadow:0 4px 16px -8px rgba(0,0,0,.5); transition:.2s var(--ease);
  display:flex; flex-direction:column;
}
.node:hover .card{
  transform:translateY(-3px);
  box-shadow:0 12px 32px -10px rgba(0,0,0,.7), 0 0 24px -8px rgba(167,139,250,.15);
  border-color:rgba(255,255,255,0.18);
}
.node.dim{ opacity:.2; filter:saturate(.3); }
.node.on .card{
  border-color:currentColor;
  box-shadow:0 0 0 3px color-mix(in srgb, currentColor 18%, transparent), 0 12px 26px -14px rgba(0,0,0,.6);
}
.node.ping .card{ animation:ping .7s ease; }
@keyframes ping{ 0%{ box-shadow:0 0 0 0 color-mix(in srgb, currentColor 45%, transparent);} 100%{ box-shadow:0 0 0 22px transparent;} }

.svc{ padding:13px 15px; }
.svc .top{ display:flex; align-items:center; gap:10px; }
.ico{
  width:38px; height:38px; border-radius:10px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, currentColor 12%, var(--card));
}
.ico svg{ width:21px; height:21px; }
.svc .nm{ font-weight:600; font-size:14.5px; line-height:1.15; color:var(--ink); }
.svc .meta{ font-family:var(--mono); font-size:10px; letter-spacing:.5px; color:var(--ink3); margin-top:3px; text-transform:uppercase; }
.badge{
  position:absolute; top:-9px; left:14px;
  font-family:var(--mono); font-size:9.5px; letter-spacing:1px; font-weight:600;
  padding:2px 7px; border-radius:999px;
  background:var(--card); border:1.5px solid currentColor; text-transform:uppercase;
}

.round .card{ border-radius:50%; align-items:center; justify-content:center; }
.round .ico{ width:54px; height:54px; background:color-mix(in srgb, currentColor 12%, var(--card)); }
.round .ico svg{ width:30px; height:30px; }
.round .clbl{
  position:absolute; top:calc(100% + 7px); left:50%; transform:translateX(-50%);
  white-space:nowrap; font-weight:600; font-size:13px; text-align:center; color:var(--ink);
}

.actor .card{ background:linear-gradient(180deg,#1a1a2e,var(--card)); align-items:center; justify-content:center; text-align:center; }
.actor .ico{ width:46px; height:46px; }
.actor .nm{ font-weight:600; font-size:14px; margin-top:10px; color:var(--ink); }
.actor .sub{ font-size:11px; color:var(--ink3); margin-top:2px; }

.group{
  position:absolute; border:2px dashed color-mix(in srgb, var(--net) 35%, transparent); border-radius:18px;
  background:color-mix(in srgb, var(--net) 3%, transparent);
}
.group .glabel{
  position:absolute; top:-12px; left:18px; background:var(--bg); padding:1px 10px;
  font-family:var(--mono); font-size:11px; letter-spacing:1.5px; color:var(--net); font-weight:600;
}
.group.plain{ border-color:rgba(255,255,255,0.10); background:rgba(255,255,255,.02); }
.group.plain .glabel{ color:var(--ink3); }

.cyl .card{ background:linear-gradient(180deg,#1a1a2e,var(--card)); border-radius:12px/22px; align-items:center; justify-content:center; }

.host-card{ justify-content:center; align-items:center; text-align:center; }
.host-card .ico{ width:48px; height:48px; margin:0 auto; }
.host-card .nm{ margin-top:11px; font-size:16px; }
.tile-card{ align-items:center; text-align:center; justify-content:center; }
.tile-card .ico{ margin:0 auto; }
.tile-card .nm{ margin-top:9px; }
.mini-card{ align-items:center; justify-content:center; }
.mini-card .ico{ width:30px; height:30px; }
.cyl-card .ico{ background:transparent; }
.cyl-card .nm{ font-size:13px; margin-top:2px; }

/* ── Animation token ───────────────────────────────── */
#token{
  position:absolute; width:18px; height:18px; border-radius:50%;
  background:#a78bfa; left:-30px; top:-30px;
  box-shadow:0 0 0 5px rgba(167,139,250,.22), 0 0 20px rgba(167,139,250,.6);
  opacity:0; z-index:30; transition:opacity .2s;
}

/* ── Drawer ─────────────────────────────────────────── */
#drawer{
  position:fixed; top:0; right:0; height:100%; width:380px; max-width:90vw;
  background:#14142a; z-index:60;
  border-left:1px solid var(--line2);
  box-shadow:-20px 0 60px -16px rgba(0,0,0,.8);
  transform:translateX(102%); transition:transform .32s cubic-bezier(.4,0,.1,1);
  display:flex; flex-direction:column;
}
#drawer.open{ transform:translateX(0); }
.dr-head{ padding:22px 24px 18px; border-bottom:1px solid var(--line); }
.dr-cat{
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--mono); font-size:10.5px; letter-spacing:1.5px;
  text-transform:uppercase; font-weight:600; padding:4px 10px; border-radius:999px;
}
.dr-head h2{ margin:13px 0 2px; font-family:var(--disp); font-size:23px; font-weight:600; letter-spacing:-.3px; color:var(--ink); }
.dr-svc{ font-family:var(--mono); font-size:12px; color:var(--ink3); }
.dr-body{ padding:8px 24px 28px; overflow:auto; }
.dr-sec{ padding:18px 0; border-bottom:1px solid rgba(255,255,255,0.05); }
.dr-sec:last-child{ border-bottom:0; }
.dr-sec h3{ margin:0 0 8px; font-family:var(--mono); font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--ink3); }
.dr-sec p{ margin:0; font-size:14px; line-height:1.65; color:var(--ink2); }
.dr-sec ul{ margin:0; padding-left:18px; }
.dr-sec li{ font-size:13.5px; line-height:1.7; color:var(--ink2); }
.chips{ display:flex; flex-wrap:wrap; gap:7px; }
.chip{
  font-family:var(--mono); font-size:11px; padding:5px 10px;
  border-radius:8px; background:rgba(255,255,255,0.05); color:var(--ink2); border:1px solid var(--line);
}
.dr-close{
  position:absolute; top:18px; right:18px;
  width:34px; height:34px; border-radius:9px;
  border:1px solid var(--line2); background:rgba(255,255,255,0.04);
  color:var(--ink3); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s, color .2s;
}
.dr-close:hover{ background:rgba(255,255,255,0.08); color:var(--ink); }
#scrim{ position:fixed; inset:0; background:rgba(0,0,0,.55); opacity:0; pointer-events:none; transition:.3s; z-index:55; }
#scrim.show{ opacity:1; pointer-events:auto; }

/* ── Tooltip ───────────────────────────────────────── */
#tip{
  position:fixed; z-index:70; pointer-events:none;
  background:#1a1a30; color:var(--ink); font-size:12px; padding:8px 12px;
  border-radius:10px; opacity:0; transform:translateY(4px); transition:.12s;
  max-width:230px; line-height:1.45;
  box-shadow:0 10px 30px -10px rgba(0,0,0,.7); border:1px solid var(--line2);
}
#tip .tt{ font-weight:600; font-family:var(--disp); }

/* ── Legend ─────────────────────────────────────────── */
.diagram-legend{ padding:0 26px 8px; }
.legend{ display:flex; gap:14px; flex-wrap:wrap; }
.legend .lg{ display:flex; align-items:center; gap:6px; font-size:11px; color:var(--ink3); }
.legend .d{ width:9px; height:9px; border-radius:3px; }

/* ── About Section ─────────────────────────────────── */
.about-section{
  border-top:1px solid var(--line);
  background:linear-gradient(180deg, var(--surface), var(--bg));
}
.about-inner{
  max-width:1100px; margin:0 auto;
  padding:72px 32px 80px;
}
.about-head{ max-width:720px; margin-bottom:56px; }
.about-eyebrow{
  display:block; font-family:var(--mono); font-size:11px;
  letter-spacing:2.5px; text-transform:uppercase;
  color:var(--net); margin-bottom:16px;
}
.about-title{
  font-family:var(--disp); font-weight:600;
  font-size:clamp(24px, 3.2vw, 36px); line-height:1.15;
  letter-spacing:-.5px; color:var(--ink); margin-bottom:18px;
}
.about-lead{
  font-size:16px; line-height:1.7; color:var(--ink2); max-width:640px;
}

.about-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:20px; margin-bottom:56px;
}
.about-card{
  padding:28px 24px; border-radius:16px;
  background:var(--card); border:1px solid var(--line2);
  transition:border-color .25s, transform .25s var(--ease);
}
.about-card:hover{ border-color:rgba(255,255,255,0.18); transform:translateY(-3px); }
.about-card__icon{
  width:44px; height:44px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:18px;
}
.about-card__icon--read{ background:rgba(129,140,248,0.12); color:#818cf8; }
.about-card__icon--write{ background:rgba(244,114,182,0.12); color:#f472b6; }
.about-card__icon--scale{ background:rgba(94,234,212,0.12); color:#5eead4; }
.about-card h3{
  font-family:var(--disp); font-weight:600; font-size:17px;
  color:var(--ink); margin-bottom:10px;
}
.about-card p{ font-size:14px; line-height:1.65; color:var(--ink2); }

.tips-section{ border-top:1px solid var(--line); padding-top:48px; }
.tips-title{
  font-family:var(--mono); font-size:11px; letter-spacing:2px;
  text-transform:uppercase; color:var(--net); margin-bottom:28px;
}
.tips-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:20px;
}
.tip-item{
  display:flex; gap:16px;
  padding:22px 20px; border-radius:14px;
  border:1px solid var(--line); background:rgba(255,255,255,0.02);
  transition:border-color .25s;
}
.tip-item:hover{ border-color:rgba(255,255,255,0.14); }
.tip-num{
  font-family:var(--mono); font-size:14px; font-weight:600;
  color:var(--net); opacity:.5; flex:none; line-height:1.4;
}
.tip-item h4{
  font-family:var(--disp); font-weight:600; font-size:14.5px;
  color:var(--ink); margin-bottom:6px;
}
.tip-item p{ font-size:13.5px; line-height:1.6; color:var(--ink3); }

/* ── Responsive ────────────────────────────────────── */
@media(max-width:900px){
  header{ gap:12px; padding:10px 16px; }
  header h1{ font-size:15px; }
  .toolbar{ width:100%; }
  .toolbar-sep{ display:none; }
  .btn{ padding:7px 11px; font-size:11.5px; }
  .about-inner{ padding:48px 20px 56px; }
  .about-grid, .tips-grid{ grid-template-columns:1fr; }
}
@media(max-width:600px){
  .header-eyebrow{ display:none; }
  .toolbar{ gap:6px; }
  .btn--reset{ display:none; }
  .btn span:not(.sw):not(.ic){ display:none; }
  .btn .ic{ margin:0; }
  .about-title{ font-size:22px; }
}
