:root {
  --bg: #fef7ff;
  --surface: #ffffff;
  --primary: #d946ef;
  --primary-hover: #c026d3;
  --primary-light: #fae8ff;
  --accent: #8b5cf6;
  --text: #1e1b2e;
  --text-light: #6b7280;
  --border: #e9d5ff;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(139, 92, 246, 0.08);
  --shadow-lg: 0 8px 24px rgba(139, 92, 246, 0.12);
  --max-width: 600px;
}

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

body {
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

/* Focus styles */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */
.site-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.site-header h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

/* Gallery */
.gallery {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.gallery-feed {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.gallery-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  padding: 3rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Photo card */
.photo-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease;
}

.photo-card:hover {
  box-shadow: var(--shadow-lg);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.photo-card-caption {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.photo-card-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Upload section */
.upload-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.upload-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  text-align: center;
}

.upload-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: var(--primary-light);
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--primary);
  background: #fdf4ff;
}

.dropzone:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.dropzone-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.dropzone-text {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Image preview */
.preview {
  text-align: center;
}

.preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.remove-btn {
  margin-top: 0.5rem;
  background: none;
  border: none;
  color: var(--error-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
}

.remove-btn:hover {
  background: var(--error-bg);
}

/* Form inputs */
.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Submit button */
.submit-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover {
  background: var(--primary-hover);
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Form status messages */
.form-status {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.form-status.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.form-status.error {
  background: var(--error-bg);
  color: var(--error-text);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
