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

:root {
  --color-logo-bg: #ffe08e;
  --color-logo-text: #fff;
  --color-nav-bg: #f8f8f8;
  --color-nav-hover: #ce8651;
  --color-nav-text: #000;
  --color-body-bg: #fff;
  --color-text: #333;
  --color-text-muted: #777;
  --color-about-bg: #ffe08e;
  --color-footer-bg: #000;
  --color-footer-text: #fff;
  --color-accent: #ce8651;
  --font: 'Noto Sans SC', 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-body-bg);
  color: var(--color-text);
  line-height: 1.7;
  letter-spacing: 0.5px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s, background 0.3s;
}

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

/* === Header Area (banner bg) === */
.header-area {
  background: url('images/banner.png') center center / cover no-repeat;
  min-height: 300px;
}

/* === Logo Bar === */
.logo-bar {
  background: var(--color-logo-bg);
  padding: 16px 32px;
}

.logo-text {
  color: var(--color-logo-text);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* === Navigation === */
.main-nav {
  background: var(--color-nav-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
}

.nav-list li {
  flex: 1;
  text-align: center;
}

.nav-list a {
  display: block;
  padding: 18px 12px;
  font-size: 17px;
  font-weight: 400;
  color: var(--color-nav-text);
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
}

.nav-list a:hover {
  background: var(--color-nav-hover);
  color: #fff;
  border-left-color: var(--color-nav-hover);
  border-right-color: var(--color-nav-hover);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 14px 20px;
  cursor: pointer;
}

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

/* === Section Title === */
.section-title {
  font-size: 48px;
  font-weight: 300;
  text-align: center;
  color: #000;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

/* === About === */
.about {
  padding: 40px 0 60px;
}

.about-inner {
  width: 100%;
  display: flex;
  gap: 0;
}

.about-card {
  width: 58.333%;
  background: var(--color-about-bg);
  padding: 6em 2em;
  flex-shrink: 0;
  text-align: left;
}

.about-spacer {
  width: 42%;
}

.about-card h3 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #000;
  letter-spacing: 3px;
}

.about-card p {
  font-size: 17px;
  color: #000;
  line-height: 34px;
  letter-spacing: 2px;
  margin-bottom: 12px;
  padding-right: 5em;
}

.about-card strong {
  color: var(--color-text);
}

/* === Gallery === */
.gallery {
  padding: 5em 15px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.gallery-grid .gallery-item:nth-child(n+4) {
  margin-top: 2em;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 2px;
}

.gallery-item img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.gallery-item:hover img {
  transform: scale(1.2);
  transition-timing-function: ease-in-out;
}

/* === App Section === */
.app-section {
  padding: 0 20px 120px;
}

.app-screenshots {
  width: 80%;
  margin-left: 10%;
  margin-top: 30px;
  display: flex;
  gap: 0;
  justify-content: flex-start;
}

.app-screenshots img {
  width: 24%;
  margin-left: 0.5%;
  height: 450px;
  object-fit: cover;
  border: 1px solid #ccc;
}

/* === Footer === */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 32px 20px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
}

.footer-inner p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-footer-text);
}

.footer-inner a {
  color: var(--color-footer-text);
}

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

.license-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.e-license-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-footer-text);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 13px;
  transition: border-color 0.3s, background 0.3s;
}

.e-license-link:hover {
  border-color: var(--color-accent);
  background: rgba(206, 134, 81, 0.1);
  color: var(--color-accent);
}

.license-icon {
  color: #4a9eff;
  flex-shrink: 0;
}

.license-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 2px;
}

/* === Back to Top === */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 42px;
  height: 42px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: #b87340;
}

/* === Lightbox === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 200;
  display: none;
  cursor: pointer;
}

.lightbox-overlay.active {
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 202;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 32px;
  padding: 16px 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  z-index: 202;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

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

/* === Responsive === */
@media (max-width: 768px) {
  .logo-text {
    font-size: 32px;
  }

  .nav-toggle {
    display: block;
    margin: 0 auto;
  }

  .nav-list {
    display: none;
    flex-direction: column;
  }

  .nav-list.open {
    display: flex;
  }

  .section-title {
    font-size: 32px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-item img {
    height: 200px;
  }

  .app-screenshots {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .app-screenshots img {
    width: 48%;
    height: 300px;
    margin-bottom: 10px;
  }

  .about-card {
    padding: 24px 20px;
    width: 100%;
  }

  .about-spacer {
    display: none;
  }
}

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

  .app-screenshots img {
    width: 100%;
    height: 260px;
  }
}
