/* ========================================
   Sims Slabs — Stylesheet
   ======================================== */

/* --- Custom Properties --- */
:root {
  --color-cream: #F5F0EB;
  --color-warm-white: #FAF7F4;
  --color-sand: #D4C5B2;
  --color-wood-light: #D4A574;
  --color-wood-medium: #8B6F47;
  --color-wood-dark: #5C4A2E;
  --color-charcoal: #2C2418;
  --color-accent: #A0522D;

  --bg-primary: var(--color-warm-white);
  --bg-secondary: var(--color-cream);
  --text-primary: var(--color-charcoal);
  --text-secondary: var(--color-wood-dark);
  --text-on-dark: var(--color-cream);
  --accent: var(--color-accent);
  --accent-hover: var(--color-wood-dark);

  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  --max-width: 1200px;
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
}

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

.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;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--accent);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--accent-hover);
  color: var(--text-on-dark);
  transform: translateY(-2px);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent);
  color: var(--text-on-dark);
  border-radius: var(--radius);
  z-index: 200;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-xs);
}

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

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-charcoal);
  padding: 0 5%;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-on-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-logo:hover {
  color: var(--color-wood-light);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-menu a {
  color: var(--color-sand);
  font-size: 0.95rem;
  font-weight: 500;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--text-on-dark);
  border-bottom-color: var(--color-wood-light);
}

.nav-social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-social a {
  color: var(--color-sand);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.nav-social a:hover {
  color: var(--text-on-dark);
}

.nav-social svg {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-on-dark);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-xl) 5%;
  background: linear-gradient(rgba(44, 36, 24, 0.55), rgba(44, 36, 24, 0.55)),
              url('../images/sims-slabs-bowl-collection-hero.webp') center/cover no-repeat;
  color: var(--text-on-dark);
}

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

.hero p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: var(--space-md);
  opacity: 0.9;
  max-width: 600px;
}

.hero .btn {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

/* --- Section Base --- */
.section {
  padding: var(--space-xl) 5%;
}

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

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.about-image img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: var(--space-sm);
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* --- Process --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.process-step {
  text-align: center;
}

.process-step img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-sm);
}

.process-step h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
}

.process-step p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Gallery Preview (Landing) --- */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.preview-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.preview-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.preview-card .card-label {
  padding: var(--space-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

/* --- Social / CTA Links --- */
.cta-links {
  text-align: center;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  background-color: var(--color-charcoal);
  color: var(--text-on-dark);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-btn:hover {
  background-color: var(--accent);
  color: var(--text-on-dark);
  transform: translateY(-2px);
}

.cta-btn svg {
  width: 20px;
  height: 20px;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-charcoal);
  color: var(--color-sand);
  padding: var(--space-lg) 5%;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.footer-social a {
  color: var(--color-sand);
  display: flex;
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: var(--text-on-dark);
}

.footer-social svg {
  width: 24px;
  height: 24px;
}

.site-footer p {
  font-size: 0.875rem;
  opacity: 0.7;
}

.footer-credit a {
  color: var(--color-sand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit a:hover {
  color: var(--text-on-dark);
}

/* --- Gallery Page Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-sm);
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(44, 36, 24, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius);
}

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

.gallery-item:hover::after,
.gallery-item:focus-visible::after {
  opacity: 1;
}

.gallery-item:focus-visible,
.preview-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent);
  border-radius: var(--radius);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-entering {
  opacity: 0;
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: 1.8rem;
}

.lightbox-prev {
  left: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-caption {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.95rem;
  opacity: 0.8;
  text-align: center;
}

/* --- Responsive: Tablet (768px) --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: var(--space-sm) 0;
    gap: 0;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-social {
    display: none;
    width: 100%;
    justify-content: center;
    padding: var(--space-sm) 0;
  }

  .nav-social.is-open {
    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);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .section {
    padding: var(--space-lg) 5%;
  }

  .hero {
    min-height: 70vh;
    padding: var(--space-lg) 5%;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Responsive: Phone (480px) --- */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-preview-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
