/* ═══════════════════════════════════════
   JIBO — Issuance Intelligence
   GhostFire Digital · Mint-to-Deploy™
   THE Final Build
═══════════════════════════════════════ */

/* ─────────── ROOT ─────────── */
:root {
  --bg-main:    #050607;
  --bg-alt:     #0b0d10;
  --bg-card:    #0f1217;
  --bg-dark:    #020304;

  --text-primary:   #f2f4f8;
  --text-secondary: #b5bcc8;
  --text-muted:     #7a8392;

  --accent:      #d4af37;
  --accent-soft:  rgba(212,175,55,0.12);
  --accent-glow:  rgba(212,175,55,0.25);

  --border-subtle: rgba(255,255,255,0.07);
  --border-accent: rgba(212,175,55,0.25);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-width: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Cinzel', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* ─────────── RESET ─────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #090b0d;
}

*::-webkit-scrollbar {
  width: 12px;
}

*::-webkit-scrollbar-track {
  background: #090b0d;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e6c76b, #b9972e);
  border-radius: 999px;
  border: 2px solid #090b0d;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f0d987, #c6a544);
}

body {
  font-family: var(--font-body);
  background:
    linear-gradient(rgba(5,6,7,0.93), rgba(5,6,7,0.93)),
    url("images/contact-bg.png") center / cover no-repeat fixed;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─────────── SECTIONS ─────────── */
section { padding: 6rem 1.5rem; }

.section-cin-1 {
  background:
    linear-gradient(rgba(11,13,16,0.94), rgba(11,13,16,0.94)),
    url("images/system.png") center / cover no-repeat;
}

.section-cin-2 {
  background: var(--bg-alt);
}

.section-contact {
  background:
    linear-gradient(rgba(2,3,4,0.92), rgba(2,3,4,0.92)),
    url("images/contact.png") center / cover no-repeat;
}

.section-inner { max-width: var(--max-width); margin: 0 auto; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ─────────── TYPOGRAPHY ─────────── */
h1, h2, h3, h4 {
  line-height: 1.15;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}
h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.35rem; }
p  { color: var(--text-secondary); }

strong { color: var(--text-primary); font-weight: 600; }
em     { color: var(--accent); font-style: normal; }

.section-kicker {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}

.section-lead {
  max-width: 720px; margin-bottom: 3rem;
  font-size: 1.05rem; line-height: 1.7;
}

/* ─────────── NAV ─────────── */
.nav-shell {
  position: sticky; top: 0; z-index: 999;
  background: rgba(5,6,7,0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.3s var(--ease);
}

.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-logo {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  gap: 0.08rem;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.66rem;
  color: #7f8591;
  letter-spacing: 0.03em;
  line-height: 1;
}

.nav-links { display: flex; gap: 1.6rem; }

.nav-links a {
  font-size: 0.78rem; font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
  position: relative;
}

.nav-links a:hover { color: var(--accent); }

.nav-links a::after {
  content: ""; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle,
.mobile-nav {
  display: none;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 18, 23, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-shell.menu-open .nav-toggle {
  border-color: var(--border-accent);
  background: rgba(20, 15, 6, 0.95);
}

.nav-shell.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-shell.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-shell.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease), padding 0.25s var(--ease);
}

.mobile-nav a {
  display: block;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.mobile-nav a:hover {
  color: var(--accent);
}

.mobile-nav .mobile-cta {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  width: 100%;
  border-top: none;
}

.nav-shell.menu-open .mobile-nav {
  max-height: 520px;
  opacity: 1;
  pointer-events: auto;
  padding-top: 0.2rem;
  padding-bottom: 1rem;
}

/* ─────────── BUTTONS ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.4rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.82rem;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
  cursor: pointer; letter-spacing: 0.02em;
}

.btn-primary {
  background: linear-gradient(135deg, #e6c76b, #b9972e);
  color: #111;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-secondary {
  border: 1px solid var(--border-subtle);
  color: var(--text-primary); background: transparent;
}
.btn-secondary:hover {
  border-color: var(--accent); color: var(--accent);
}

.btn-sm  { padding: 0.5rem 1rem; font-size: 0.75rem; margin-top: 1rem; }
.btn-lg  { padding: 0.9rem 2.2rem; font-size: 0.9rem; letter-spacing: 0.06em; }

/* ─────────── HERO ─────────── */
.hero {
  padding: 1.25rem 1.5rem 2.5rem;
  min-height: 85vh;
  display: flex; align-items: center;
}

.hero-inner {
  max-width: var(--max-width); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.3fr 0.7fr;
  gap: 4rem; align-items: center;
}

.hero-kickers {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.4rem;
}

.kicker {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 50px;
}
.kicker.accent {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border-accent);
}
.kicker.ghost {
  color: var(--text-muted); border: 1px solid var(--border-subtle);
}

.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
}

.hero h1 {
  background: linear-gradient(135deg, #f2f4f8 40%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 0.3rem;
}

.hero-sub {
  max-width: 640px; margin-top: 0.8rem; margin-bottom: 1.8rem;
  font-size: 1.02rem; line-height: 1.7;
}

.hero-ctas { display: flex; gap: 1rem; margin-bottom: 1.6rem; }

.hero-proof { display: flex; gap: 2.2rem; }
.proof-item { display: flex; flex-direction: column; gap: 3px; }
.proof-label {
  font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--text-muted); font-weight: 600;
}
.proof-value { font-size: 0.76rem; color: var(--text-secondary); font-weight: 500; }

/* ─────────── ORB ─────────── */
.hero-visual {
  --hero-lift: -2rem;
  --parallax-x: 0px;
  --parallax-y: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translate(var(--parallax-x), calc(var(--hero-lift) + var(--parallax-y)));
}

.hero-logo-wrap {
  width: min(500px, 96%);
  aspect-ratio: 1 / 1;
  position: relative;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-wrap::before,
.hero-logo-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-logo-wrap::before {
  inset: -10px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.15) inset,
    0 0 34px rgba(212, 175, 55, 0.22);
  animation: hero-ring-spin 18s linear infinite;
}

.hero-logo-wrap::after {
  inset: -24px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.04) 45%, transparent 72%);
  z-index: -1;
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow:
    0 12px 44px rgba(0, 0, 0, 0.5),
    0 0 46px rgba(212, 175, 55, 0.14);
}

