@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Work+Sans:wght@300;400;500;600&display=swap");

:root {
  --rose-1: #f7d6d9;
  --rose-2: #fff1ee;
  --rose-3: #c56a79;
  --rose-4: #e7b5bf;
  --wine: #5a1f2e;
  --cream: #fffaf6;
  --sand: #f2e6df;
  --ink: #3f1b26;
  --shadow: 0 18px 40px rgba(63, 27, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.55), transparent 40%),
    radial-gradient(circle at 85% 8%, rgba(255, 255, 255, 0.35), transparent 35%),
    linear-gradient(135deg, var(--rose-1), var(--rose-2));
  font-family: "Work Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  padding: 2rem 1.25rem;
}

.card {
  background: var(--cream);
  padding: 2.85rem 2.6rem;
  border-radius: 22px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 780px;
  width: min(92vw, 780px);
  border: 1px solid rgba(90, 31, 46, 0.1);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  position: relative;
}

body.unlocked .card {
  opacity: 1;
  transform: translateY(0);
}

h1,
h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0.4rem 0 0.6rem;
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  color: #6b2434;
}

h2 {
  margin: 0;
  font-size: 1.7rem;
  color: #6b2434;
}

.heart {
  color: var(--rose-3);
  margin-left: 0.25rem;
  font-size: 0.9em;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.7rem;
  margin: 0;
  color: rgba(63, 27, 38, 0.6);
}

#message {
  font-size: 1.05rem;
  color: rgba(63, 27, 38, 0.7);
  margin: 0 0 1.4rem;
}

.rule {
  height: 1px;
  width: 120px;
  margin: 0.2rem auto 1.5rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(90, 31, 46, 0.35),
    transparent
  );
}

button {
  margin-top: 1.5rem;
  padding: 0.78rem 1.7rem;
  font-size: 0.92rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--rose-3), var(--rose-4));
  color: white;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(197, 106, 121, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(197, 106, 121, 0.32);
  filter: brightness(1.02);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hidden {
  display: none;
}

#secret {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--rose-3);
}

.login-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 250, 247, 0.96);
  backdrop-filter: blur(6px);
  z-index: 10;
  padding: 1.5rem;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.unlocked .login-gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  background: #ffffff;
  padding: 2.4rem 2.3rem;
  border-radius: 20px;
  width: min(92vw, 380px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(90, 31, 46, 0.1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 4px solid rgba(197, 106, 121, 0.5);
  pointer-events: none;
}

.gate-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  margin: 0;
  color: rgba(63, 27, 38, 0.6);
}

.gate-subtitle {
  margin: 0.6rem 0 1.5rem;
  color: rgba(63, 27, 38, 0.68);
}

.gate-label {
  display: block;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

input[type="password"],
select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(90, 31, 46, 0.2);
  font-size: 1rem;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  background: rgba(255, 255, 255, 0.95);
}

input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: rgba(197, 106, 121, 0.7);
  box-shadow: 0 0 0 3px rgba(197, 106, 121, 0.18);
}

.gate-error {
  margin-top: 1rem;
  color: #b23a56;
  font-weight: 600;
}

.album-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(90, 31, 46, 0.12);
  text-align: left;
}

.album-lead {
  margin: 0.4rem 0 1.4rem;
  color: rgba(63, 27, 38, 0.68);
}

.album-status {
  margin: 0 0 1rem;
  color: rgba(63, 27, 38, 0.65);
  font-style: italic;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.album-card {
  border: 1px solid rgba(90, 31, 46, 0.12);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(63, 27, 38, 0.12);
  padding: 0;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  font-family: "Work Sans", "Segoe UI", sans-serif;
}

.album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(63, 27, 38, 0.16);
}

.album-card:focus-visible {
  outline: 3px solid rgba(197, 106, 121, 0.45);
  outline-offset: 2px;
}

.album-cover {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: #fff3ee;
}

.album-card-body {
  padding: 0.95rem 1.1rem 1.1rem;
}

.album-card-title {
  margin: 0 0 0.3rem;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 1.3rem;
  color: #6b2434;
}

.album-card-subtitle {
  margin: 0;
  color: rgba(63, 27, 38, 0.65);
  font-size: 0.92rem;
}

.album-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(255, 250, 247, 0.92);
  backdrop-filter: blur(6px);
  z-index: 12;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.album-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.modal-open {
  overflow: hidden;
}

.album-modal-card {
  background: var(--cream);
  border-radius: 22px;
  padding: 2.1rem 2.2rem 2.4rem;
  width: min(92vw, 820px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(90, 31, 46, 0.12);
  position: relative;
  text-align: left;
}

.album-modal-header {
  margin-bottom: 1.1rem;
}

.album-modal-subtitle {
  margin: 0.4rem 0 0;
  color: rgba(63, 27, 38, 0.68);
}

.album-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  margin-top: 0;
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.album-frame {
  background: #ffffff;
  border-radius: 18px;
  padding: 0.85rem;
  box-shadow: 0 12px 24px rgba(63, 27, 38, 0.12);
  border: 1px solid rgba(90, 31, 46, 0.12);
}

.album-frame img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  background: #fff7f2;
}

.album-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  border-top: 1px solid rgba(90, 31, 46, 0.1);
  padding-top: 1rem;
}

.album-nav button {
  margin-top: 0;
  padding: 0.55rem 1.2rem;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

#photoCounter {
  font-weight: 600;
  color: rgba(63, 27, 38, 0.8);
  letter-spacing: 0.08em;
}

@media (max-width: 600px) {
  .card {
    padding: 2.2rem 1.6rem;
  }

  .album-grid {
    grid-template-columns: 1fr;
  }

  .album-cover {
    height: 200px;
  }

  .album-nav {
    flex-direction: column;
  }

  .album-modal-card {
    padding: 1.7rem 1.5rem 2rem;
  }
}
