/* ============================================================
   MAPTECH GLOBAL — public home page ("Midnight")
   Self-contained: the home page loads only this stylesheet.
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #07090F; --panel: #0D111B; --panel-2: #121828;
  --line: #1C2334; --line-2: #283149;
  --ink: #EEF1F8; --ink-2: #A9B1C6; --ink-3: #7C85A2;
  --gold: #E6AE2E; --gold-2: #F5CD6E; --blue: #4F8BFF;
  --ok: #34D399; --warn: #FBBF24; --bad: #F87171;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  /* legacy name kept for any inline style="var(--edge)" */
  --edge: var(--line);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; } }
body { font: 16px/1.55 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid rgba(79,139,255,.7); outline-offset: 2px; }
::selection { background: rgba(230,174,46,.35); }
h1, h2, h3, h4 { text-wrap: balance; }

/* ── Buttons ───────────────────────────── */
.btn-gold, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 8px;
  font: 600 .88rem/1 var(--font); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; touch-action: manipulation;
  transition: transform 160ms var(--ease-out), filter 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.btn-gold:active, .btn-line:active { transform: scale(.97); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1A1203; box-shadow: 0 0 0 1px rgba(245,205,110,.5) inset, 0 8px 24px -8px rgba(230,174,46,.55); }
.btn-line { background: var(--panel); color: var(--ink); border-color: var(--line-2); font-weight: 500; }
@media (hover: hover) and (pointer: fine) {
  .btn-gold:hover { filter: brightness(1.05); }
  .btn-line:hover { border-color: #3A4563; }
}
.btn-lg { height: 46px; padding: 0 22px; font-size: .95rem; }

/* ── Nav ───────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(7,9,15,.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 200ms ease, background-color 200ms ease; padding-top: env(safe-area-inset-top, 0px); }
.nav.scrolled { border-bottom-color: var(--line); background: rgba(7,9,15,.88); }
.nav-row { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .98rem; letter-spacing: -.01em; }
.logo-badge { display: inline-flex; overflow: hidden; border-radius: 8px; background: #0B1530; box-shadow: 0 0 0 1px rgba(230,174,46,.35); flex-shrink: 0; }
.logo-badge video, .logo-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-badge-sm { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--ink-2); font-size: .9rem; transition: color 150ms ease; }
.nav-links a.active, .nav-links a:hover { color: var(--ink); }
.nav-links .drawer-only { display: none; }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.hamburger { display: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.hamburger span { display: block; width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform 220ms var(--ease-out), opacity 150ms ease; }
.hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.nav-backdrop { display: none; }
@media (max-width: 920px) {
  .hamburger { display: flex; }
  .hide-sm { display: none !important; }
  .nav-links {
    position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-bottom: 1px solid var(--line);
    transform-origin: top center; transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 220ms var(--ease-out), opacity 180ms ease, visibility 220ms;
    z-index: 60;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-links a { height: 46px; font-size: 1rem; }
  .nav-links .drawer-only { display: inline-flex; }
  .nav-links .drawer-cta { margin-top: 10px; height: 46px; justify-content: center; color: #1A1203; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(3,5,10,.55); z-index: 40; opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 200ms; display: block; top: calc(64px + env(safe-area-inset-top, 0px)); }
  .nav-backdrop.show { opacity: 1; visibility: visible; }
}

/* ── Hero ──────────────────────────────── */
.hero { position: relative; overflow: hidden; padding-bottom: 40px; }
.hero::before { content: ""; position: absolute; left: 50%; top: -360px; width: 1200px; height: 760px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(79,139,255,.22), transparent 70%), radial-gradient(closest-side at 70% 60%, rgba(230,174,46,.16), transparent 70%); }
.hero-grid { position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 100%); }
.hero-inner { position: relative; text-align: center; max-width: 900px; padding-top: 88px; padding-bottom: 36px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(13,17,27,.8); font-size: .8rem; color: var(--ink-2); }
.status-pill b { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); flex-shrink: 0; }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.8rem); line-height: 1; letter-spacing: -.045em; font-weight: 600; margin: 24px 0 18px;
  background: linear-gradient(180deg, #fff 35%, #9AA3BD); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.1rem; color: var(--ink-2); max-width: 36em; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-login { margin-top: 16px; font-size: .92rem; color: var(--ink-2); text-align: center; }
.hero-login a { color: var(--gold-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 920px) { .nav-login { height: 40px; padding: 0 14px; } }
@media (max-width: 360px) { .nav-login { padding: 0 10px; font-size: .82rem; } }

.term { position: relative; max-width: 940px; margin: 8px auto 0; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(18,24,40,.92), rgba(13,17,27,.96)); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .76rem; color: var(--ink-3); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.term-bar span { margin-left: auto; }
.term-feed { padding: 6px 0; }
.term-line { display: grid; grid-template-columns: 76px 26px 1fr 96px 110px; gap: 12px; align-items: center; padding: 10px 16px; font-size: .88rem;
  animation: lineIn 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
.term-line img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.term-line .r { text-align: right; }
@keyframes lineIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: .74rem; border: 1px solid; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); border-color: rgba(52,211,153,.25); background: rgba(52,211,153,.08); }
.pill.warn { color: var(--warn); border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.08); }
.pill.bad { color: var(--bad); border-color: rgba(248,113,113,.25); background: rgba(248,113,113,.08); }
@media (max-width: 920px) {
  .hero-inner { padding-top: 48px; }
  .term-line { grid-template-columns: 26px 1fr auto; font-size: .84rem; }
}

