/* Color palette */
:root {
  /* Default stone theme */
  --bg-main: #0a0e14;
  --text-main: #e6e6e6;
  --text-muted: #bfc5d0;
  --accent: #bdb9a5; /* stone-like color */
  --accent-dark: #9a9683;
  --card-bg: #141a22;
  --card-shadow: rgba(0, 0, 0, 0.5);
}

/* Theme variables for red and blue variants; these will be applied via JS */
.theme-stone {
  --bg-main: #0a0e14;
  --text-main: #e6e6e6;
  --text-muted: #bfc5d0;
  --accent: #bdb9a5;
  --accent-dark: #9a9683;
  --card-bg: #141a22;
  --card-shadow: rgba(0, 0, 0, 0.5);
}
.theme-red {
  --bg-main: #1f1a1a;
  --text-main: #f5f5f5;
  --text-muted: #c9a1a1;
  --accent: #b5383f;
  --accent-dark: #8c2b33;
  --card-bg: #2b2020;
  --card-shadow: rgba(0, 0, 0, 0.5);
}
.theme-blue {
  --bg-main: #121a24;
  --text-main: #e6f0fa;
  --text-muted: #a7b6c7;
  --accent: #3f6db5;
  --accent-dark: #2c4e85;
  --card-bg: #1b2635;
  --card-shadow: rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

header {
  padding: 60px 20px;
  text-align: center;
  background: radial-gradient(circle at center, #1b2230 0%, var(--bg-main) 100%);
  position: relative;
  overflow: hidden;
}
header h1 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 10px;
}
header p {
  font-size: 1.1rem;
  color: var(--text-muted);
}
nav {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 25px;
}
nav a {
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
nav a:hover {
  background-color: #1d2733;
}

/* Theme switcher styling */
.theme-switcher {
  margin-left: 10px;
  padding: 4px 8px;
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--accent-dark);
  border-radius: 4px;
  font-size: 0.9rem;
}

.hero {
  padding: 80px 20px;
  text-align: center;
  position: relative;
}
.hero h2 {
  font-size: 2.4rem;
  margin-bottom: 20px;
}
.hero p.subheading {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}
.gate-piece {
  display: inline-block;
  padding: 16px 24px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background-color: #10151f;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 40px;
  box-shadow: 0 0 12px rgba(189,185,165,0.3);
  user-select: none;
}
.btn {
  display: inline-block;
  background-color: var(--accent);
  color: var(--bg-main);
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(189,185,165,0.4);
}
.section {
  padding: 80px 20px;
}
.section h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent);
}
.section p.lead {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 40px;
}
.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.service-item {
  position: relative;
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 24px;
  width: 280px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.service-item h4 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--accent);
}
.service-item p {
  font-size: 0.95rem;
  color: #c4cdd6;
}
.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px var(--card-shadow);
}

.cta {
  text-align: center;
  background-color: var(--card-bg);
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 60px 20px;
  margin: 60px 20px;
}

/* Gallery styles */
#gallery {
  padding: 80px 20px;
  background-color: var(--bg-main);
}
#gallery h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent);
}
#gallery .gallery-wrapper {
  position: relative;
  width: 40%; /* constrain width so prev/next arrows remain visible */
  max-width: 100%;
  overflow: hidden;
  margin: 0 auto;
}
#gallery .gallery-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
#gallery .gallery-item {
  flex: 0 0 300px;
  height: 200px;
  margin: 0 10px;
  background-color: var(--card-bg);
  border: 2px dashed var(--accent-dark);
  border-radius: 8px;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  text-transform: uppercase;
}
#gallery .gallery-nav {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 15px;
}
#gallery .gallery-nav button {
  background-color: var(--accent);
  color: var(--bg-main);
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease;
}
#gallery .gallery-nav button:hover {
  transform: translateY(-2px);
}
#gallery .see-more {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--accent);
}

@media (max-width: 768px) {
  #gallery .gallery-wrapper {
    width: 90%;
  }
}
.cta h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--accent);
}
.cta p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}
footer {
  background-color: var(--bg-main);
  padding: 40px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #7c8795;
}

/* Canvas overlay for crack effect */
.crack-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* TODO: might want to add nav links to responsive? 
         Or maybe collapse them into a hamburger menu?  */
@media (max-width: 640px) {
  .hero h2 { font-size: 1.8rem; }
  .service-item { width: 100%; }
}

/* .header-top-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  position: relative;
} */

.theme-container {
  display: flex;
  justify-content: center;
  transform: translateY(-80%);
}

.theme-label {
  margin-right: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.header-cracks-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gallery-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 30px;
}

.btn-transparent {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.contact-text-center {
  text-align: center;
  margin-top: 20px;
}