/* =============================================
   RB Captures — Design System (style.css)
   Premium Cinematic Portfolio
   ============================================= */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --color-bg: #0A0A0A;
  --color-bg-elevated: #111111;
  --color-bg-card: #161616;
  --color-bg-overlay: rgba(10, 10, 10, 0.85);
  --color-beige: #D4C5A9;
  --color-beige-light: #E8DCC8;
  --color-beige-dark: #A89A7E;
  --color-gold: #C8A951;
  --color-gold-bright: #E2C36B;
  --color-gold-dark: #9A7F38;
  --color-white: #F5F0E8;
  --color-text-primary: #F5F0E8;
  --color-text-secondary: #D4C5A9;
  --color-text-muted: #7A7265;
  --color-border: rgba(200, 169, 81, 0.15);
  --color-border-hover: rgba(200, 169, 81, 0.4);
  --color-success: #4CAF50;
  --color-error: #E74C3C;
  --color-warning: #F39C12;

  /* Typography */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Montserrat', sans-serif;

  /* Font Sizes (Fluid) */
  --fs-xs: clamp(0.65rem, 0.6rem + 0.25vw, 0.75rem);
  --fs-sm: clamp(0.75rem, 0.7rem + 0.3vw, 0.875rem);
  --fs-base: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 1rem + 0.6vw, 1.35rem);
  --fs-xl: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --fs-2xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3vw, 3.5rem);
  --fs-4xl: clamp(2.8rem, 1.8rem + 4vw, 5rem);
  --fs-hero: clamp(3rem, 2rem + 5vw, 6.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-section: clamp(4rem, 3rem + 5vw, 8rem);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-cinematic: 800ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 20px rgba(200, 169, 81, 0.15);
  --shadow-gold-hover: 0 0 30px rgba(200, 169, 81, 0.25);

  /* Z-Index Scale */
  --z-base: 1;
  --z-nav: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* Container */
  --container-max: 1400px;
  --container-narrow: 900px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold-dark) var(--color-bg);
}

html::-webkit-scrollbar {
  width: 6px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--color-gold);
}

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: 0.04em;
  font-weight: 400;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

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

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

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

.section {
  padding: var(--space-section) 0;
  position: relative;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }
.text-tracking { letter-spacing: 0.15em; }
.text-tracking-wide { letter-spacing: 0.3em; }

/* --- Section Title --- */
.section-title {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section-title__label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-gold);
  display: block;
  margin-bottom: var(--space-md);
}

.section-title__heading {
  font-size: var(--fs-3xl);
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.section-title__line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn:hover::before {
  opacity: 1;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: var(--color-bg);
  border: 1px solid var(--color-gold);
}

.btn--primary:hover {
  color: var(--color-bg);
  box-shadow: var(--shadow-gold-hover);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
}

.btn--outline:hover {
  background: var(--color-gold);
  color: var(--color-bg);
  box-shadow: var(--shadow-gold);
}

.btn--ghost {
  background: transparent;
  color: var(--color-beige);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn--lg {
  padding: var(--space-lg) var(--space-3xl);
  font-size: var(--fs-sm);
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-beige-dark);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: var(--fs-base);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 81, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23D4C5A9' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* --- Gold Divider --- */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: var(--space-3xl) 0;
}

.divider--gold {
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

/* --- Card --- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

/* --- Animation Keyframes --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

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

@keyframes kenBurns {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.1) translate(-1%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}

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

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

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes goldGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(200, 169, 81, 0.2); }
  50% { box-shadow: 0 0 25px rgba(200, 169, 81, 0.4); }
}

@keyframes lineExpand {
  from { width: 0; }
  to { width: 60px; }
}

@keyframes textReveal {
  0% { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* --- Scroll Reveal Classes --- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-in"] {
  transform: none;
}

[data-animate="slide-left"] {
  transform: translateX(-40px);
}

[data-animate="slide-left"].is-visible {
  transform: translateX(0);
}

[data-animate="slide-right"] {
  transform: translateX(40px);
}

[data-animate="slide-right"].is-visible {
  transform: translateX(0);
}

[data-animate="scale-in"] {
  transform: scale(0.9);
}

[data-animate="scale-in"].is-visible {
  transform: scale(1);
}

/* --- Responsive Visibility --- */
.hide-mobile { display: none; }
.show-mobile { display: block; }

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

/* --- Loading Skeleton --- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-elevated) 25%,
    var(--color-bg-card) 50%,
    var(--color-bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: var(--space-2xl);
  right: var(--space-2xl);
  padding: var(--space-md) var(--space-xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: var(--fs-sm);
  z-index: var(--z-toast);
  animation: fadeInUp 0.4s ease;
  box-shadow: var(--shadow-lg);
}

.toast--success { border-left: 3px solid var(--color-success); }
.toast--error { border-left: 3px solid var(--color-error); }
.toast--warning { border-left: 3px solid var(--color-warning); }

/* --- Page Transition --- */
.page-transition {
  animation: fadeIn 0.6s ease;
}

/* --- Selection Color --- */
::selection {
  background: var(--color-gold);
  color: var(--color-bg);
}

::-moz-selection {
  background: var(--color-gold);
  color: var(--color-bg);
}