@keyframes hero-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ─────────── PROBLEM ─────────── */
.problem-narrative { max-width: 800px; margin-bottom: 3rem; }
.problem-narrative p { margin-bottom: 1rem; font-size: 1rem; line-height: 1.75; }

.risk-card { position: relative; overflow: hidden; }
.risk-card::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
}
.card-icon { font-size: 1.4rem; margin-bottom: 0.75rem; color: var(--accent); opacity: 0.6; }

/* ─────────── SYSTEM STEPS ─────────── */
.system-steps { display: flex; flex-direction: column; max-width: 800px; }

.step {
  display: grid; grid-template-columns: 60px 1fr; gap: 1.5rem;
  padding: 1.8rem 0; border-bottom: 1px solid var(--border-subtle);
  align-items: start;
}
.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  color: var(--accent); padding-top: 0.15rem; opacity: 0.6;
}
.step-content h3 { margin-bottom: 0.45rem; }
.step-content p  { font-size: 0.92rem; line-height: 1.65; }

/* ─────────── CAPABILITIES ─────────── */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.cap-card { padding: 1.8rem; transition: border-color 0.3s var(--ease); }
.cap-card:hover { border-color: var(--border-accent); }
.cap-card h4 { color: var(--text-primary); margin-bottom: 0.5rem; }
.cap-card p  { font-size: 0.88rem; line-height: 1.65; }

/* ─────────── ARCHITECTURE FLOW ─────────── */
.arch-flow {
  display: flex; align-items: stretch; gap: 0;
  margin-bottom: 3.5rem;
}

.arch-node {
  flex: 1; padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease);
}
.arch-node:hover { border-color: var(--border-accent); }

.arch-node-core {
  border-color: var(--border-accent);
  background:
    radial-gradient(ellipse at center, rgba(212,175,55,0.04), transparent 70%),
    var(--bg-card);
}

.arch-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
}

.arch-node p { font-size: 0.88rem; line-height: 1.6; }

.arch-arrow {
  display: flex; align-items: center; justify-content: center;
  padding: 0 1rem; color: var(--accent); font-size: 1.4rem;
  opacity: 0.4; font-weight: 300;
}

/* 9-Layer Stack */
.layer-section { margin-top: 0; }
.layer-section h3 {
  font-size: 1.12rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: 0.015em;
}

.layer-subline {
  max-width: 760px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  border-left: 2px solid var(--border-accent);
  padding-left: 0.8rem;
  margin-bottom: 1.35rem;
}

.layer-grid { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.25rem; }

.layer-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  transition: border-color 0.25s var(--ease);
}
.layer-chip:hover { border-color: var(--border-accent); }

