/* ============================================================
   GlowDailyHub — Core Design System (index.css)
   A premium Pinterest-inspired visual inspiration platform.
   ============================================================ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

/* ─── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Colors — Primary */
  --midnight:           #1A1A2E;
  --deep-navy:          #16213E;
  --accent-rose:        #E94560;
  --accent-rose-dark:   #C73650;
  --accent-rose-light:  #FF6B81;
  --warm-gold:          #D4A853;
  --warm-gold-dark:     #B8923F;
  --warm-gold-light:    #E8C97A;
  --violet:             #A78BFA;
  --violet-dark:        #8B6FE0;

  /* Colors — Neutral */
  --soft-blush:         #F8E8E0;
  --cloud:              #FAF7F5;
  --cream:              #FFF8F3;
  --smoke:              #6B7280;
  --smoke-light:        #9CA3AF;
  --charcoal:           #1F2937;
  --white:              #FFFFFF;
  --black:              #000000;

  /* Colors — Glass & Overlays */
  --glass-white:        rgba(255, 255, 255, 0.08);
  --glass-border:       rgba(255, 255, 255, 0.15);
  --overlay-dark:       rgba(0, 0, 0, 0.5);
  --overlay-darker:     rgba(0, 0, 0, 0.7);

  /* Category Colors */
  --cat-room:           #D4A853;
  --cat-hair:           #E94560;
  --cat-nail:           #A78BFA;

  /* Typography — Families */
  --font-heading:       'Poppins', sans-serif;
  --font-body:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Typography — Sizes */
  --text-xs:            0.75rem;     /* 12px */
  --text-sm:            0.8125rem;   /* 13px */
  --text-base:          0.9375rem;   /* 15px */
  --text-md:            1rem;        /* 16px */
  --text-lg:            1.125rem;    /* 18px */
  --text-xl:            1.25rem;     /* 20px */
  --text-2xl:           1.5rem;      /* 24px */
  --text-3xl:           1.75rem;     /* 28px */
  --text-4xl:           2.25rem;     /* 36px */
  --text-5xl:           3rem;        /* 48px */

  /* Typography — Weights */
  --fw-light:           300;
  --fw-regular:         400;
  --fw-medium:          500;
  --fw-semibold:        600;
  --fw-bold:            700;

  /* Spacing (8px base unit) */
  --space-xs:           0.25rem;     /* 4px  */
  --space-sm:           0.5rem;      /* 8px  */
  --space-md:           1rem;        /* 16px */
  --space-lg:           1.5rem;      /* 24px */
  --space-xl:           2rem;        /* 32px */
  --space-2xl:          3rem;        /* 48px */
  --space-3xl:          5rem;        /* 80px */

  /* Border Radius */
  --radius-sm:          6px;
  --radius-md:          12px;
  --radius-lg:          16px;
  --radius-xl:          24px;
  --radius-full:        9999px;

  /* Shadows */
  --shadow-sm:          0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md:          0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg:          0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl:          0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-glow-rose:   0 0 30px rgba(233, 69, 96, 0.3);
  --shadow-glow-gold:   0 0 30px rgba(212, 168, 83, 0.3);

  /* Transitions */
  --transition-fast:    150ms ease;
  --transition-base:    250ms ease;
  --transition-slow:    400ms ease;
  --transition-spring:  500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index Layers */
  --z-dropdown:         100;
  --z-sticky:           200;
  --z-overlay:          300;
  --z-modal:            400;
  --z-tooltip:          500;
}


/* ─── CSS Reset ────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--charcoal);
  background-color: var(--cloud);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── Custom scrollbar (brand rose) ───────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--accent-rose) var(--cloud); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--cloud); }
::-webkit-scrollbar-thumb {
  background: var(--accent-rose);
  border-radius: 999px;
  border: 3px solid var(--cloud);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-rose-dark); }

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ─── Base Typography ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--charcoal);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: var(--fw-bold);
}

h1 {
  font-size: var(--text-5xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-4xl);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-2xl);
  line-height: 1.25;
}

h4 {
  font-size: var(--text-xl);
  line-height: 1.3;
}

h5 {
  font-size: var(--text-lg);
  line-height: 1.35;
  font-weight: var(--fw-semibold);
}

h6 {
  font-size: var(--text-md);
  line-height: 1.4;
  font-weight: var(--fw-semibold);
}

p {
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: var(--fw-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
  color: var(--smoke);
}

::selection {
  background-color: rgba(233, 69, 96, 0.15);
  color: var(--accent-rose-dark);
}

/* Responsive typography */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl);  }
}

@media (max-width: 640px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl);  }
  h4 { font-size: var(--text-lg);  }
}


/* ─── Layout Utilities ─────────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.section {
  padding: var(--space-3xl) 0;
}

@media (max-width: 1024px) {
  .section {
    padding: var(--space-2xl) 0;
  }
}

@media (max-width: 640px) {
  .section {
    padding: var(--space-xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Flexbox Helpers */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-gap-sm {
  gap: var(--space-sm);
}

.flex-gap-md {
  gap: var(--space-md);
}

.flex-gap-lg {
  gap: var(--space-lg);
}

/* Alignment */
.text-center { text-align: center; }
.text-left   { text-align: left;   }
.text-right  { text-align: right;  }

.items-center   { align-items: center;    }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end;   }
.justify-center { justify-content: center; }


/* ─── Utility Classes ──────────────────────────────────────── */

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Visibility */
.hidden  { display: none !important; }
.visible { visibility: visible; }

.mobile-only {
  display: none !important;
}

@media (max-width: 640px) {
  .mobile-only  { display: block !important; }
  .desktop-only { display: none !important;  }
}

@media (min-width: 641px) {
  .desktop-only { display: block !important; }
}

/* Text Truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Spacing — Margin Bottom */
.mb-xs  { margin-bottom: var(--space-xs);  }
.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); }
.mb-3xl { margin-bottom: var(--space-3xl); }

/* Spacing — Margin Top */
.mt-xs  { margin-top: var(--space-xs);  }
.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); }

/* Spacing — Padding */
.p-xs  { padding: var(--space-xs);  }
.p-sm  { padding: var(--space-sm);  }
.p-md  { padding: var(--space-md);  }
.p-lg  { padding: var(--space-lg);  }
.p-xl  { padding: var(--space-xl);  }

/* Colors */
.text-rose    { color: var(--accent-rose); }
.text-gold    { color: var(--warm-gold);   }
.text-violet  { color: var(--violet);      }
.text-smoke   { color: var(--smoke);       }
.text-white   { color: var(--white);       }

.bg-cloud   { background-color: var(--cloud); }
.bg-cream   { background-color: var(--cream); }
.bg-blush   { background-color: var(--soft-blush); }


/* ─── Keyframe Animations ─────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0;  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1);    }
  50%      { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0);     }
  50%      { transform: translateY(-10px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(233, 69, 96, 0.3);  }
  50%      { box-shadow: 0 0 20px rgba(233, 69, 96, 0.6); }
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3);  }
  50%  { opacity: 1; transform: scale(1.05); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1);    }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Named animation utilities */
.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-fade-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-down {
  animation: fadeInDown 0.6s ease forwards;
}

.animate-slide-right {
  animation: slideInRight 0.6s ease forwards;
}

.animate-slide-left {
  animation: slideInLeft 0.6s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
  animation: spin 0.6s linear infinite;
}