/* ============================================
   PORTFOLIO BUILDER - CSS VARIABLES
   Design system powered by custom properties
   ============================================ */

:root {
  /* ===== FONTS ===== */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ===== COLORS - DARK THEME (DEFAULT) ===== */
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-elevated: #232328;
  --bg-card: rgba(24, 24, 27, 0.8);

  /* Text */
  --text-primary: #f5f5f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-inverse: #0a0a0b;

  /* Accent color system */
  --accent: #DC143C;
  --accent-hover: #b8102f;
  --accent-light: #e8365a;
  --accent-glow: rgba(220, 20, 60, 0.3);
  --accent-subtle: rgba(220, 20, 60, 0.12);

  /* Hero overlay */
  --hero-overlay: rgba(0, 0, 0, 0.65);

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(220, 20, 60, 0.3);

  /* ===== TYPOGRAPHY ===== */
  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.85;

  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===== SPACING ===== */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ===== SIZING ===== */
  --max-width-content: 1200px;
  --max-width-narrow: 800px;
  --max-width-wide: 1400px;

  /* ===== BORDERS ===== */
  --radius-sm: 0.375rem;
  --radius-base: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* ===== SHADOWS ===== */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-base: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.7);
  --shadow-glow-sm: 0 0 12px var(--accent-glow);
  --shadow-glow: 0 0 24px var(--accent-glow);

  /* ===== TRANSITIONS ===== */
  --transition-fast: 200ms;
  --transition-base: 300ms;
  --transition-slow: 500ms;

  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ===== Z-INDEX ===== */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 800;
  --z-max: 9999;

  /* ===== COMPONENT VARS ===== */
  --header-height: 72px;
  --header-bg: transparent;
  --header-bg-scrolled: rgba(10, 10, 11, 0.9);

  --input-bg: rgba(24, 24, 27, 0.6);
  --input-border: var(--border-color);
  --input-border-focus: var(--accent);
  --input-text: var(--text-primary);
  --input-placeholder: var(--text-muted);

  --card-bg: var(--bg-card);
  --card-border: var(--border-color);
  --card-padding: var(--space-8);
  --card-radius: var(--radius-lg);
}

/* Accent colors are now applied via JS hex-direct (theme.js applyAccentColor).
   The :root defaults above serve as fallback. */


/* ============================================
   DARK THEME (DEFAULT)
   Explicit class for theme switching
   ============================================ */

body.dark-theme {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-elevated: #1e1e22;
  --bg-card: rgba(24, 24, 27, 0.8);

  --text-primary: #f5f5f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-inverse: #0a0a0b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-base: 0 4px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.7);

  --input-bg: rgba(24, 24, 27, 0.6);
  --card-bg: rgba(24, 24, 27, 0.8);
  --header-bg-scrolled: rgba(10, 10, 11, 0.9);

  --hero-overlay: rgba(0, 0, 0, 0.65);
}


/* ============================================
   LIGHT THEME
   Override dark defaults for light mode
   ============================================ */

body.light-theme {
  --bg-primary: #f8f8f8;
  --bg-secondary: #f0f0f0;
  --bg-tertiary: #ffffff;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);

  --text-primary: #0a0a0b;
  --text-secondary: #404040;
  --text-muted: #6b6b6b;
  --text-inverse: #f5f5f5;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-base: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.15);

  --input-bg: rgba(255, 255, 255, 0.8);
  --card-bg: rgba(255, 255, 255, 0.95);
  --header-bg-scrolled: rgba(248, 248, 248, 0.9);

  --hero-overlay: rgba(255, 255, 255, 0.65);
}


/* ============================================
   BASE STYLES
   Reset, typography, layout, utilities
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: clamp(var(--text-5xl), 8vw, var(--text-7xl));
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

p {
  margin-bottom: var(--space-5);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

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

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

strong, b {
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

em {
  color: var(--accent);
}

small {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

ul, ol {
  list-style: none;
}

img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  border-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  margin: 0;
}

button, [type='button'], [type='submit'] {
  -webkit-appearance: button;
  cursor: pointer;
}

button:disabled, [disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

input, textarea, select {
  outline: none;
}

textarea {
  resize: vertical;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  width: 100%;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--space-24) 0;
  position: relative;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin: 0 auto var(--space-16);
}

.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== GRID ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

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

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

/* ===== SCROLL ANIMATIONS ===== */
[data-reveal] {
  opacity: 0;
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

[data-reveal="fade-up"] {
  transform: translateY(30px);
}

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

[data-reveal="scale-up"] {
  transform: scale(0.95);
}

/* Stagger delay */
[data-reveal]:not(.revealed)[style*="--delay"] {
  transition-delay: var(--delay);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background-color: var(--accent);
  color: var(--text-primary);
}

/* ===== SCROLLBAR ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) var(--bg-tertiary);
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .section {
    padding: var(--space-16) 0;
  }

  .section-header {
    margin-bottom: var(--space-10);
  }

  .container, .container-narrow, .container-wide {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================
   COMPONENTS
   Buttons, cards, forms, lightbox, badges
   ============================================ */

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-smooth);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: var(--space-3) var(--space-4);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--accent-subtle);
  color: var(--accent-light);
}

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

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

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ===== CARDS ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    transform var(--transition-base) var(--ease-smooth),
    border-color var(--transition-base) var(--ease-smooth),
    box-shadow var(--transition-base) var(--ease-smooth);
}

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

