/* ============================================
   BASE STYLES – Reset, Typography, Globals
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--text-primary);
  background-color: var(--surface-0);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Editorial Framed Viewport (Inspired by getloume.com) ── */
@media (min-width: 1280px) {
  body {
    border: 12px solid var(--surface-0);
    box-shadow: inset 0 0 0 1px hsla(0, 0%, 100%, 0.05);
  }
}

/* ── Dynamic Glowing Mesh Blobs (Inspired by osmo.supply) ── */
body::before, body::after {
  content: '';
  position: fixed;
  width: 65vw;
  max-width: 800px;
  height: 65vw;
  max-height: 800px;
  border-radius: var(--radius-full);
  z-index: -2;
  filter: blur(120px);
  opacity: 0.65;
  pointer-events: none;
}

body::before {
  top: -15%;
  right: -10%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 80%);
  animation: float-blob-1 25s infinite alternate ease-in-out;
}

body::after {
  bottom: -20%;
  left: -15%;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 80%);
  animation: float-blob-2 30s infinite alternate ease-in-out;
}

@keyframes float-blob-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, 80px) scale(1.15); }
  100% { transform: translate(50px, -60px) scale(0.9); }
}

@keyframes float-blob-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, -100px) scale(0.9); }
  100% { transform: translate(-70px, 70px) scale(1.2); }
}

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

h1 { 
  font-size: var(--fs-hero); 
  font-weight: var(--fw-extrabold); 
  font-family: var(--font-serif);
}
h2 { font-size: var(--fs-4xl); font-family: var(--font-serif); }
h3 { font-size: var(--fs-2xl); font-family: var(--font-serif); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); font-weight: var(--fw-semibold); }

p {
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
}

a:hover {
  color: var(--primary);
}

strong, b {
  font-weight: var(--fw-semibold);
}

small {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}

code, pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

/* ── Selection ── */
::selection {
  background: var(--primary);
  color: var(--text-primary);
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-0);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border: 2px solid var(--surface-0);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--surface-3);
}

/* ── Focus Ring ── */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Images ── */
img, svg {
  display: block;
  max-width: 100%;
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Utility Classes ── */
.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;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--text-secondary);
}

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ── Visibility ── */
.hidden { display: none !important; }

.visible-mobile { display: none; }
.visible-desktop { display: block; }

@media (max-width: 768px) {
  .visible-mobile { display: block; }
  .visible-desktop { display: none; }
  .hidden-mobile { display: none !important; }
}
