/* MyFreeCams - Base Styles & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  background-image: radial-gradient(ellipse at 20% 30%, rgba(224,29,95,0.03) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 70%, rgba(124,58,237,0.03) 0%, transparent 60%);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-main);
}

/* Custom Selection */
::selection {
  background: var(--highlight);
  color: #120A1C;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

h4 {
  font-size: 1.3rem;
  font-family: var(--font-subheading);
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: transparent;
}

button {
  cursor: pointer;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

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

.text-gold {
  background: var(--grad-gold-shimmer);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

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

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

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section-padding { padding: 3.5rem 0; }
}

/* Custom Cursor Dot & Ring */
.cursor-dot, .cursor-ring {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  z-index: 9999;
  transition: transform 0.15s ease-out, opacity 0.3s ease;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--primary);
  opacity: 0.5;
}

/* Reading Progress Bar */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 1001;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--grad-pink-purple);
  box-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
  transition: width 0.1s ease-out;
}

/* Preloader handles content coverage via z-index overlay */

/* Responsive utilities */
.d-lg-none { display: none; }
@media (max-width: 1024px) {
  .d-lg-none { display: inline-flex; }
}