/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base) var(--ease-smooth);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: var(--bg-elevated);
}

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

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

.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
  cursor: pointer;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-radius: var(--radius-full);
}

.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: var(--z-modal);
  opacity: 0;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.lightbox-container {
  position: relative;
  width: 90%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: lightboxZoomIn 0.3s var(--ease-out);
}

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

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  background: rgba(10, 10, 11, 0.9);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: var(--text-2xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(10, 10, 11, 0.8);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: var(--text-xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.lightbox-prev { left: var(--space-6); }
.lightbox-next { right: var(--space-6); }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow-sm);
}

.lightbox-counter {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-2) var(--space-5);
  background: rgba(10, 10, 11, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  z-index: 10;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev { left: var(--space-3); }
  .lightbox-next { right: var(--space-3); }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-base) var(--ease-out);
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-color: #10B981;
}

.toast-error {
  border-color: #EF4444;
}

/* ===== LOADER ===== */
.loader {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== SITE BANNER (auth nudge) ===== */
.site-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--admin-space-3);
  padding: var(--admin-space-3) var(--admin-space-6);
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--admin-border);
  font-family: var(--admin-font);
  font-size: var(--admin-text-sm);
  color: var(--admin-text-secondary);
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
}

.site-banner a {
  color: var(--admin-accent);
  text-decoration: none;
  font-weight: var(--admin-weight-semibold);
  cursor: pointer;
}

.site-banner a:hover {
  text-decoration: underline;
}

.site-banner-close {
  position: absolute;
  right: var(--admin-space-4);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: var(--admin-space-1) var(--admin-space-2);
  line-height: 1;
  border-radius: var(--admin-radius-sm);
  transition: color 0.15s ease;
}

.site-banner-close:hover {
  color: var(--admin-text);
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-color) 20%,
    var(--border-strong) 50%,
    var(--border-color) 80%,
    transparent 100%
  );
  margin: var(--space-8) 0;
}


/* ============================================
   SECTIONS
   Header, hero, about, portfolio,
   contact, footer
   ============================================ */

/* ===== HEADER & NAV ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  padding: var(--space-5) 0;
  transition: all var(--transition-base) var(--ease-smooth);
  background: var(--header-bg);
}

.header.scrolled {
  background: var(--header-bg-scrolled);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  flex: 1;
  min-width: 0;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: var(--weight-normal);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
}

.logo-subtitle:empty {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex: 0 auto;
}

.header-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.header-social a:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.header-social a:empty,
.header-social:empty {
  display: none;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition-base);
  border-radius: var(--radius-full);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .header-social {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--header-bg-scrolled);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
  }

  .nav.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    text-align: center;
  }
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay, rgba(0, 0, 0, 0.65));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-8);
}

.hero h1 {
  margin-bottom: var(--space-6);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-description {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: var(--leading-loose);
  max-width: 600px;
  margin: 0 auto var(--space-10);
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    min-height: 90vh;
    padding: var(--space-24) var(--space-4);
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about-image {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.about-content h2 {
  margin-bottom: var(--space-6);
}

.about-content p {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-5);
}

.about-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.specialty-tag {
  padding: var(--space-2) var(--space-4);
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent);
  letter-spacing: var(--tracking-wide);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* ===== PORTFOLIO GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform var(--transition-base) var(--ease-smooth);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow) var(--ease-smooth);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 10, 11, 0.8) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

/* Gallery placeholder - visible empty state for builder */
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.gallery-placeholder span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Filter tabs */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--space-2) var(--space-5);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

/* ===== AFTERCARE ===== */
.aftercare-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-16);
}

.aftercare-step {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.aftercare-step:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.aftercare-step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.aftercare-step-body h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.aftercare-step-body p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

@media (max-width: 768px) {
  .aftercare-steps {
    grid-template-columns: 1fr;
  }
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast);
}

.contact-item:hover {
  border-color: var(--accent);
}

.contact-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.contact-item h4 {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.contact-item p {
  font-size: var(--text-base);
  color: var(--text-primary);
  margin-bottom: 0;
}

.contact-item a {
  color: var(--accent);
  font-weight: var(--weight-semibold);
}

.contact-form-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: var(--space-8);
}

.contact-form-wrapper h3 {
  margin-bottom: var(--space-6);
}

/* Studio hours */
.studio-hours {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
}

.studio-hours h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
  font-size: var(--text-sm);
}

.hours-list li:last-child {
  border-bottom: none;
}

.hours-list .day {
  color: var(--text-secondary);
}

.hours-list .time {
  color: var(--accent);
  font-weight: var(--weight-semibold);
}

.contact-grid.no-form {
  grid-template-columns: 1fr;
}

.contact-grid.no-form .contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: start;
}

.contact-grid.no-form .studio-hours {
  margin-top: 0;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .contact-grid.no-form .contact-info {
    grid-template-columns: 1fr;
  }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-10);
}

.footer-info h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.footer-info p {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-sm);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-powered a {
  color: var(--text-muted);
  text-decoration: underline;
}

.footer-powered a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
}


:root {
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
