/* style.css - improved gallery, accessible captions, responsive layout */
:root{
  --bg: #A8B5A0;
  --text: #F5F5DC;
  --muted: #ffffffe6;
  --accent: #4fa86d;
  --tile-width: 220px;
}

*{box-sizing:border-box}

html, body{
  height:100%;
  margin:0;
  padding: 1rem;
  font-family: 'Lato', sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

header, footer { 
  padding: 1rem;
  max-width:1100px;
  margin:0 auto;
}

header {
  display:flex;
  flex-direction: column;
  align-items:center;
  gap:1rem;
  margin-top: 5rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center; 
       
}

.logo {
  width: 90vw;
  max-width: 400px;
  height: auto;
}

.nav-container {
  display: flex;
  justify-content: center;
  gap: 12rem;

}

h1 { margin:0; font-size:1.6rem; color:var(--accent); letter-spacing: 0.1em; }

h2 { letter-spacing: 0.4em; margin-top:2em}

nav a.btn {
  display:inline;
  padding:0.5rem 1rem;
  color: var(--text);
  text-decoration:none;
  font-weight:600;
  letter-spacing: 0.5em;
}
nav a.btn:focus,
nav a.btn:hover { border-bottom: 3px solid; outline:none; }

/* Page container */
main {
  max-width:1100px;
  margin:1rem auto;
  padding:0 1rem 3rem;
}

main a {
  margin-right: 1rem;
}

/* Gallery grid */
.gallery {
  display:flex;
  flex-wrap:wrap;
  gap:20px;
  justify-content:center;
  align-items:flex-start;
  margin-top:1rem;
}

/* Each tile */
.tile {
  position:relative;
  width:var(--tile-width);
  flex: 0 1 calc(var(--tile-width));
  overflow:hidden;
  border-radius:8px;
  background:linear-gradient(180deg, #fff, #fafafa);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  transition:transform .18s ease, box-shadow .18s ease;
}
.tile:focus-within,
.tile:hover { transform:translateY(-6px); box-shadow:0 18px 40px rgba(0,0,0,.12); }

/* Image */
.tile img {
  display:block;
  width:100%;
  height: auto;
  vertical-align:middle;
}

/* Caption overlay */
.tile .description {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:12px;
  background:linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--bg) 50%);
  color: var(--text);
  transform:translateY(100%);
  opacity:0;
  transition:transform .22s ease, opacity .22s ease;
  font-size:0.9rem;
  line-height:1.3;
}

/* Visible on hover or keyboard focus */
.tile:hover .description,
.tile:focus-within .description {
  transform:translateY(0);
  opacity:1;
}

/* Make the title inside caption bold */
.tile .description .title { font-weight:700; display:block; margin-bottom:6px; letter-spacing: 0.5em; }

/* Series headings span full width above the grid */
.gallery-heading {
  width:100%;
  margin:1.2rem 0 0.4rem;
  font-size:1.1rem;
  color:var(--text);
  padding-left:6px;
  letter-spacing: 0.4em;
}

/* Responsive adjustments */
@media (max-width:720px){
  :root{ --tile-width: 46vw; }
  header, main { padding:0 0.8rem; }
}
@media (max-width:420px){
  :root{ --tile-width: 92vw; }
  h1 { font-size:1.3rem; }
}

@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
  }
}

/* Footer */
footer { text-align:center; color:var(--text); font-size:0.9rem; padding:1.5rem 0 3rem; }

/* Honeypot link - hidden from users but visible to bots */
.honeypot { display: none; }

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #333;
  font-size: 30px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #666;
}