/* Emma & Ben — wedding gallery */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #2b2b2b;
  --soft: #8a8a8a;
  --line: #e3ddd5;
  --accent: #9a8f7a;
  --accent-dark: #7d735f;
  --gutter: 8px;
}

html { background: #ffffff; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */

.site-header {
  text-align: center;
  padding: 72px 24px 40px;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

h1 .amp {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  padding: 0 0.08em;
}

.date {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--soft);
  margin-top: 10px;
  letter-spacing: 0.12em;
}

.rule {
  width: 64px;
  height: 1px;
  background: var(--line);
  margin: 28px auto;
}

.count {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 26px;
}

.download-all {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  padding: 14px 34px;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.download-all:hover { background: var(--accent-dark); }

.download-note {
  font-size: 0.74rem;
  color: var(--soft);
  margin-top: 12px;
  letter-spacing: 0.04em;
}

/* ---------- gallery ---------- */

.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
}

.g-row {
  display: flex;
  gap: var(--gutter);
  margin-bottom: var(--gutter);
}

.g-item {
  display: block;
  overflow: hidden;
  background: #f4f1ec;
  cursor: zoom-in;
  border: 0;
  padding: 0;
  flex-shrink: 0;
}

.g-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.g-item img.loaded { opacity: 1; }

.g-item:hover img { opacity: 0.92; }

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 30px 24px 60px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  color: var(--soft);
  font-size: 1rem;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 11, 10, 0.96);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lb-figure {
  position: absolute;
  inset: 0 0 64px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-btn {
  position: absolute;
  z-index: 102;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 16px;
  transition: color 0.15s ease;
  font-family: Georgia, serif;
}

.lb-btn:hover { color: #fff; }

.lb-close { top: 8px; right: 12px; font-size: 1.5rem; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

.lb-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.lb-download {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 8px 22px;
  border-radius: 2px;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lb-download:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

@media (max-width: 600px) {
  .site-header { padding: 48px 20px 32px; }
  .lb-prev, .lb-next { font-size: 2rem; padding: 12px 8px; }
}

/* ---------- login ---------- */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 48px 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.login-card h1 { font-size: 2.4rem; }

.login-intro {
  font-size: 0.9rem;
  color: var(--soft);
  margin-bottom: 28px;
  line-height: 1.6;
}

.login-card form { text-align: left; }

.login-card label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 18px 0 6px;
}

.login-card input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fdfcfa;
  color: var(--ink);
}

.login-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-card button {
  width: 100%;
  margin-top: 26px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 2px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-card button:hover { background: var(--accent-dark); }
.login-card button:disabled { opacity: 0.6; cursor: default; }

.login-error {
  color: #a4503f;
  font-size: 0.85rem;
  margin-top: 14px;
  line-height: 1.5;
}
