/* ═══════════════════════════════════════════════
   style.css — Shared: reset, variables, nav, footer
   OpenRelay · FIKSI 2026
═══════════════════════════════════════════════ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,400&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --bg:           #070a0f;
  --bg2:          #0d1117;
  --bg3:          #131a23;
  --bg4:          #1a2232;

  --amber:        #f59e0b;
  --amber2:       #fbbf24;
  --amber3:       #d97706;
  --amber-dim:    rgba(245, 158, 11, 0.12);
  --amber-glow:   rgba(245, 158, 11, 0.25);
  --amber-grain:    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  --noise-opacity:  0.05;

  --green:        #22c55e;
  --green-dim:    rgba(34, 197, 94, 0.12);
  --blue:         #38bdf8;
  --blue-dim:     rgba(56, 189, 248, 0.12);
  --red:          #ef4444;

  --text:         #e2e8f0;
  --text-dim:     #64748b;
  --text-muted:   #334155;
  --text-bright:  #f8fafc;

  --border:       rgba(245, 158, 11, 0.12);
  --border2:      rgba(245, 158, 11, 0.28);
  --border3:      rgba(245, 158, 11, 0.45);

  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --radius-full:  9999px;

  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:    0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-amber: 0 0 24px rgba(245, 158, 11, 0.2);

  --nav-h:        64px;
  --transition:   0.2s ease;
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 {
  font-family: 'Chakra Petch', monospace;
  line-height: 1.15;
  color: var(--text-bright);
}

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

img, svg { display: block; max-width: 100%; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber3); }

/* ── CIRCUIT GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(7, 10, 15, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.08);
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 34px; height: 34px;
  background: var(--amber);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-mark svg {
  width: 20px; height: 20px;
}

.nav-brand {
  font-family: 'Chakra Petch', monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links li a {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
  transition: color var(--transition), background var(--transition);
}

.nav-links li a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav-links li a.active {
  color: var(--amber);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.nav-cta-wrap {
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--amber), var(--amber2));
  color: #07090f;
  font-family: 'Chakra Petch', monospace;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--amber2), var(--amber));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.nav-cta svg { width: 14px; height: 14px; }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-mobile-menu a:hover { color: var(--amber); background: var(--amber-dim); }
.nav-mobile-menu a.active { color: var(--amber); }

.nav-mobile-menu .nav-cta {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

/* ── MAIN CONTENT OFFSET ── */
.page-main {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
}

/* ── SHARED SECTION ── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 24px;
}

.section-tag {
  font-family: 'Chakra Petch', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text-bright);
  margin-bottom: 18px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 580px;
  line-height: 1.75;
}

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border2) 30%, var(--border2) 70%, transparent 100%);
  position: relative;
  z-index: 1;
}

/* ── SHARED BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-family: 'Chakra Petch', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--amber3));
  color: #07090f;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--amber2), var(--amber));
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}

.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border2);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
}

/* ── SHARED CARD ── */
.card {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.card:hover {
  border-color: var(--amber2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(245, 158, 11, 0.08);
}

.card-top-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.5;
  z-index: 2;
}

.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 5;
}

/* ── HUD & ATMOSPHERE ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--amber-grain);
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: overlay;
  animation: noiseAnimation 0.2s infinite steps(2);
}

@keyframes noiseAnimation {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-1%, -1%); }
  20% { transform: translate(-2%, 1%); }
  30% { transform: translate(1%, -2%); }
  40% { transform: translate(-1%, 3%); }
  50% { transform: translate(-2%, 1%); }
  60% { transform: translate(3%, 2%); }
  70% { transform: translate(1%, 2%); }
  80% { transform: translate(-1%, -2%); }
  90% { transform: translate(-3%, 1%); }
  100% { transform: translate(2%, 3%); }
}

.hud-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

.hud-bracket {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--amber);
  opacity: 0.4;
}

.bracket-tl { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.bracket-tr { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.bracket-bl { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.bracket-br { bottom: 20px; right: 20px; border-left: none; border-top: none; }

.scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0.15;
  z-index: 10001;
  pointer-events: none;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { top: -10%; }
  100% { top: 110%; }
}

.glitch-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glitch-reveal.visible {
  opacity: 1;
  transform: none;
  animation: glitch-flicker 0.3s ease-out;
}

@keyframes glitch-flicker {
  0% { opacity: 0.5; transform: translateX(-2px); }
  20% { opacity: 1; transform: translateX(2px); }
  40% { opacity: 0.8; transform: translateX(-1px); }
  60% { opacity: 1; transform: translateX(0); }
  100% { opacity: 1; }
}

/* ── BADGE / CHIP ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: 'Chakra Petch', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.badge-amber {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: var(--border2);
}

.badge-green {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34,197,94,0.25);
}

.badge-blue {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(56,189,248,0.25);
}

/* ── DOT INDICATOR ── */
.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: dot-blink 2s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── FOOTER ── */
footer.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 0 48px;
}

.footer-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .nav-logo { margin-bottom: 14px; }

.footer-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 240px;
}

.footer-col-title {
  font-family: 'Chakra Petch', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links-list a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer-links-list a:hover { color: var(--amber); }

.footer-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.footer-spec-row:last-child { border-bottom: none; }
.footer-spec-key { color: var(--text-dim); }
.footer-spec-val {
  font-family: 'Chakra Petch', monospace;
  color: var(--amber);
  font-size: 11px;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-bottom-links a:hover { color: var(--amber); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav.site-nav { padding: 0 20px; }
  .nav-links, .nav-cta-wrap { display: none; }
  .nav-hamburger { display: flex; }

  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  footer.site-footer { padding: 0 20px; }
}

@media (max-width: 600px) {
  .section-inner { padding: 64px 20px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
