@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cormorant-400.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/cormorant-600.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cormorant-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/great-vibes-400.woff2") format("woff2");
}

:root {
  --bg: #faf7f1;
  --bg-card: #ffffff;
  --ink: #3c3833;
  --ink-soft: #8a8178;
  --gold: #b08d57;
  --rose: #b76e79;
  --line: #e7e0d4;
  --shadow: 0 2px 8px rgba(60, 56, 51, 0.07), 0 12px 32px rgba(60, 56, 51, 0.06);
  --shadow-hover: 0 4px 12px rgba(60, 56, 51, 0.1), 0 18px 44px rgba(60, 56, 51, 0.12);
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.serif {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page {
  flex: 1;
  width: min(1200px, 100% - 2.5rem);
  margin-inline: auto;
}

a { color: inherit; }

ul { list-style: none; }

@media (min-width: 1440px) {
  body::before,
  body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 240px;
    background: url("/static/vine.svg") no-repeat center / 100% 100%;
    opacity: 0.8;
    pointer-events: none;
    z-index: -1;
  }
  body::before { left: 0; }
  body::after {
    right: 0;
    transform: scaleX(-1);
  }
}

.event-hero {
  margin-bottom: 2.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.event-hero img {
  display: block;
  width: 100%;
  height: clamp(240px, 36vw, 430px);
  object-fit: cover;
  object-position: 50% 25%;
}

.fade-in { animation: fadeIn 0.6s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.62rem 1.5rem;
  font-size: 0.95rem;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--gold);
  color: #fff;
}
.btn-primary:hover { background: #9a7a49; }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-soft); }
.btn-small { padding: 0.35rem 1rem; font-size: 0.85rem; }

.login-body .page { display: flex; }
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.login-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 3.25rem 2.75rem 2.75rem;
  width: min(440px, 100%);
  text-align: center;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(176, 141, 87, 0.35);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 2.6rem;
  height: 1px;
  background: var(--line);
}
.login-card h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.login-hint { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.75rem; }
.pw-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  padding: 0.7rem 1.25rem;
  font-size: 1rem;
  text-align: center;
  color: var(--ink);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.pw-input:focus { border-color: var(--gold); }
.login-error { color: var(--rose); font-size: 0.9rem; margin-bottom: 1rem; }
.login-card .btn { width: 100%; }

.site-header {
  position: relative;
  padding: 2.75rem 0 0;
  text-align: center;
}
.logout-form { position: fixed; top: 1rem; right: 1rem; z-index: 20; }
.script {
  font-family: "Great Vibes", "Cormorant Garamond", Georgia, cursive;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.site-title { font-size: clamp(2.9rem, 6vw, 4.2rem); }
.site-title a { text-decoration: none; }
.subtitle {
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}
.login-card .subtitle { margin-bottom: 1.4rem; }
.rings {
  width: 96px;
  height: auto;
  margin: 0.6rem 0 0.2rem;
}
.tabs {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab {
  padding: 0.6rem 0.15rem;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }

main { padding: 2.75rem 0 4rem; }

.empty-hint { color: var(--ink-soft); text-align: center; padding: 4rem 0; }

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.75rem;
}
.folder-card a {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.folder-card a:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--shadow-hover);
}
.folder-cover {
  aspect-ratio: 4 / 3;
  background: var(--line);
}
.folder-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.folder-cover-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 1.6rem;
}
.folder-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 1rem 1.1rem 1.15rem;
}
.folder-name {
  font-size: 1.45rem;
  text-transform: capitalize;
}
.folder-count {
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
}

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.back-link {
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.back-link:hover { color: var(--ink); }
.folder-title {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  text-transform: capitalize;
  line-height: 1.15;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.photo-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.tile-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: none;
}
.tile-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.photo-tile:hover .tile-open img { transform: scale(1.04); }
.tile-download {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.photo-tile:hover .tile-download,
.tile-download:focus-visible { opacity: 1; }
@media (hover: none) { .tile-download { opacity: 1; } }

.lightbox {
  border: 0;
  padding: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: rgba(20, 17, 14, 0.96);
  color: #eee;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(20, 17, 14, 0.96); }
.lb-figure {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 3.25rem 3.5rem 4rem;
}
.lb-figure img {
  max-width: 100%;
  max-height: calc(100dvh - 7.25rem);
  object-fit: contain;
  border-radius: 4px;
}
.lightbox button {
  position: absolute;
  z-index: 2;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 2.4rem;
  line-height: 1;
  padding: 0.5rem 0.9rem;
  transition: color 0.2s ease;
}
.lightbox button:hover { color: #fff; }
.lb-close { top: 0.5rem; right: 0.75rem; }
.lb-prev { left: 0.25rem; top: 50%; transform: translateY(-50%); font-size: 3.2rem; }
.lb-next { right: 0.25rem; top: 50%; transform: translateY(-50%); font-size: 3.2rem; }
.lb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}
.lb-bar .btn-ghost { color: rgba(255, 255, 255, 0.85); border-color: rgba(255, 255, 255, 0.3); }
.lb-bar .btn-ghost:hover { color: #fff; border-color: #fff; }

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.75rem 1rem 2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.footer-line {
  width: 3.5rem;
  height: 1px;
  background: var(--line);
}
.footer-text {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  white-space: nowrap;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.becci .heart {
  font-size: 0.5em;
  font-style: normal;
  vertical-align: 0.75em;
  margin-left: 0.1em;
  color: var(--rose);
}

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
  .site-header { padding-top: 1.5rem; }
  .lb-figure { padding: 3rem 0.5rem 3.5rem; }
  .lb-figure img { max-height: calc(100dvh - 6.5rem); }
  .lb-prev, .lb-next { display: none; }
}
