/* Pupe Lomelin — Paella Catering | Mobile-first, elegant */

:root {
  --color-primary: #8b7355;
  --color-primary-dark: #6b5944;
  --color-primary-light: #a88b6a;
  --color-bg: #fdfcfa;
  --color-bg-alt: #f5f2ed;
  --color-text: #2c2a26;
  --color-text-muted: #5c574f;
  --color-border: #e8e4dc;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(44, 42, 38, 0.08);
  --shadow-hover: 0 8px 32px rgba(44, 42, 38, 0.12);
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--color-primary);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: #fff;
  font-weight: 500;
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--transition);
}
.skip-link:focus {
  top: var(--space-md);
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

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

.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-lg);
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}
.nav a:hover {
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 85vw);
    background: var(--color-bg);
    padding: var(--space-2xl) var(--space-lg) var(--space-lg);
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .header.nav-open .nav {
    transform: translateX(0);
  }
  .nav ul {
    flex-direction: column;
    gap: var(--space-md);
  }
  .nav a {
    font-size: 1.1rem;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(80px + var(--space-xl)) var(--space-md) var(--space-xl);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 50%);
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--color-primary);
  font-weight: 500;
  margin: 0 0 var(--space-md);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-desc {
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  border-radius: 1px;
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Sections */
.section {
  padding: var(--space-2xl) var(--space-md);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 var(--space-sm);
  text-align: center;
  color: var(--color-text);
}

.section-intro {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  font-size: 1.05rem;
}

/* Services */
.services {
  background: var(--color-bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--color-bg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.service-card h3 {
  font-size: 1.35rem;
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
}

.service-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.services-notes {
  margin-top: var(--space-xl);
  text-align: center;
}
.services-notes p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

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

.gallery-item {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.gallery-placeholder {
  aspect-ratio: 4/3;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.gallery-item figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
}

/* When you add real images, use:
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
*/

/* Contact */
.contact {
  background: var(--color-bg-alt);
}

.contact-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 560px;
  margin: 0 auto var(--space-lg);
}

@media (max-width: 480px) {
  .contact-methods {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  color: var(--color-text);
  border: 2px solid transparent;
}
.contact-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--color-border);
}

.contact-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
  color: var(--color-primary);
}

.contact-label {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.contact-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-primary-dark);
}

.contact-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  font-style: italic;
}

.contact-note {
  text-align: center;
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Footer */
.footer {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  background: var(--color-text);
  color: rgba(255,255,255,0.85);
}

.footer a {
  color: rgba(255,255,255,0.9);
}
.footer a:hover {
  color: #fff;
}

.footer-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-sm);
  border-radius: var(--radius);
  object-fit: contain;
  filter: brightness(1.1);
}

.footer-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: #fff;
}

.footer-tagline {
  margin: 0 0 var(--space-md);
  font-size: 0.9rem;
  opacity: 0.85;
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

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

/* Full gallery page (Cloudinary) */
.gallery-page-main {
  padding-top: calc(80px + var(--space-xl));
}

.container-wide {
  max-width: 1280px;
}

.gallery-cta-wrap {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.dynamic-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

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

@media (min-width: 1024px) {
  .dynamic-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-dynamic-item {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.gallery-dynamic-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.gallery-dynamic-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.gallery-status {
  text-align: center;
  color: var(--color-text-muted);
  min-height: 1.5em;
  margin-bottom: var(--space-md);
}

.gallery-status[hidden] {
  display: none !important;
}

.gallery-error-text {
  color: #9a3d3d;
}

/* ── Gallery thumb button ───────────────────────────────── */
.gallery-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-lg);
  overflow: hidden;
  outline-offset: 3px;
}
.gallery-thumb-btn:focus-visible {
  outline: 2px solid var(--color-primary);
}
.gallery-thumb-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}
.gallery-dynamic-item:hover .gallery-thumb-btn img,
.gallery-thumb-btn:focus-visible img {
  transform: scale(1.04);
  filter: brightness(1.05);
}

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(20, 18, 14, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  animation: lb-fade-in 0.2s ease;
}
.lightbox[hidden] { display: none !important; }

@keyframes lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 82vh;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: lb-img-in 0.25s ease;
}
@keyframes lb-img-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 510;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 510;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.25); }

.lightbox-counter {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin: 0;
}

@media (max-width: 480px) {
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
}
