/* Project pages. Loaded after support.css, which supplies the tokens, aurora,
   card chrome and footer. Classes meant for hand-written content in
   data/projects/*.html: .feature-list, .gallery (.gallery.phone for portrait
   screenshots), .note, <kbd>. */

#container {
  max-width: 960px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  color: var(--text-primary);
}

/* Hero */
.project-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.project-icon {
  width: clamp(80px, 18vw, 112px);
  height: clamp(80px, 18vw, 112px);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.project-hero-text h1 {
  font-size: clamp(30px, 7vw, 44px);
  background: linear-gradient(135deg, #a371f7, #ec4899, #388bfd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.project-tagline {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 16px;
}

/* Download box */
.download-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  margin-bottom: 36px;
}

.download-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #8957e5, #388bfd);
  box-shadow: 0 8px 24px rgba(137, 87, 229, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* Store buttons take their platform's colour; direct downloads keep the gradient. */
.download-btn.android:not([download]) {
  background: linear-gradient(135deg, #238636, #2ea043);
  box-shadow: 0 8px 24px rgba(46, 160, 67, 0.3);
}

.download-btn.ios:not([download]) {
  background: linear-gradient(135deg, #1f6feb, #388bfd);
  box-shadow: 0 8px 24px rgba(56, 139, 253, 0.3);
}

.download-btn.web:not([download]) {
  background: linear-gradient(135deg, #d9822b, #ffa657);
  box-shadow: 0 8px 24px rgba(255, 166, 87, 0.3);
}

.download-btn .ic {
  font-size: 18px;
}

.download-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 12px 30px rgba(137, 87, 229, 0.45);
}

.download-btn:focus-visible,
.gallery img:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

.download-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.download-facts span + span::before {
  content: "\2022";
  margin-right: 14px;
  opacity: 0.5;
}

/* What's new */
.whats-new {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.whats-new h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.whats-new ul {
  margin: 0 0 10px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #c9d1d9;
}

.all-notes {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
}

.all-notes:hover {
  text-decoration: underline;
}

/* Hand-written content */
.project-content {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.65;
}

.project-content h3 {
  font-size: 20px;
  margin: 36px 0 12px;
  letter-spacing: -0.3px;
}

.project-content > :first-child {
  margin-top: 0;
}

.project-content p {
  margin: 0 0 14px;
}

.project-content p,
.project-content li {
  color: #c9d1d9;
}

.project-content a {
  color: var(--accent-blue);
}

.project-content kbd {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #0d1117;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-list strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
}

/* Portrait phone screenshots: narrower columns so they don't tower. */
.gallery.phone {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.gallery figure {
  margin: 0;
}

/* Never upscale: small crops (a menu) stay sharp at their own size. */
.gallery img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.gallery img:hover {
  transform: translateY(-3px);
}

.gallery figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.note {
  padding: 14px 16px;
  border-radius: 12px;
  border-left: 3px solid var(--accent-orange);
  background: rgba(255, 166, 87, 0.08);
  font-size: 14px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 7, 10, 0.88);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 600px) {
  .project-hero {
    gap: 16px;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
  }

  .download-facts {
    width: 100%;
    justify-content: center;
  }

  .download-facts span + span::before {
    content: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .download-btn,
  .gallery img {
    transition: none !important;
  }
}
