/* AMFS: bold editorial style */
:root {
  --paper: #fbf8f3;
  --ink: #111;
  --accent: #111;
  --muted: #666;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Section accent colors */
.theme-art     { --accent: #C4623D; }
.theme-music   { --accent: #1D3A7A; }
.theme-fashion { --accent: #FF1F8E; }
.theme-science { --accent: #0F7B7B; }

a { color: inherit; text-decoration: none; }

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 3px solid var(--ink);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
}
.logo {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}
.nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.nav a {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { border-bottom-color: var(--accent); }

/* Front page */
.home { flex: 1; padding: 3rem 1.5rem; text-align: center; }
.wordmark {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(5rem, 22vw, 14rem);
  line-height: 0.9;
  margin: 0;
  letter-spacing: -0.02em;
}
.tagline {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  margin: 1rem 0 2.5rem;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.tile {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 0.2s;
}
.tile:hover { transform: scale(1.02); }
.tile-art     { background: #C4623D; }
.tile-music   { background: #1D3A7A; }
.tile-fashion { background: #FF1F8E; }
.tile-science { background: #0F7B7B; }

/* Section pages */
.section, .upload, .login {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}
.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  color: var(--accent);
  margin: 0 0 1.5rem;
  line-height: 1;
}
.status { color: var(--muted); font-size: 0.9rem; }

.gallery {
  columns: 3 260px;
  column-gap: 1rem;
}
.gallery img {
  width: 100%;
  margin-bottom: 1rem;
  display: block;
  cursor: zoom-in;
  border: 2px solid var(--ink);
}

/* Sparkly Fashion: slow shimmer across the header and title */
.sparkle {
  background: linear-gradient(100deg, #FF1F8E 0%, #ff8ad0 25%, #FF1F8E 45%, #ffd1ea 55%, #FF1F8E 75%);
  background-size: 250% 100%;
  animation: shimmer 6s linear infinite;
  color: #fff;
  border-bottom-color: #fff;
}
.sparkle .logo, .sparkle .nav a { color: #fff; }
.sparkle-text {
  background: linear-gradient(100deg, #FF1F8E 0%, #ffb3de 30%, #FF1F8E 50%, #ffd1ea 70%, #FF1F8E 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sparkle, .sparkle-text { animation: none; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90vh; }
.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
}

/* Forms */
.form { display: flex; flex-direction: column; gap: 0.6rem; max-width: 420px; }
.form label { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.form input, .form select {
  padding: 0.7rem;
  font-size: 1rem;
  border: 2px solid var(--ink);
  background: #fff;
}
.form button {
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  margin-top: 0.5rem;
}
.error { color: #b00020; }

.dropzone {
  border: 2px dashed var(--ink);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  font-weight: 400;
  text-transform: none !important;
}
.dropzone input { display: none; }
.preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.5rem; }
.preview img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Footer */
.footer {
  border-top: 3px solid var(--ink);
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
}

@media (max-width: 640px) {
  .topbar { flex-direction: column; gap: 0.6rem; }
  .tiles { grid-template-columns: 1fr; }
}