.layer-n {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  color: var(--accent); padding: 0.15rem 0.4rem;
  background: var(--accent-soft); border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ─────────── MODULE LIST ─────────── */
.api-list { display: flex; flex-direction: column; gap: 0.8rem; }

.api-item {
  display: grid; grid-template-columns: auto 240px 1fr;
  gap: 1rem; align-items: center;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: border-color 0.25s var(--ease);
}
.api-item:hover { border-color: var(--border-accent); }

.method {
  font-size: 0.6rem; font-weight: 700;
  padding: 0.3rem 0.55rem; border-radius: 4px;
  letter-spacing: 0.06em; font-family: var(--font-mono);
  white-space: nowrap;
}
.method.post { background: rgba(40,167,69,0.12); color: #6dd89e; }
.method.get  { background: rgba(0,123,255,0.12); color: #7bb6ff; }
.method.mod  { background: var(--accent-soft); color: var(--accent); }

.api-item code {
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--accent); font-weight: 500;
}
.api-item p { font-size: 0.85rem; margin: 0; line-height: 1.55; }

/* ─────────── TIERS ─────────── */
.tier-section { margin-top: 3rem; }
.tier-section h3 {
  font-size: 1.1rem; margin-bottom: 1.2rem; color: var(--text-primary);
}

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.tier-card {
  padding: 1.8rem; background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease);
}
.tier-card:hover { border-color: var(--border-accent); }

.tier-card.tier-featured {
  border-color: var(--border-accent);
  background:
    radial-gradient(ellipse at top, rgba(212,175,55,0.05), transparent 60%),
    var(--bg-card);
}

.tier-name { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); }
.tier-featured .tier-name { color: var(--accent); }
.tier-detail { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ─────────── GRIDS ─────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ─────────── CARDS ─────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: border-color 0.3s var(--ease);
}
.card:hover { border-color: rgba(255,255,255,0.11); }
.card.subtle  { padding: 1.5rem; }
.card.emphasis { border-color: var(--border-accent); }
.card h3 { color: var(--text-primary); }
.card h4 { color: var(--text-primary); }
.card p  { font-size: 0.9rem; line-height: 1.65; }

.integration-card { display: flex; flex-direction: column; }
.integration-card p { flex: 1; }

/* ─────────── CONTACT ─────────── */
#contact h2 { position: relative; }
#contact h2::after {
  content: ""; display: block;
  width: 64px; height: 2px;
  margin: 1rem auto 0;
  background: var(--accent); opacity: 0.5;
}

/* ─────────── FOOTER ─────────── */
.footer {
  padding: 3.5rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-dark);
}

.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; flex-direction: column;
  align-items: center; gap: 1.2rem; text-align: center;
}

.footer-logo {
  width: 80px; height: auto; opacity: 0.8;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}

.footer-brand {
  font-weight: 800; font-size: 0.9rem;
  letter-spacing: 0.14em; color: var(--text-muted);
}

.footer-text {
  font-size: 0.65rem; line-height: 1.8;
  color: var(--text-muted); letter-spacing: 0.03em;
}

.footer-nowrap {
  display: inline-block;
  white-space: nowrap;
}

/* ─────────── BACK TO TOP ─────────── */
#backToTop {
  position: fixed; bottom: 28px; right: 28px;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #e6c76b, #b9972e);
  color: #111; font-size: 1rem; font-weight: 700;
  border: none; cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
#backToTop.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#backToTop:hover { transform: translateY(-2px); box-shadow: 0 12px 36px var(--accent-glow); }

/* ─────────── REVEALED ─────────── */
.revealed { opacity: 1 !important; transform: translateY(0) !important; }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { order: -1; }
  .hero-logo-wrap { width: min(380px, 84vw); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .arch-flow { flex-direction: column; gap: 1rem; }
  .arch-arrow { transform: rotate(90deg); padding: 0.5rem 0; }
}

@media (max-width: 900px) {
  section { padding: 4rem 1.25rem; }
  .hero { min-height: auto; padding: 1.25rem 1.25rem 2.25rem; }
  .grid-2, .grid-3, .cap-grid, .tier-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav { display: block; }
  .nav-logo { width: 34px; height: 34px; }
  .brand-mark { font-size: 0.95rem; }
  .brand-sub { font-size: 0.58rem; }
  .api-item { grid-template-columns: auto 1fr; gap: 0.75rem; }
  .api-item p { grid-column: 1 / -1; }
  .hero-proof { flex-direction: column; gap: 1rem; }
}

@media (max-width: 600px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.5rem; }
  .hero-visual { --hero-lift: -1rem; }
  .hero-logo-wrap { width: min(320px, 88vw); }
  .hero-kickers { flex-direction: column; gap: 0.5rem; }
  .hero-ctas { flex-direction: column; }
  .layer-chip { font-size: 0.72rem; padding: 0.4rem 0.7rem; }
  .step { grid-template-columns: 44px 1fr; gap: 1rem; }
}
