/* css/global.css */

@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&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.loading {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--large {
  padding: 18px 48px;
  font-size: 0.85rem;
}

.btn--full {
  width: 100%;
}

/* Ripple Effect */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 600ms linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section-title__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: var(--space-md);
}

.section-title__heading {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
}

.section-title__line {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-lg) auto 0;
}

/* Loading Screen */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__content {
  text-align: center;
}

.loader__brand {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: var(--space-xl);
}

.loader__bar {
  width: 120px;
  height: 1px;
  background: var(--border);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.loader__bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: loaderSlide 1.2s ease infinite;
}

@keyframes loaderSlide {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Page Transition */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition.active {
  transform: translateY(0);
}

/* Notification Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transform: translateX(120%);
  transition: transform var(--transition-base);
}

.toast.show {
  transform: translateX(0);
}

.toast__icon {
  color: var(--accent);
  font-size: 1.2rem;
}

.toast__message {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.toast__close {
  color: var(--text-tertiary);
  font-size: 1.2rem;
  margin-left: var(--space-md);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.toast__close:hover {
  color: var(--text-primary);
}

/* Breadcrumb */
.breadcrumb {
  padding: var(--space-lg) 0;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.breadcrumb a {
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb__separator {
  color: var(--text-muted);
}

.breadcrumb__current {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

  .btn {
    padding: 12px 28px;
    font-size: 0.75rem;
  }

  .btn--large {
    padding: 14px 36px;
  }
}