:root {
  --bg-color: #0f0f11;
  --text-color: #f4f4f4;
  --accent-color: #333333;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body.light-mode {
  --bg-color: #f4f4f4;
  --text-color: #0f0f11;
  --accent-color: #cccccc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none; /* Custom cursor */
}

::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  transition: background-color 0.8s ease, color 0.8s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo, .caption, .nav button {
  font-family: var(--font-display);
  text-transform: uppercase;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100vh;
  background-color: var(--bg-color);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.preloader-text { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; letter-spacing: 0.5rem; text-align: center; }
.preloader-progress { margin-top: 1rem; font-size: 1rem; color: #666; }

/* Custom Cursor */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border: 1px solid var(--text-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
  mix-blend-mode: difference;
}
.cursor.active {
  width: 60px; height: 60px;
  background-color: var(--text-color);
  border: none;
}

/* Header */
.header {
  position: fixed;
  top: 0; width: 100%;
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  mix-blend-mode: difference;
  color: #fff;
}
.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: 2px; }
.nav { display: flex; gap: 2rem; }
.theme-toggle, .menu-btn {
  background: none; border: none; color: inherit;
  font-size: 1rem; font-weight: 700;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4rem;
}
.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  overflow: hidden;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.hero-content {
  margin-top: 10vh;
}
.hero-title {
  font-size: clamp(4rem, 10vw, 12rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -2px;
  pointer-events: none;
}
.hero-title.indent { margin-left: 10vw; color: transparent; -webkit-text-stroke: 1px var(--text-color); }
.hero-subtitle {
  font-size: 1.2rem; margin-top: 2rem; max-width: 400px; line-height: 1.5;
}
.scroll-indicator {
  position: absolute; bottom: 40px; left: 4rem;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
}

/* Horizontal Gallery */
.gallery-container {
  height: 100vh;
  position: relative;
  overflow: hidden;
}
.gallery-wrapper {
  display: flex;
  height: 100%;
  width: fit-content;
  flex-wrap: nowrap;
}
.panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 8rem 4rem;
}
.gallery-header { width: 50vw; justify-content: center; }
.gallery-header h2 { font-size: clamp(3rem, 6vw, 8rem); line-height: 1; margin-bottom: 2rem; }
.gallery-header p { font-size: 1.2rem; color: #888; }
.gallery-item {
  width: 60vw;
  position: relative;
}
.gallery-item figure {
  width: 100%; height: 70vh;
  overflow: hidden;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gallery-item:hover img {
  transform: scale(1.05); /* strict 1.03x - 1.05x hover scale req */
}
.caption {
  margin-top: 2rem; font-size: 1.2rem; border-top: 1px solid var(--accent-color); padding-top: 1rem;
}
.gallery-end {
  width: 40vw; justify-content: center; text-align: center;
}
.gallery-end h3 { font-size: 3rem; color: #555; }

/* About Section */
.spacer { min-height: 100vh; padding: 8rem 4rem; display: flex; flex-direction: column; justify-content: center;}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.about-img {
  width: 100%; aspect-ratio: 3/4; overflow: hidden;
}
.about-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s;
}
.about-img:hover img { transform: scale(1.03); }
.section-title {
  font-size: 3rem; margin-bottom: 2rem;
}
.about-text p {
  font-size: 1.4rem; line-height: 1.6; color: #aaa; margin-bottom: 3rem;
}
.gear-list h4 { font-size: 1rem; color: #fff; margin-bottom: 1rem; letter-spacing: 2px; }
.gear-list ul { list-style: none; color: #888; line-height: 2; }

/* Contact */
.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.contact-form {
  margin-top: 4rem;
}
.input-group {
  position: relative;
  margin-bottom: 2rem;
}
.input-group input, .input-group select {
  width: 100%; background: none; border: none;
  font-size: 1.5rem; color: var(--text-color);
  padding: 1rem 0; font-family: var(--font-body);
  appearance: none;
}
.input-group input:focus { outline: none; }
.line-effect {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 1px;
  background-color: var(--accent-color);
}
.submit-btn {
  margin-top: 2rem; padding: 1.5rem 4rem;
  background: transparent; color: var(--text-color);
  border: 1px solid var(--text-color);
  font-family: var(--font-display);
  font-size: 1.2rem; cursor: none;
  transition: background 0.3s, color 0.3s;
}
.submit-btn:hover { background: var(--text-color); color: var(--bg-color); }

/* Footer */
.footer {
  padding: 2rem 4rem; text-align: center; font-size: 0.9rem; color: #555;
}

/* Unified Gallery Masonry */
.unified-gallery {
  padding: 4rem 4rem;
}
.masonry-grid {
  column-count: 2; /* Desktop */
  column-gap: 2rem;
  width: 100%;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}
.masonry-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.5s;
}
.masonry-item:hover img {
  transform: scale(1.05); /* Same 1.05x hover scale req */
}
/* Optional Hover dimming on grid */
.masonry-grid:hover .masonry-item:not(:hover) img {
  filter: brightness(0.6);
}

/* -----------------------------------
   RESPONSIVENESS & DEVICE SUPPORT
------------------------------------- */

/* Touch Device Overrides */
@media (hover: none) and (pointer: coarse) {
  .cursor { display: none !important; }
  * { cursor: auto !important; }
}

/* Tablet (1024px) */
@media (max-width: 1024px) {
  .header { padding: 1.5rem 2rem; }
  .hero { padding: 0 2rem; }
  .spacer { padding: 4rem 2rem; }
  .hero-title { font-size: clamp(3rem, 8vw, 8rem); }
  .gallery-header h2 { font-size: clamp(2.5rem, 5vw, 6rem); }
  .gallery-item { width: 70vw; }
  .panel { padding: 6rem 2rem; }
  .masonry-grid { column-count: 2; }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  .hero-title { font-size: 3.5rem; letter-spacing: -1px; }
  .hero-title.indent { margin-left: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .panel { padding: 4rem 2rem; height: auto; }
  
  /* Disable horizontal scroll wrapper on mobile, stack items instead */
  .gallery-container { height: auto; overflow: visible; }
  .gallery-wrapper { flex-direction: column; width: 100%; height: auto; }
  .gallery-header, .gallery-item, .gallery-end { width: 100%; margin-bottom: 3rem; }
  .gallery-item figure { height: 50vh; }
  
  .masonry-grid { column-count: 1; }
  .unified-gallery { padding: 3rem 1.5rem; }
  
  .contact-inner { padding: 0 1rem; }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
  .header { padding: 1rem 1rem; }
  .hero { padding: 0 1rem; }
  .spacer { padding: 3rem 1rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1rem; margin-top: 1rem; }
  .section-title { font-size: 2.2rem; }
  .about-text p { font-size: 1.1rem; }
  .submit-btn { width: 100%; padding: 1rem; }
  .gallery-header h2 { font-size: 3rem; }
}
