/* =========================================================
   Bayon Atlas — self-hosted 360° mapping platform
   A Bayon Shield Co., LTD product · dark theme, accent #870004
   ========================================================= */

:root {
  --brand: #870004;
  --brand-bright: #b8000a;
  --brand-soft: rgba(135, 0, 4, 0.14);
  --brand-line: rgba(135, 0, 4, 0.32);

  --bg: #0a0708;
  --bg-2: #120c0d;
  --bg-3: #17100f;
  --surface: #1a1213;
  --surface-2: #211617;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #f5f1f0;
  --text-muted: #a89e9d;
  --text-dim: #7c7170;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* Greedy line filling: `balance` evens out line lengths, which forces short
   full-width headings to wrap when they would otherwise fit on one line. */
h1, h2, h3, h4, .page-title, .section-head h2 { text-wrap: pretty; }
p, li, .page-lead, .section-desc { text-wrap: pretty; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Ambient background ---------- */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(135, 0, 4, 0.16), transparent 60%),
    linear-gradient(180deg, #0a0708 0%, #0a0708 40%, #0c0809 100%);
}
.bg-map { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }
.bg-map .routes path { stroke-dasharray: 6 8; animation: dash 40s linear infinite; }
.bg-map .nodes circle { animation: pulse 4s var(--ease) infinite; }
.bg-map .nodes circle:nth-child(2) { animation-delay: 0.8s; }
@keyframes dash { to { stroke-dashoffset: -280; } }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 7, 8, 0.72);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 92px; gap: 20px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 56px; width: auto; display: block; }

.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  transition: color 0.2s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--brand-bright);
  transition: width 0.25s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 7, 8, 0.96);
}
.mobile-nav a { padding: 12px 0; color: var(--text-muted); border-bottom: 1px solid var(--border); font-weight: 500; }
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav.open { display: flex; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 26px rgba(135, 0, 4, 0.4); }
.btn-primary:hover { background: var(--brand-bright); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(135, 0, 4, 0.5); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand-bright); background: var(--brand-soft); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 86px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-bright); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(184, 0, 10, 0.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(184, 0, 10, 0); } }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin-bottom: 14px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  line-height: 1.07;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 20px;
}
.page-lead { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--text-muted); margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.demo-note { margin-top: 18px; color: var(--text-dim); font-size: 0.88rem; line-height: 1.6; max-width: 52ch; }

/* ---------- Spec card ---------- */
.hero-visual { display: flex; justify-content: center; }
.spec-card {
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
/* Bayon Atlas wordmark is white artwork — only ever on the dark surfaces
   (--surface / --bg-2). Never place it on a light background. */
.spec-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin-bottom: 18px;
}
.spec-list { display: flex; flex-direction: column; }
.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { color: var(--text-dim); font-size: 0.86rem; flex: none; }
.spec-row dd { color: var(--text); font-size: 0.92rem; font-weight: 500; text-align: right; margin: 0; }
.spec-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-bright);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  padding: 3px 11px;
  border-radius: 999px;
}
.spec-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 100px) 0; position: relative; }
.section-why { background: var(--bg-2); border-top: 1px solid var(--border); }
.section-privacy { background: var(--bg); border-top: 1px solid var(--border); }
.section-operator { background: var(--bg-2); border-top: 1px solid var(--border); }
.section-tours { background: var(--bg); border-top: 1px solid var(--border); }
.section-brand { background: var(--bg-2); border-top: 1px solid var(--border); }
.section-visitor { background: var(--bg); border-top: 1px solid var(--border); }
.section-ops { background: var(--bg-2); border-top: 1px solid var(--border); }
.section-deploy { background: var(--bg); border-top: 1px solid var(--border); }
.section-cta { background: var(--bg-2); border-top: 1px solid var(--border); padding-block: clamp(40px, 6vw, 72px); }

.section-head { margin-bottom: 48px; }
.section-head .section-desc { max-width: 88ch; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 16px;
}
.section-desc { color: var(--text-muted); font-size: 1.05rem; }

