/* ==========================================================================
   BASE STYLES - Shared across all themes
   ========================================================================== */

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

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Body defaults */
body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Images */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Form elements inherit fonts */
input, button, textarea, select {
  font: inherit;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Fieldset reset */
fieldset {
  border: none;
  padding: 0;
}

/* Address styling */
address {
  font-style: normal;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Hide elements based on language */
[data-lang="it"] [data-lang-en],
[data-lang="en"] [data-lang-it] {
  display: none !important;
}

/* Hide elements based on theme */
[data-theme="groovy"] [data-theme-tarantino],
[data-theme="tarantino"] [data-theme-groovy] {
  display: none !important;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ==========================================================================
   CONTROLS (Theme & Language Switcher)
   ========================================================================== */

.controls {
  position: fixed;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 1000;
  display: flex;
  gap: var(--space-xs);
}

.theme-toggle,
.lang-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

/* Theme Switcher - Enhanced */
.theme-switcher {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  padding: 4px;
  border-radius: 8px;
}

.theme-switcher__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  white-space: nowrap;
  opacity: 0.7;
}

.theme-switcher__btn--tarantino {
  background: transparent;
  color: #FFD700;
  border: 1px solid transparent;
}

.theme-switcher__btn--groovy {
  background: transparent;
  color: #F72585;
  border: 1px solid transparent;
}

.theme-switcher__btn--active {
  opacity: 1;
  transform: scale(1.05);
}

.theme-switcher__btn--tarantino.theme-switcher__btn--active {
  background: #FFD700;
  color: #000;
  border-color: #FFD700;
}

.theme-switcher__btn--groovy.theme-switcher__btn--active {
  background: linear-gradient(135deg, #E85D04, #F72585);
  color: #fff;
  border-color: #F72585;
}

.theme-switcher__btn:hover {
  opacity: 1;
  transform: scale(1.02);
}

.theme-switcher__icon {
  font-size: 1rem;
}

.theme-switcher__label {
  display: none;
}

@media (min-width: 480px) {
  .theme-switcher__label {
    display: inline;
  }
}

/* ==========================================================================
   SECTION TITLE
   ========================================================================== */

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

.section-title__chapter {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-xs);
  opacity: 0.6;
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-md);
}

.form-group--small {
  flex: 0 0 80px;
}

.form-group--grow {
  flex: 1;
}

.form-row {
  display: flex;
  gap: var(--space-sm);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  min-height: 48px;
}

.btn--primary {
  min-width: 160px;
}

.btn--ghost {
  background: transparent;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

/* Entry animations */
.hero__content > * {
  animation: slideUp 0.8s ease forwards;
  opacity: 0;
}

.hero__content > *:nth-child(1) { animation-delay: 0.1s; }
.hero__content > *:nth-child(2) { animation-delay: 0.2s; }
.hero__content > *:nth-child(3) { animation-delay: 0.3s; }
.hero__content > *:nth-child(4) { animation-delay: 0.4s; }
.hero__content > *:nth-child(5) { animation-delay: 0.5s; }
.hero__content > *:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Mobile first approach - styles above are for mobile */

/* Tablet and up */
@media (min-width: 768px) {
  .form-row {
    flex-direction: row;
  }

  .rsvp__choice {
    flex-direction: row;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .event__timeline {
    flex-direction: row;
    justify-content: center;
  }
}
