/* Emperor Shiva — sci-fi dark variant (advisr.trading × bionic demo) */
@font-face {
  font-family: "Cal Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/assets/fonts/CalSans-SemiBold.woff2") format("woff2"),
    url("/assets/fonts/CalSans-SemiBold.woff") format("woff");
}

:root {
  --bg: #04060b;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.12);
  --ink: #f2f4f8;
  --muted: #8a93a8;
  --cyan: #22d3ee;
  --purple: #8b5cf6;
  --gold: #f0b429;
  --radius: 16px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

h1, h2, h3 { font-family: "Cal Sans", -apple-system, sans-serif; font-weight: 600; letter-spacing: 0.01em; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(4, 6, 11, 0.85);
  position: sticky; top: 0; backdrop-filter: blur(10px); z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); font-family: "Cal Sans", sans-serif; }
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.5)); }
.nav-links { display: flex; gap: 24px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.85rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-links a:hover { color: var(--cyan); }

/* Section labels */
.label {
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--cyan); display: block; margin-bottom: 14px;
}
.label.purple { color: var(--purple); }
.label.gold { color: var(--gold); }

/* Hero — centered, mascot above */
.hero { display: flex; flex-direction: column-reverse; align-items: center; text-align: center; gap: 28px; padding: 56px 0 72px; }
.hero-text h1 { font-size: 3rem; line-height: 1.15; margin-bottom: 20px; }
.h1-sub { font-size: 0.72em; }
/* Scanning headline (bionic demo clip-path technique) */
.scan { position: relative; display: inline-block; }
.scan-copy {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.scan-blur { filter: blur(3px); }
.scan-crisp {
  position: absolute; left: 0; top: 0;
  /* asymmetric band: "Bring" ends at 19.6% (left stop 20%), "focus." starts at 77.7% (right stop 77%) */
  clip-path: polygon(0 0, 20% 0, 20% 100%, 0 100%);
  animation: clipMove 6s ease-in-out infinite;
}
@keyframes clipMove {
  0%   { clip-path: polygon(0 0, 20% 0, 20% 100%, 0 100%); }
  50%  { clip-path: polygon(77% 0, 100% 0, 100% 100%, 77% 100%); }
  100% { clip-path: polygon(0 0, 20% 0, 20% 100%, 0 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .scan-crisp { display: none; }
  .scan-blur { filter: none; }
}

/* Starfield backdrop */
.starfield { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; opacity: 0.8; }
header, main, footer { position: relative; z-index: 1; }
.hero-text p { color: var(--muted); font-size: 1.1rem; margin: 0 auto 10px; }
.hero-img { text-align: center; }
.hero-img img {
  max-width: 100%; width: 300px;
  /* ponytail: no CSS glow — the v4 render bakes its own aura */
}

.btn {
  display: inline-block; background: linear-gradient(90deg, var(--purple), #6d28d9);
  color: #fff; padding: 13px 26px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.btn:hover { box-shadow: 0 0 24px rgba(139, 92, 246, 0.5); }
.btn.ghost {
  background: transparent; color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.5); margin-left: 10px;
}
.btn.ghost:hover { box-shadow: 0 0 18px rgba(34, 211, 238, 0.35); }

/* Sections */
section { padding: 64px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
section h2 { font-size: 2rem; margin-bottom: 10px; }
.section-sub { color: var(--muted); margin-bottom: 36px; max-width: 60ch; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
/* Glass panels — bionic demo glass1 recipe, extra translucent */
.glass, .card, .step, .contact-box, .pricing-note {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}
.card {
  border-radius: var(--radius); padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: rgba(34, 211, 238, 0.55); box-shadow: 0 0 30px rgba(34, 211, 238, 0.15); }
.card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.card .tag {
  display: inline-block; font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 14px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid;
}
.tag.teal { color: var(--cyan); border-color: rgba(34, 211, 238, 0.4); }
.tag.gold { color: var(--gold); border-color: rgba(240, 180, 41, 0.4); }
.tag.purple { color: var(--purple); border-color: rgba(139, 92, 246, 0.45); }
.card p { color: var(--muted); font-size: 0.95rem; }
/* hanging bullets — list text shares the paragraph's left axis, markers sit in the gutter */
.card ul { color: var(--muted); font-size: 0.95rem; list-style: none; padding-left: 0; margin-top: 10px; }
.card li { position: relative; }
.card li::before { content: "•"; position: absolute; left: -1em; color: var(--muted); }

/* Pricing */
.price { font-size: 1.5rem; margin: 12px 0 4px; font-family: "Cal Sans", sans-serif; color: var(--ink); }
.price small { font-size: 0.8rem; color: var(--muted); font-family: var(--mono); }
.pricing-note {
  margin-top: 28px; padding: 18px 22px;
  border-left: 3px solid var(--cyan);
  border-radius: 10px; color: var(--muted); font-size: 0.95rem;
}
.pricing-note a { color: var(--cyan); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { border-radius: var(--radius); padding: 26px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.15em;
  display: block; color: var(--cyan); margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.93rem; }

/* Contact */
.contact-box {
  border-radius: var(--radius);
  padding: 44px; text-align: center;
}
.contact-box .email {
  font-size: 1.3rem; font-family: var(--mono); color: var(--cyan); text-decoration: none;
}
.contact-box .email:hover { text-shadow: 0 0 16px rgba(34, 211, 238, 0.6); }
.contact-box p { color: var(--muted); margin-top: 12px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 36px 0 72px; margin-top: 40px; } /* generous bottom: the vow must breathe on every page */
.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 0.85rem; }
.foot a {
  color: var(--muted); text-decoration: none; margin-right: 18px;
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.foot a::before { content: "» "; color: transparent; transition: color 0.15s; }
.foot a:hover { color: var(--cyan); }
.foot a:hover::before { color: var(--gold); }

@media (max-width: 780px) {
  .hero { flex-direction: column-reverse; padding: 48px 0; text-align: center; }
  .hero-text h1 { font-size: 2.1rem; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-img img { width: 250px; }
  .cards, .cards.three, .steps { grid-template-columns: 1fr; }
  .btn.ghost { margin-left: 0; margin-top: 10px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.78rem; letter-spacing: 0.05em; }
  /* iOS Safari auto-zooms into sub-16px inputs and stays zoomed — 16px prevents it */
  #contact-form input, #contact-form textarea { font-size: 16px; }
  #term-status { font-size: 0.76rem; white-space: pre-line; } /* smaller + one sentence per line on mobile only */
  /* wrapped nav row hugged the left edge — center header on mobile */
  .nav, .nav-links { justify-content: center; }
  /* footer: links stack, copyright, then the vow closes the page */
  .foot { justify-content: center; }
  .foot > div:first-child { width: 100%; text-align: center; order: 2; }
  .foot > div:last-of-type { order: 1; display: grid; gap: 12px; width: 100%; }
  .foot > div:last-of-type a { margin: 0; }
  .foot a::before { content: none; } /* no hover on touch — kills the off-center ghost prefix */
}

/* Dedication of merit — ॐ over faded rules, vow beneath; closes every page, both viewports */
.vow {
  width: 100%; order: 3; text-align: center;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--muted); text-wrap: balance;
}
.vow::before {
  content: "ॐ";
  display: block; margin: 16px 0 18px; color: var(--muted); font-size: 1.05rem;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3)) no-repeat left center / calc(50% - 28px) 1px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent) no-repeat right center / calc(50% - 28px) 1px;
}

/* Policy pages (dark) */
.policy { max-width: 760px; margin: 0 auto; padding: 56px 24px; }
.policy h1 { font-size: 2rem; margin-bottom: 6px; }
.policy .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 32px; }
.policy h2 { font-size: 1.25rem; margin: 30px 0 10px; }
.policy p, .policy li { color: #b8bfce; } /* reading tone: ~11:1 contrast — muted's 6.6:1 tires on long-form */
.policy ul { padding-left: 22px; margin: 10px 0; }
.policy a { color: var(--cyan); }
.policy img { max-width: 100%; height: auto; border-radius: 8px; margin: 18px 0; display: block; }

/* Contact form — raw terminal; dims until engaged */
.contact-box.terminal {
  padding: 28px 32px; text-align: left; position: relative;
  font-family: var(--mono); background: rgba(0, 0, 0, 0.7);
  opacity: 0.7; transition: opacity 0.25s ease;
}
.contact-box.terminal:hover, .contact-box.terminal:focus-within { opacity: 1; }
.term-boot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; }
.term-body { transition: filter 0.6s ease; }
.term-body.blurred { filter: blur(7px); pointer-events: none; user-select: none; }
.tline { display: flex; align-items: baseline; gap: 10px; font-size: 0.9rem; }
.tline.muted { color: var(--muted); }
#term-status { display: block; } /* \n in the boot message collapses to a space here; mobile makes it a break */
.tprompt { color: var(--cyan); white-space: nowrap; }
#contact-form { display: grid; gap: 14px; margin-top: 16px; }
#contact-form input, #contact-form textarea {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--mono); font-size: 0.9rem;
  caret-color: var(--cyan); padding: 0;
}
.tline.tblock { display: block; }
.tline.tblock textarea { display: block; width: 100%; margin-top: 8px; resize: vertical; }
.tui-btn {
  cursor: pointer; background: none; justify-self: start;
  border: 1px solid var(--gold); border-radius: 3px;
  font-family: var(--mono); font-size: 0.9rem; color: var(--gold); padding: 7px 18px;
}
.tui-btn:hover, .tui-btn:focus { background: var(--gold); color: #04060b; outline: none; }
.tui-btn:hover .cursor, .tui-btn:focus .cursor { color: #04060b; }
.cursor { display: inline-block; margin-left: 6px; color: var(--cyan); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.thint { color: var(--muted); font-size: 0.7rem; letter-spacing: 0; }
.thint-corner { position: absolute; right: 32px; bottom: 34px; transition: opacity 0.6s; }
/* hint lives outside the blurred body (filter would hijack its containing block) — hidden until boot */
.contact-box.terminal:has(.term-body.blurred) .thint-corner { opacity: 0; }
.tline.terr { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 780px) { .thint-corner { display: none; } } /* no arrow keys on touch */
/* TUI: active line glows, others dim */
#contact-form .tline { opacity: 0.55; transition: opacity 0.15s; }
#contact-form .tline:focus-within { opacity: 1; }

/* Figure notes: annotations attached to an image, distinct from body prose */
.policy .fig-note { font-family: var(--mono); font-size: 0.75rem; line-height: 1.8; color: var(--muted); border-left: 2px solid var(--border); padding-left: 12px; margin: -6px 0 22px; }

/* Amendment notes: post-publication additions, visually distinct from original prose */
.amendment { border-left: 3px solid var(--cyan); background: rgba(34, 211, 238, 0.06); padding: 10px 14px; margin: 14px 0; border-radius: 0 8px 8px 0; font-size: 0.85rem; color: var(--muted); }
.amendment .amendment-label { display: block; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; color: var(--cyan); margin-bottom: 4px; }
.policy .amendment-list { margin: 6px 0 0; padding-left: 20px; }
.policy .amendment-list li { color: var(--muted); }

/* Blog graph appendix: small horizontal reference cards, scroll if cramped */
.graph-appendix { margin: 24px 0; }
.graph-appendix .img-credit { font-size: 0.85rem; color: var(--muted); margin: 34px 0 10px; } /* big gap above each group, label snug to its strip */
.graph-appendix .img-credit:first-child { margin-top: 0; }
.graph-appendix .graph-strip + .img-credit:last-child { margin-top: 24px; } /* closing bit-rot note */
.graph-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
.graph-strip::-webkit-scrollbar { height: 6px; }
.graph-strip::-webkit-scrollbar-track { background: transparent; }
.graph-strip::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }
.graph-strip figure { flex: 0 0 166px; margin: 0; } /* 4 fit in the 712px column; scrolls on narrow screens */
.graph-strip img { width: 100%; height: auto; border-radius: 6px; margin: 0 0 4px; display: block; }
.graph-strip figcaption { font-size: 0.75rem; color: var(--muted); }
.graph-strip figure { cursor: zoom-in; }

/* Lightbox for graph cards */
.lightbox { margin: auto; border: none; border-radius: 10px; padding: 16px 16px 12px; background: #10131c; max-width: min(90vw, 820px); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.75); }
.lightbox img { max-width: 100%; max-height: 60vh; width: auto; height: auto; display: block; margin: 0 auto; border-radius: 6px; }
.lightbox__caption { color: #b8bfce; font-size: 0.9rem; margin: 10px 0 0; text-align: center; }
.lightbox__close { position: absolute; top: 10px; right: 10px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #10131c; border: 1.5px solid rgba(255, 255, 255, 0.5); color: #fff; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.lightbox__close:hover { background: #1c2233; border-color: var(--cyan); color: var(--cyan); }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 8px; }
.lightbox__nav { background: none; border: 1px solid var(--muted); border-radius: 6px; color: var(--muted); font-size: 1rem; padding: 2px 12px; cursor: pointer; }
.lightbox__nav:hover { color: var(--cyan); border-color: var(--cyan); }
.lightbox__counter { color: var(--muted); font-size: 0.8rem; }