/* ── Stats ─────────────────────────────── */
.stats-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); margin-top: 32px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-row > div { padding: 26px 24px; border-left: 1px solid var(--line); }
.stats-row > div:first-child { border-left: 0; }
.stat-num { font-size: 1.9rem; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .84rem; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 720px) { .stats-row { grid-template-columns: 1fr 1fr; } .stats-row > div:nth-child(3) { border-left: 0; } .stats-row > div:nth-child(n+3) { border-top: 1px solid var(--line); } .stats-row > div { padding: 20px 16px; } }

/* ── Sections ──────────────────────────── */
.sec { padding: 88px 0; }
.sec-alt { background: linear-gradient(180deg, rgba(13,17,27,.6), transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 620px; margin-bottom: 36px; }
.eyebrow { display: block; font-size: .8rem; color: var(--gold-2); margin-bottom: 10px; }
.sec-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; }
.sec-head p { color: var(--ink-2); margin-top: 10px; font-size: 1.02rem; }

.tools { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); gap: 1px; }
.tool { background: var(--bg); padding: 26px 24px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; transition: background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .tool:hover { background: #0A0D16; } }
.tool-tag { font-size: .76rem; color: var(--gold-2); }
.tool h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.015em; }
.tool p { color: var(--ink-2); font-size: .92rem; }
.tool-mini { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: .8rem; color: var(--ink-2); }
.tool-mini span:first-child { display: flex; align-items: center; gap: 6px; }
.tool-mini img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; }
@media (max-width: 900px) { .tools { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tools { grid-template-columns: 1fr; } .tool { min-height: 0; } }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { position: relative; padding: 22px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.steps li span { color: var(--gold-2); font-size: .8rem; }
.steps h4 { font-size: 1rem; font-weight: 600; margin: 12px 0 4px; }
.steps p { color: var(--ink-2); font-size: .9rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.grow-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-bottom: 18px; max-width: 100%; overflow-x: auto; }
.grow-tab-btn { height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--ink-3); font: 500 .88rem/1 var(--font); cursor: pointer; white-space: nowrap; transition: color 150ms ease, background-color 150ms ease; }
.grow-tab-btn.active { background: var(--panel-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.grow-panel { display: none; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: stretch; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(120% 90% at 100% 0%, rgba(230,174,46,.10), transparent 55%), var(--panel); }
.grow-panel.active { display: grid; animation: lineIn 260ms var(--ease-out); }
.grow-panel h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.025em; }
.grow-panel .desc { color: var(--ink-2); margin: 8px 0 16px; max-width: 34em; }
.grow-list { list-style: none; display: grid; gap: 8px; margin-bottom: 22px; }
.grow-list li { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-2); }
.grow-list li::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: rgba(230,174,46,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5CD6E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat; flex-shrink: 0; }
.grow-visual { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); display: grid; align-content: center; }
.grow-visual div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; }
.grow-visual div:last-child { border-bottom: 0; }
.grow-visual b { color: var(--ink); font-size: 1.2rem; font-weight: 600; }
@media (max-width: 760px) { .grow-panel { grid-template-columns: 1fr; padding: 20px; } }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quotes figure { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 18px; }
.quotes blockquote { font-size: 1.02rem; line-height: 1.5; color: var(--ink); }
.quotes figcaption { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: .84rem; color: var(--ink-3); }
.quotes figcaption b { display: block; color: var(--ink); font-weight: 500; }
.quotes .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .76rem; font-weight: 600; color: #1A1203; background: linear-gradient(135deg, var(--gold-2), #7C5A10); flex-shrink: 0; }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }

.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: start; }
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 2px; font-weight: 500; font-size: 1.02rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--mono); color: var(--ink-3); font-size: 1.1rem; transition: transform 200ms var(--ease-out); }
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--gold-2); }
.faq-body { padding: 0 2px 20px; color: var(--ink-2); max-width: 44em; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: 0; } }

.cta-final { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px; border: 1px solid var(--line-2); border-radius: 16px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(230,174,46,.16), transparent 55%), radial-gradient(80% 120% at 0% 100%, rgba(79,139,255,.14), transparent 60%), var(--panel); }
.cta-final h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; letter-spacing: -.035em; }
.cta-final p { color: var(--ink-2); margin-top: 6px; }
.cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .cta-final { padding: 26px 20px; } .cta-btns, .cta-btns a { width: 100%; } }

/* ── Footer ────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 56px 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.foot .desc { color: var(--ink-3); font-size: .9rem; margin-top: 10px; max-width: 26em; }
.foot h5 { font-size: .8rem; font-weight: 500; color: var(--ink-3); margin-bottom: 12px; }
.foot ul { list-style: none; display: grid; gap: 8px; }
.foot ul a { color: var(--ink-2); font-size: .9rem; }
.foot ul a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand-col { grid-column: 1 / -1; } }

/* ── Flash (from public layout) ────────── */
.home-flash { padding: 12px 16px; border-radius: 10px; font-size: .9rem; border: 1px solid; background: var(--panel); box-shadow: 0 20px 40px -12px rgba(0,0,0,.6); animation: lineIn 300ms var(--ease-out); }
.home-flash-success { color: var(--ok); border-color: rgba(52,211,153,.35); }
.home-flash-danger  { color: var(--bad); border-color: rgba(248,113,113,.35); }

/* ── Logo intro splash ─────────────────── */
.logo-splash { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: #030712; opacity: 0; transition: opacity .5s ease; }
.logo-splash.show { display: flex; opacity: 1; }
.logo-splash.hide { opacity: 0; }
.logo-splash video { width: 100%; height: 100%; object-fit: cover; }
@media (orientation: portrait), (max-width: 700px) { .logo-splash video { object-fit: contain; } }
.logo-splash-skip { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); right: 28px; background: rgba(13,17,27,.8); border: 1px solid var(--line-2); color: var(--ink-2); font: 500 .8rem/1 var(--font); height: 34px; padding: 0 16px; border-radius: 999px; cursor: pointer; }
