/* ============================================
   DIMENSION ORACLE · Common Stylesheet
   ============================================ */

/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Noto+Serif+SC:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== Root Variables ===== */
:root {
  --gold: #c5a059;
  --gold-bright: #e4c27a;
  --gold-dim: rgba(197, 160, 89, 0.4);
  --gold-faint: rgba(197, 160, 89, 0.08);
  
  --void: #050505;
  --void-soft: #0a0a0a;
  --panel: #0f0f0f;
  --panel-border: #1a1a1a;
  
  --text: #e8e8e8;
  --text-dim: #888;
  --text-faint: #555;
  
  --font-display: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Noto Serif SC', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  
  --max-width: 1100px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture overlay for atmosphere */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(197, 160, 89, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(197, 160, 89, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 1em;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold-bright);
}

/* Section with serif tag */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: inline-block;
}

/* Dividers */
.divider {
  width: 60px;
  height: 1px;
  background: var(--gold-dim);
  margin: 2rem auto;
}

.divider-long {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  margin: 3rem 0;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-brand span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-left: 0.5rem;
  letter-spacing: 0.2em;
}

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

.nav-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
}

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid var(--panel-border);
  padding: 4px 8px;
  border-radius: 2px;
}

.lang-switch button {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  padding: 2px 6px;
  transition: all 0.3s;
}

.lang-switch button.active {
  color: var(--gold);
}

.lang-switch button:hover {
  color: var(--gold-bright);
}

.lang-divider {
  color: var(--text-faint);
  font-size: 0.7rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 1.5rem;
}

/* ===== Layout containers ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

main {
  padding-top: var(--nav-height);
}

.section {
  padding: 6rem 0;
}

.section-sm {
  padding: 3rem 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: all 0.4s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transition: left 0.4s ease;
  z-index: -1;
}

.btn:hover {
  color: var(--void);
}

.btn:hover::before {
  left: 0;
}

.btn-solid {
  background: var(--gold);
  color: var(--void);
}

.btn-solid:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

/* ===== Cards ===== */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 2rem;
  transition: border-color 0.3s;
}

.card:hover {
  border-color: var(--gold-dim);
}

.card-title {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card-excerpt {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Grid ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--panel-border);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  background: var(--void-soft);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--gold);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-faint);
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 0;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.footer-disclosure {
  font-size: 0.7rem;
  color: var(--text-faint);
  line-height: 1.6;
  max-width: 500px;
  text-align: right;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

/* Staggered reveal for lists */
.stagger > * {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.25s; }
.stagger > *:nth-child(3) { animation-delay: 0.4s; }
.stagger > *:nth-child(4) { animation-delay: 0.55s; }
.stagger > *:nth-child(5) { animation-delay: 0.7s; }
.stagger > *:nth-child(6) { animation-delay: 0.85s; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-brand {
    grid-column: 1 / -1;
  }
  
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-disclosure {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 4rem 0;
  }
  
  .container {
    padding: 0 1.25rem;
  }
  
  .nav-inner {
    padding: 0 1.25rem;
  }
}
