/* ─────────────────────────────────────────────
   Covenant Engine — OpenAI Aesthetic (Pure Monochrome)
   ───────────────────────────────────────────── */

:root {
  --bg:           #000000;
  --bg-2:         #0A0A0A;
  --card:         #0D0D0D;
  --card-hover:   #141414;
  --border:       #1A1A1A;
  --border-2:     #262626;
  
  --white:        #FFFFFF;
  --muted:        #8E8E93;
  --dim:          #636366;
  
  /* Pure Monochrome Hierarchy */
  --indigo:       #FFFFFF;
  --violet:       #E5E5EA;
  --emerald:      #FFFFFF;
  --cyan:         #E5E5EA;
  --amber:        #E5E5EA;
  --rose:         #FFFFFF;
  
  --accent:       #FFFFFF;
  --accent-glow:  rgba(255, 255, 255, 0.08);
  --accent-border:rgba(255, 255, 255, 0.2);
  
  --mono:         'IBM Plex Mono', monospace;
  --serif:        'Inter', -apple-system, sans-serif;
  --sans:         'Inter', -apple-system, sans-serif;
  --max:          1440px;
  --r:            10px;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: #FFFFFF; color: #000000; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout ────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 600px) { .wrap { padding: 0 20px; } }

/* ── Typography ────────────────────────────── */
h1, h2, h3 { font-family: var(--sans); color: var(--white); letter-spacing: -0.03em; line-height: 1.12; font-weight: 500; }
h1 { font-size: clamp(36px, 6vw, 68px); }
h2 { font-size: clamp(26px, 4vw, 42px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }
.label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 14px; border-radius: 20px;
  display: inline-block;
}

/* ── Buttons (OpenAI Pill Style) ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 30px; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease;
  font-family: var(--sans); white-space: nowrap;
}
.btn-primary {
  background: #FFFFFF;
  color: #000000; font-weight: 500;
}
.btn-primary:hover { background: #E5E5EA; transform: translateY(-1px); }

.btn-ghost {
  border-color: #262626; color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #FFFFFF; color: #FFFFFF; transform: translateY(-1px); }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── Navigation ────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #1A1A1A;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; height: 64px; gap: 40px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; color: var(--white);
  flex-shrink: 0; z-index: 110; letter-spacing: -0.02em;
}
.logo-glyph {
  width: 28px; height: 28px;
  background: #FFFFFF;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  color: #000000; flex-shrink: 0;
}
.logo-glyph svg { display: block; stroke: #000000; }

.nav-links {
  display: flex; gap: 6px; list-style: none; flex: 1;
}
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 8px 14px; border-radius: 6px; transition: all 0.2s ease;
}
.nav-links a:hover { color: var(--white); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--white); background: rgba(255, 255, 255, 0.08); }

.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* ── Hamburger Menu ────────────────────────── */
.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  width: 40px; height: 40px; background: #0D0D0D; border: 1px solid #262626;
  border-radius: 8px; cursor: pointer; gap: 5px; margin-left: auto; z-index: 110;
}
.hamburger span {
  display: block; width: 18px; height: 1.5px; background: var(--muted);
  border-radius: 2px; transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--white); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--white); }

.mobile-nav {
  display: none; position: fixed; inset: 64px 0 0 0;
  background: var(--bg); z-index: 99; padding: 24px;
  flex-direction: column; gap: 6px; border-top: 1px solid var(--border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 16px; font-weight: 500; color: var(--muted);
  padding: 14px 16px; border-radius: 8px; border: 1px solid transparent;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--white); background: var(--card); border-color: var(--border-2); }
.mobile-nav-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.mobile-nav-footer .btn { width: 100%; justify-content: center; }

@media (max-width: 720px) {
  .nav-links, .nav-right { display: none; }
  .hamburger { display: flex; }
  .nav-inner { padding: 0 20px; }
}

/* ── Page Hero ─────────────────────────────── */
.page-hero { padding: 90px 0 56px; }
.page-hero .label { margin-bottom: 20px; }
.page-hero h1 { max-width: 1100px; margin: 20px auto; }
.page-hero p { font-size: 18px; color: #8E8E93; max-width: 780px; margin: 0 auto; line-height: 1.7; }

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 32px;
  transition: all 0.25s ease;
}
.card:hover { border-color: var(--border-2); background: var(--card-hover); }

/* ── Terminal (Monochrome Dark) ────────────── */
.terminal {
  background: #080808; border: 1px solid #1F1F1F;
  border-radius: var(--r); overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; background: #0E0E0E;
  border-bottom: 1px solid #1A1A1A;
}
.t-dot { width: 9px; height: 9px; border-radius: 50%; background: #333333; }
.t-title { margin-left: 10px; font-family: var(--mono); font-size: 11.5px; color: #8E8E93; }
.terminal-body {
  padding: 24px; font-family: var(--mono); font-size: 12.5px;
  line-height: 1.85; min-height: 160px;
}
.t-cmd  { color: #FFFFFF; font-weight: 500; }
.t-ok   { color: #10B981; font-weight: 600; }
.t-info { color: #FFFFFF; }
.t-val  { color: #FFFFFF; font-weight: 500; }
.t-dim  { color: #A1A1AA; }
.t-warn { color: #FFFFFF; font-weight: 500; }
.t-dot:nth-child(1) { background: #FF5F56 !important; }
.t-dot:nth-child(2) { background: #FFBD2E !important; }
.t-dot:nth-child(3) { background: #27C93F !important; }

/* ── Pills & Badges ────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--white); background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Feature List ──────────────────────────── */
.feat-list { list-style: none; margin-top: 20px; }
.feat-list li {
  padding: 12px 0; border-top: 1px solid var(--border);
  font-size: 14px; display: flex; align-items: center; gap: 12px;
}
.feat-list li::before {
  content: '—'; color: var(--white); font-family: var(--sans); font-weight: 600; flex-shrink: 0;
}

/* ── Footer (OpenAI Style Grid) ────────────── */
footer {
  border-top: 1px solid var(--border); margin-top: 120px;
  padding: 80px 0 60px; background: #000000;
}
.footer-cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 60px;
}
@media (max-width: 860px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-cols { grid-template-columns: 1fr; gap: 28px; } }

.footer-about p { font-size: 13.5px; color: var(--dim); max-width: 260px; margin-top: 12px; line-height: 1.7; }
.footer-col h5 { font-size: 12px; color: var(--white); font-weight: 500; margin-bottom: 16px; font-family: var(--sans); letter-spacing: -0.01em; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 13.5px; color: var(--muted); transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px; padding-top: 36px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--dim);
}
.reg-block { font-family: var(--mono); font-size: 11px; color: var(--dim); line-height: 1.75; text-align: right; }
.reg-block strong { color: var(--white); }

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }



/* Apple-style Glassmorphism Modal */
#global-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
#global-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
#global-modal {
  width: 320px;
  height: 320px;
  background: rgba(20, 20, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
#global-modal-overlay.show #global-modal {
  transform: scale(1);
}
.modal-sparkle {
  font-size: 42px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
.modal-title {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.modal-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: #8E8E93;
  line-height: 1.5;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 14px;
  transition: background 0.2s;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}