/* ================================
   ARCTA STUDIO SPW — STYLE.CSS (MOBILE FIRST)
   ================================ */

/* ROOT VARIABLES */
:root {
  --royal-blue: #0d1b2a;
  --royal-blue-light: #1b2a41;
  --silver: #c0c0c0;
  --silver-light: #e0e0e0;
  --gold: #d4af37;
  --gold-light: #e8c874;
  --gold-dark: #b38f2a;
  --white: #ffffff;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --section-spacing: 4rem;
  --logo-primary-color: rgba(255, 255, 255, 0.9);
  --logo-secondary-color: rgba(40, 40, 40, 0.15);
  --logo-shadow-color: rgba(0, 0, 0, 0.3);
  --logo-glow-color: rgba(255, 255, 255, 0.2);
  --logo-accent-color: rgba(100, 150, 255, 0.6);
  --logo-tooltip-color: rgba(0, 0, 0, 0.7);
}

/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--royal-blue);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  padding-bottom: 140px;
  text-align: justify;
  -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
}

/* ANIMATED BACKGROUND */
.animated-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: flex;
  flex-wrap: wrap;
  pointer-events: none;
  overflow: hidden;
}

.tile {
  width: 100px;
  height: 100px;
  background-image: url('/assets/tile.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.08;
  animation: float 8s ease-in-out infinite;
  will-change: transform;
}

.tile:nth-child(4n) { animation-delay: 0.8s; }
.tile:nth-child(4n+1) { animation-delay: 1.6s; }
.tile:nth-child(4n+2) { animation-delay: 2.4s; }
.tile:nth-child(4n+3) { animation-delay: 3.2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-20px) rotate(3deg) scale(1.05); }
}

/* MAIN STRUCTURE */
main, section {
  width: 100%;
  padding: 1.5rem;
  z-index: 10;
  max-width: 100vw;
  overflow: hidden;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 { 
  font-size: 2rem;
  line-height: 1.2;
}
h2 { 
  font-size: 1.5rem; 
  margin-top: 1.5rem;
  line-height: 1.3;
}
p {
  font-size: 1rem;
  color: var(--silver-light);
  margin-bottom: 1.5rem;
  font-weight: 300;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* GALLERY STYLES */
.gallery-panel {
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
  max-width: 100%;
  box-sizing: border-box;
}

.gallery-panel .dropzone {
  border: 2px dashed var(--gold);
  padding: 2rem 1rem;
  border-radius: 18px;
  font-size: 1rem;
  background: rgba(255,255,255,0.02);
  color: var(--gold-light);
  transition: 0.3s ease;
  cursor: pointer;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.gallery-panel .dropzone.hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold-dark);
}

.gallery-panel .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  width: 100%;
}

.gallery-panel .media-thumb {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1rem;
  backdrop-filter: blur(6px);
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.gallery-panel .media-thumb:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.gallery-panel .media-container {
  height: 0;
  padding-bottom: 133%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1rem;
  width: 100%;
}

.gallery-panel .media-thumb img,
.gallery-panel .media-thumb video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.gallery-panel .media-info {
  padding: 0.5rem 0;
  width: 100%;
  overflow: hidden;
}

.gallery-panel .media-info p {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.gallery-panel .delete-btn {
  background: darkred;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.gallery-panel .delete-btn:hover {
  background: #a61111;
}

/* FOOTER */
footer {
  padding: 2rem 1rem;
  text-align: center;
  z-index: 10;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.footer-logo {
  height: 60px;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.4));
  transition: var(--transition);
  max-width: 100%;
}

.footer-logo:hover {
  transform: translateY(-5px);
}

.copyright {
  margin-top: 1rem;
  color: var(--silver);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  width: 100%;
}

/* FORM ELEMENTS */
.checkbox-group {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--silver-light);
  font-size: 15px;
  line-height: 1.8;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
}

.checkbox-group label:hover {
  color: var(--gold-light);
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  transform: scale(1.1);
  cursor: pointer;
  flex-shrink: 0;
}

/* HERO SECTION */
.hero-section {
  background: url('/assets/hero.png') no-repeat center center / cover;
  padding: 4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

.about-overlay {
  max-width: 100%;
  padding: 2rem 1.5rem;
  border-radius: 24px;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.3);
  color: var(--silver-light);
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  width: calc(100% - 2rem);
  margin: 0 auto;
  box-sizing: border-box;
}

/* ANIMATIONS */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* MOBILE SPECIFIC ADJUSTMENTS */
@media (max-width: 767px) {
  body {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  main, section {
    padding: 1rem 0.5rem;
    width: 100vw;
    max-width: 100vw;
  }
  
  .gallery-panel {
    padding: 0 0.5rem;
  }
  
  .gallery-panel .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }
  
  .about-overlay {
    padding: 1.5rem 1rem;
  }
  
  p {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  
  .checkbox-group label {
    font-size: 0.9rem;
  }
}

/* ================================
   RESPONSIVE: TABLET & UP
   ================================ */
@media (min-width: 768px) {
  main, section {
    padding: 2rem 3rem;
  }

  .gallery-panel .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  .footer-logo { height: 70px; }
}

/* ================================
   RESPONSIVE: DESKTOP & UP
   ================================ */
@media (min-width: 1024px) {
  main, section, .gallery-panel {
    max-width: 1200px;
    margin: 0 auto;
  }

  .gallery-panel .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }

  .footer-logo { height: 80px; }
}