/* ===========================================
   styles.css — the look of the whole site.
   Change the colors below to restyle everything.
   =========================================== */

:root {
  --background: #faf9f7;   /* page color */
  --text: #1c1c1c;         /* main text color */
  --muted: #6b6b6b;        /* softer gray text */
  --accent: #1c1c1c;       /* button color */
  --gap: 6px;              /* space between gallery photos */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

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

a { color: inherit; }

/* ---------- Top navigation bar ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a {
  margin-left: 18px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-header nav a.active,
.site-header nav a:hover { color: var(--text); }

/* ---------- Home page ---------- */
.hero {
  position: relative;
  height: 75vh;
  min-height: 420px;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* fills the space without stretching */
}

.hero-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 20px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.hero-text h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.1;
}

.hero-text p { margin: 8px 0 0; opacity: 0.9; }

.intro {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 56px;
  text-align: center;
}

.intro p { color: var(--muted); margin: 0 0 24px; }

.button {
  display: inline-block;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- Gallery page ---------- */
.page-title {
  padding: 8px 20px 20px;
}

.page-title h1 { margin: 0; font-size: 1.8rem; font-weight: 600; }
.page-title p  { margin: 4px 0 0; color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 2 columns on phones */
  gap: var(--gap);
  padding: 0 var(--gap) var(--gap);
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;   /* square tiles */
  object-fit: cover;
  background: #e8e6e2;   /* gray box while the photo loads */
}

/* Bigger screens: more columns */
@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .hero-text { padding: 48px; }
  .hero-text h1 { font-size: 3.2rem; }
}

@media (min-width: 1100px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Albums page ---------- */
.albums {
  display: grid;
  grid-template-columns: 1fr;             /* 1 column on phones */
  gap: 12px;
  padding: 0 12px 12px;
}

.album {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #e8e6e2;                    /* gray tile for empty albums */
  text-decoration: none;
}

.album img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.album:hover img { transform: scale(1.03); }

.album-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.album.empty .album-text {
  color: var(--text);
  background: none;
}

.album-text h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.album-text p  { margin: 2px 0 0; font-size: 0.9rem; opacity: 0.75; }

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

@media (min-width: 700px) {
  .albums { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .albums { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Full-screen photo viewer ---------- */
.gallery img { cursor: zoom-in; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;   /* show the whole photo, no cropping */
}

.viewer-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 16px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

body.viewer-open { overflow: hidden; }
.viewer[hidden] { display: none; }
