/* ============================================================
   OBSIDIAN LUXE — Base Styles
   Reset, Typography, Utilities
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-light);
  background-color: var(--primary-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-white);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
}

h3 {
  font-size: var(--fs-h3);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
}

h4 {
  font-size: var(--fs-h4);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-light);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--fw-semibold);
  color: var(--text-white);
}

em {
  font-style: italic;
}

small {
  font-size: var(--fs-small);
}

/* ── Links ───────────────────────────────────────────────── */
.link {
  color: var(--accent-gold);
  transition: var(--transition-fast);
  position: relative;
}

.link:hover {
  color: var(--accent-gold-light);
}

.link--underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: var(--transition-base);
}

.link--underline:hover::after {
  width: 100%;
}

/* ── Container ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ── Section ─────────────────────────────────────────────── */
.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

.section--sm {
  padding-top: var(--section-py-sm);
  padding-bottom: var(--section-py-sm);
}

.section--no-top {
  padding-top: 0;
}

.section--no-bottom {
  padding-bottom: 0;
}

.section--dark {
  background-color: var(--secondary-dark);
}

.section--gradient {
  background: var(--gradient-dark);
}

.section--glow {
  background-image: var(--gradient-radial);
}

/* ── Section Header ──────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-4xl);
}

.section-header__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--space-lg);
}

.section-header__label::before,
.section-header__label::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-gold);
  opacity: 0.5;
}

.section-header__title {
  margin-bottom: var(--space-lg);
}

.section-header__desc {
  font-size: var(--fs-body-lg);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
}

/* ── Grid ────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-2xl);
}

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

@media (max-width: 1024px) {
  .grid { gap: var(--space-xl); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid { gap: var(--space-lg); }
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; }
  .gap-2xl { gap: var(--space-lg); }
  .gap-3xl { gap: var(--space-xl); }
}

/* ── Flex Utilities ──────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* ── Text Utilities ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-gold { color: var(--accent-gold); }
.text-violet { color: var(--accent-violet-light); }
.text-cyan { color: var(--accent-cyan-light); }
.text-emerald { color: var(--accent-emerald-light); }
.text-indigo { color: var(--accent-indigo-light); }
.text-white { color: var(--text-white); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--fs-small); }
.text-xs { font-size: var(--fs-xs); }
.text-lg { font-size: var(--fs-body-lg); }
.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

/* ── Spacing Utilities ───────────────────────────────────── */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ── Display Utilities ───────────────────────────────────── */
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Decorative Elements ─────────────────────────────────── */
.accent-line,
.gold-line {
  width: 60px;
  height: 3px;
  background: var(--gradient-violet);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-violet-glow);
}

.accent-line--center,
.gold-line--center {
  margin-left: auto;
  margin-right: auto;
}

.accent-dot,
.gold-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-violet);
  box-shadow: 0 0 10px var(--accent-violet-glow);
}

.bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: var(--z-behind);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: var(--z-behind);
}

/* ── Scroll Animation Classes ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

.reveal--left {
  transform: translateX(-30px);
}

.reveal--right {
  transform: translateX(30px);
}

.reveal--scale {
  transform: scale(0.95);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

article.reveal,
.post-content.reveal,
.prose.reveal {
  opacity: 1 !important;
  transform: none !important;
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }
.reveal-delay-6 { transition-delay: 600ms; }

/* ── Selection ───────────────────────────────────────────── */
::selection {
  background: rgba(124, 58, 237, 0.35);
  color: var(--text-white);
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--tertiary-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-violet-dark);
}