/* Benefit rows */
.benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.benefit {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.benefit:hover { transform: translateY(-3px); border-color: var(--brand-line); background: var(--surface-2); }
.benefit-icon {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-bright);
}
.benefit-icon svg { width: 22px; height: 22px; }
.benefit-body h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.benefit-body p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.6; }

/* Feature cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), background 0.28s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(340px 160px at 20% 0%, rgba(135, 0, 4, 0.16), transparent 70%);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--brand-line); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-bright);
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--text-muted); font-size: 0.94rem; }

/* Privacy pipeline steps */
.step-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 20px; align-items: stretch; }
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-card--final { border-color: var(--brand-line); background: var(--surface-2); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-bright);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}
.step-num svg { width: 19px; height: 19px; }
.step-card h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.step-card p { color: var(--text-muted); font-size: 0.96rem; line-height: 1.6; }
.step-link { display: flex; align-items: center; justify-content: center; color: var(--brand-bright); opacity: 0.85; }
.step-link svg { width: 28px; height: 28px; }

.detail-list { margin-top: 36px; margin-bottom: 32px; }

/* Callouts */
.callout {
  padding: 24px 28px;
  border-left: 3px solid var(--brand);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout-spaced { margin-top: clamp(34px, 5vw, 52px); }
.callout h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.callout p { color: var(--text-muted); font-size: 0.98rem; }

/* Tick lists */
.tick-list { list-style: none; display: grid; gap: 14px; }
.tick-list li { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; color: var(--text); }
.tick-list li::before {
  content: "";
  width: 22px; height: 22px; flex: none; margin-top: 3px;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8000a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* Point lists — a lead-in on its own line, then the explanation beneath.
   These used to be tick-list items with an inline <strong>, but .tick-list li
   is a flex row, so the bold lead-in and the text after it became two flex
   items that each shrink-wrapped: two ragged columns of differing width on
   every row. Giving the lead-in its own line fixes the layout and reads far
   better at this length. */
.point-list {
  list-style: none;
  display: grid;
  gap: 26px;
  margin-top: 40px;
}
.point-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.point-list li::before {
  content: "";
  width: 22px; height: 22px; margin-top: 2px;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8000a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.point-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 7px;
}
.point-list p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 82ch;
}

/* ---------- Closing CTA band ---------- */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band-copy { flex: 1 1 500px; min-width: 0; }
.cta-band-copy .hero-cta { margin-top: 26px; }
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.cta-band p { color: var(--text-muted); max-width: 46rem; }
.cta-band p + p { margin-top: 14px; }

/* Inline code — used where the copy names a file extension or a directive. */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--text);
}
.band-logo { display: block; width: clamp(200px, 26vw, 320px); height: auto; flex: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.footer-tagline { color: var(--text-muted); font-size: 0.95rem; max-width: 40ch; }
.footer-parent {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.footer-parent a { display: inline-flex; opacity: 0.8; transition: opacity 0.2s var(--ease); }
.footer-parent a:hover { opacity: 1; }
.footer-parent img { height: 30px; width: auto; display: block; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-family: var(--font-display); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 4px; }
.footer-col a { color: var(--text-muted); font-size: 0.92rem; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--brand-bright); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { color: var(--text-dim); font-size: 0.85rem; }
.footer-bottom a { color: var(--text-muted); border-bottom: 1px solid var(--border-strong); }
.footer-bottom a:hover { color: var(--brand-bright); border-bottom-color: var(--brand); }
.footer-legal { padding-top: 12px; }
.footer-legal p { color: var(--text-dim); font-size: 0.76rem; opacity: 0.85; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .benefit-grid { grid-template-columns: 1fr; gap: 14px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .step-row { grid-template-columns: 1fr; gap: 14px; }
  .step-link { transform: rotate(90deg); padding: 4px 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .brand-logo { height: 46px; }
  .header-inner { height: 74px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { justify-content: flex-start; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; border-radius: 4px; }
