/* ═══════════════════════════════════════════════════════════
   ARCHAEUS — Global Styles
   Coffee-shop warm dark aesthetic
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:         #1C1610;
  --bg-2:       #241C12;
  --bg-3:       #2E2416;
  --surface:    #382C18;
  --surface-2:  #423220;
  --surface-3:  #4E3D28;
  --border:     #4A3C28;
  --border-2:   #5C4E32;

  --text:       #E8D5B0;
  --text-2:     #C4A878;
  --text-3:     #8C7A58;

  --accent:     #C8A96E;
  --accent-2:   #d9b87a;
  --accent-dim: rgba(200, 169, 110, 0.12);
  --accent-glow:rgba(200, 169, 110, 0.08);

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --font:       'Inter', sans-serif;
  --mono:       'JetBrains Mono', monospace;

  --nav-h:      64px;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.6;
}

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

img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

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

/* ── SELECTION ───────────────────────────────────────────── */
::selection { background: rgba(200, 169, 110, 0.3); color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 48px;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

nav.scrolled {
  background: rgba(17, 16, 9, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

.nav-logo svg,
.nav-logo img {
  flex-shrink: 0;
}

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

.nav-links a {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

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

.nav-cta {
  margin-left: 20px;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0f0c07;
}

.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(200, 169, 110, 0.25);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--surface);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT UTILITIES
═══════════════════════════════════════════════════════════ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 40px;
}

section {
  padding: 100px 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 { font-size: clamp(48px, 7vw, 88px); }
h2 { font-size: clamp(32px, 4vw, 52px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 18px; }

p { color: var(--text-2); }

.text-accent { color: var(--accent-2); }
.text-muted  { color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-2);
}

.card h4 {
  color: var(--text);
  margin-bottom: 10px;
}

.card p {
  font-size: 14px;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   GRID SYSTEMS
═══════════════════════════════════════════════════════════ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .container, .container-narrow { padding: 0 20px; }
  nav { padding: 0 20px; }
  section { padding: 70px 0; }
}

/* ═══════════════════════════════════════════════════════════
   SEPARATOR
═══════════════════════════════════════════════════════════ */

.sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */

footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-3);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-2);
}

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

/* ═══════════════════════════════════════════════════════════
   REVEAL ANIMATIONS
═══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ═══════════════════════════════════════════════════════════
   PILL / BADGE
═══════════════════════════════════════════════════════════ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.25);
  color: var(--accent-2);
  letter-spacing: 0.03em;
}

.pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ═══════════════════════════════════════════════════════════
   CODE / MONO
═══════════════════════════════════════════════════════════ */

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent-2);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ═══════════════════════════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════════════════════════ */

.page-hero {
  padding: 140px 0 80px;
  border-bottom: 1px solid var(--border);
}

.page-hero .section-label { margin-bottom: 20px; }

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  margin-bottom: 20px;
}

.page-hero p {
  font-size: 18px;
  line-height: 1.7;
  max-width: 600px;
}

/* ═══════════════════════════════════════════════════════════
   WINDOW MOCKUP
═══════════════════════════════════════════════════════════ */

.window-mockup {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red    { background: #e5534b; }
.dot-yellow { background: #c69026; }
.dot-green  { background: #57a65f; }

.window-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.window-body {
  padding: 24px;
}
