/**
 * ================================================================
 * COMPONENTS - JEAN-DAVID WAEBER PORTFOLIO
 * Noble • Élégant • Immersif
 * ================================================================
 */

/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY COMPONENTS === */
.text-serif {
  font-family: var(--font-serif);
  font-feature-settings: 'liga' 1, 'kern' 1, 'onum' 1;
}

.text-sans {
  font-family: var(--font-sans);
}

/* Headings */
.heading-display {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: var(--weight-normal);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

.heading-1 {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.heading-2 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.heading-3 {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.heading-4 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.heading-5 {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.heading-6 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

/* Text Elements */
.text-lead {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.text-body {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.text-small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

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

.text-accent {
  color: var(--color-accent-base);
}

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

/* Quotes */
.quote {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  position: relative;
  border-left: 3px solid var(--color-accent-base);
  background: var(--color-accent-alpha-light);
  border-radius: var(--radius-md);
}

.quote::before {
  content: '"';
  font-size: var(--text-4xl);
  color: var(--color-accent-base);
  position: absolute;
  top: var(--space-sm);
  left: var(--space-md);
  line-height: 1;
}

.quote-author {
  font-size: var(--text-base);
  font-style: normal;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.quote-author::before {
  content: '— ';
}

/* === LAYOUT COMPONENTS === */
.container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: var(--container-md);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

/* Responsive Grid */
.grid-responsive {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Flex Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.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); }

/* === BUTTON COMPONENTS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-slow) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-base);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--gradient-accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-text-muted);
}

.btn-secondary:hover {
  border-color: var(--color-accent-base);
  color: var(--color-accent-base);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: var(--space-xs) var(--space-md);
}

.btn-ghost:hover {
  color: var(--color-accent-base);
  background: var(--color-accent-alpha-light);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-lg);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
}

/* === CARD COMPONENTS === */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-slow) var(--ease-out);
  border: 1px solid rgba(233, 230, 223, 0.1);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(201, 166, 70, 0.2);
}

.card-elevated {
  background: var(--color-surface-elevated);
  box-shadow: var(--shadow-lg);
}

.card-minimal {
  background: transparent;
  border: 1px solid rgba(233, 230, 223, 0.2);
  box-shadow: none;
}

.card-minimal:hover {
  border-color: var(--color-accent-base);
  background: var(--color-accent-alpha-light);
}

/* Card Content */
.card-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(233, 230, 223, 0.1);
}

.card-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.card-body {
  margin-bottom: var(--space-md);
}

.card-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(233, 230, 223, 0.1);
}

/* === HERO COMPONENTS === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--color-background);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-md);
  padding: var(--space-xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-accent-alpha);
  color: var(--color-accent-base);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-lg);
  border: 1px solid rgba(201, 166, 70, 0.3);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: var(--weight-normal);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  display: block;
  font-size: var(--text-2xl);
  color: var(--color-accent-base);
  margin-top: var(--space-sm);
}

.hero-description {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

/* === SECTION COMPONENTS === */
.section {
  padding: var(--space-4xl) 0;
}

.section-sm {
  padding: var(--space-3xl) 0;
}

.section-lg {
  padding: var(--space-5xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* === NAVIGATION COMPONENTS === */
.nav {
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(233, 230, 223, 0.1);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: color var(--duration-normal) var(--ease-out);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent-base);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* === MEDIA COMPONENTS === */
.media-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.media-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-slow) var(--ease-out);
}

.media-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.media-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.media-content {
  padding: var(--space-lg);
}

.media-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.media-description {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* === ANIMATION UTILITIES === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn var(--duration-slower) var(--ease-out) forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  transform: translateY(40px);
  opacity: 0;
  animation: slideUp var(--duration-slow) var(--ease-out) forwards;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* === RESPONSIVE UTILITIES === */
.hidden-mobile {
  display: none;
}

.visible-mobile {
  display: block;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: block;
  }
  
  .visible-mobile {
    display: none;
  }
}

/* === SPACING UTILITIES === */
.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); }

.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); }

.pt-xs { padding-top: var(--space-xs); }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }

.pb-xs { padding-bottom: var(--space-xs); }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }