/* /src/styles/landing.css */

/* ======================
   Layout wrappers
   ====================== */

.landing-wrap {
  padding: 3.5rem 1rem 4.5rem;
}

.landing-container {
  max-width: 960px;
  margin: 0 auto;
  background: var(--card);
  color: var(--text);
  border-radius: 18px;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  padding: 2.4rem 2.1rem 2.2rem;
  border: 1px solid var(--border);
}

/* ======================
   Hero
   ====================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  text-align: center;
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: 1.9rem;
  margin: 0 0 0.35rem;
}

.hero-subtitle {
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.hero-copy .btn {
  min-width: 220px;
  display: inline-flex;
  justify-content: center;
}

.hero-copy .btn.btn--cta {
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(23, 125, 255, 0.55);
}

.hero-copy .btn.primary {
  margin-top: 0.25rem;
  background: linear-gradient(135deg, #1559d6, #1d6bff);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

#cta-request {
  margin-bottom: 0.35rem;
}

#login-message {
  margin-top: 0.25rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ======================
   Landing copy
   ====================== */

.about {
  margin-top: 0.75rem;
}

.about h2 {
  margin: 1rem 0 0.5rem;
}

.about p {
  max-width: 700px;
  margin: 0.75rem 0;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--muted);
}

/* About-specific exercise list overrides */

.about ul,
.about .exercise-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.about .exercise-list li::marker {
  content: "";
}

.about p,
.about .exercise-list {
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  max-width: 60ch;
}

.about .exercise-list {
  display: grid;
  gap: 1rem;
}

.about .exercise-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.about .ex-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex: 0 0 auto;
  margin-top: 2px;
}

.about .ex-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .about .exercise-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* ======================
   Gallery + thumbnails
   ====================== */

.gallery {
  background: var(--gallery-bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--gallery-bg);
  gap: 16px;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

.gallery .thumb {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  box-shadow: none !important;
  min-width: 0 !important;
  color: inherit !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  overflow: hidden;
  background: var(--thumb-bg);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.gallery .thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}

.gallery .thumb:hover,
.gallery .thumb:focus {
  box-shadow:
    0 4px 24px #3490ff77,
    0 0 0 2px #3490ff;
  transform: translateY(-4px) scale(1.025);
  outline: none;
}

.gallery .thumb:hover img,
.gallery .thumb:focus img {
  filter: brightness(0.7) sepia(1) hue-rotate(180deg) saturate(4);
  opacity: 0.9;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

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

  section.gallery .thumb {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  section.gallery .thumb img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

/* ======================
   Lightbox
   ====================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  z-index: 60;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: #000;
}

.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  top: 24px;
  background: color-mix(in oklab, var(--card), black 10%);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.lb-close {
  right: 24px;
  font-size: 20px;
}

.lb-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 480px) {
  .lb-prev,
  .lb-next {
    top: 68%;
  }
}

/* ======================
   Responsive tweaks
   ====================== */

/* Mobile padding / layout */
@media (max-width: 480px) {
  .landing-wrap {
    margin-top: 56px !important;
  }

  .landing-container {
    padding: 1.8rem 1.3rem 2.2rem;
  }

  .hero {
    margin-top: 12px !important;
  }

  .hero-copy {
    padding-top: 8px !important;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-copy .btn {
    width: 100%;
  }

  .about,
  .gallery {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
}

/* Tablet text tweaks (landing + request) */
@media (min-width: 481px) and (max-width: 820px) {
  .hero-subtitle {
    text-align: center !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .about,
  .about p,
  .about h2 {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }
}

/* Landing: hamburger shows only theme row */
@media (max-width: 768px) {
  html.is-landing .topbar.open .topbar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  html.is-landing .topbar.open .theme-row {
    display: flex;
  }
}
