/* ============================================================
   INTER WOOD FURNITURE — Global Design System
   Luxury / Premium Interior Design Website
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Primary Palette */
  --color-charcoal: #1a1a1a;
  --color-charcoal-light: #2d2d2d;
  --color-charcoal-lighter: #3a3a3a;
  --color-copper: #b87333;
  --color-copper-light: #d4915a;
  --color-copper-dark: #9a5e28;
  --color-taupe: #8b7d6b;
  --color-taupe-light: #a89b8a;
  --color-taupe-dark: #6e6256;

  /* Neutrals */
  --color-offwhite: #f5f0eb;
  --color-cream: #faf7f2;
  --color-white: #ffffff;
  --color-black: #0d0d0d;
  --color-grey-100: #f0ebe5;
  --color-grey-200: #e0d8cf;
  --color-grey-300: #c4b9ab;
  --color-grey-400: #9e9184;
  --color-grey-500: #726658;
  --color-grey-600: #4a4038;

  /* Functional */
  --color-success: #4a7c59;
  --color-overlay: rgba(13, 13, 13, 0.7);
  --color-overlay-light: rgba(13, 13, 13, 0.4);

  /* Typography */
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Font Sizes (fluid) */
  --text-xs: clamp(0.7rem, 0.8vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.9vw, 0.9rem);
  --text-base: clamp(0.95rem, 1vw, 1.05rem);
  --text-lg: clamp(1.1rem, 1.2vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 2vw, 2rem);
  --text-3xl: clamp(1.8rem, 2.5vw, 2.5rem);
  --text-4xl: clamp(2.2rem, 3.5vw, 3.5rem);
  --text-5xl: clamp(2.8rem, 4.5vw, 4.5rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 900px;
  --section-padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 5vw, 2rem);

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.18);
  --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.25);
  --shadow-copper: 0 4px 20px rgba(184, 115, 51, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-slower: 0.8s cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-whatsapp: 500;
  --z-nav: 600;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-offwhite);
  background-color: var(--color-charcoal);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  background: none;
  color: inherit;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-offwhite);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
  color: var(--color-grey-300);
}

.text-copper {
  color: var(--color-copper);
}

.text-taupe {
  color: var(--color-taupe-light);
}

.text-offwhite {
  color: var(--color-offwhite);
}

/* --- Section Label / Eyebrow --- */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-copper);
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--color-copper);
}

/* --- Section Title --- */
.section-title {
  margin-bottom: var(--space-lg);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-grey-300);
  max-width: 600px;
  font-weight: 300;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

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

.section {
  padding: var(--section-padding);
}

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

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

.section--light {
  background-color: var(--color-charcoal-light);
}

.section--cream {
  background-color: var(--color-offwhite);
  color: var(--color-charcoal);
}

.section--cream h2,
.section--cream h3,
.section--cream h4 {
  color: var(--color-charcoal);
}

.section--cream p {
  color: var(--color-grey-600);
}

.section--cream .section-label {
  color: var(--color-copper-dark);
}

.section--cream .section-label::before {
  background: var(--color-copper-dark);
}

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

.flex {
  display: flex;
}

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

.grid {
  display: grid;
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes lineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Scroll-triggered animation classes */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.active > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.active > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.active > *:nth-child(8) { transition-delay: 0.4s; }

.stagger-children.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Divider --- */
.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-copper), var(--color-copper-light));
  margin: var(--space-lg) 0;
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Selection --- */
::selection {
  background: var(--color-copper);
  color: var(--color-white);
}

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

::-webkit-scrollbar-track {
  background: var(--color-charcoal);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--color-copper);
}

/* --- Page Transition Overlay --- */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-charcoal);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.page-loader .loader-line {
  width: 60px;
  height: 2px;
  background: var(--color-charcoal-lighter);
  position: relative;
  overflow: hidden;
}

.page-loader .loader-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-copper), var(--color-copper-light));
  animation: shimmer 1.2s infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .section {
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 1.5rem);
  }
}
