:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #777777;
  --paper: #f7f7f5;
  --surface: #ffffff;
  --line: #deded9;
  --soft: #efefec;
  --dark: #111111;
  --danger: #9d2f2f;
  --whatsapp: #1f8f4d;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 96px 96px;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1220px, calc(100% - 34px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  align-items: center;
}

.brand-logo {
  display: block;
  width: min(235px, 68vw);
  height: auto;
  margin: 0;
}

.brand-logo.small {
  width: 132px;
}

.login-panel {
  width: min(640px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 58px 54px;
}

.login-panel::before {
  content: none;
}

.login-brand,
.login-copy,
.ticket-form {
  margin-left: 0;
  margin-right: 0;
}

.login-brand {
  display: grid;
  gap: 22px;
  padding-top: 0;
  margin-bottom: 46px;
}

.login-brand span,
.eyebrow,
.section-title span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-brand span,
.eyebrow,
.section-title span {
  color: var(--muted);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

.login-copy p:last-child,
.guest {
  max-width: 430px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.ticket-form {
  margin-top: 34px;
  padding-bottom: 0;
}

.ticket-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  border: 1px solid var(--dark);
}

input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 0;
  outline: none;
}

input:focus {
  box-shadow: inset 0 0 0 2px var(--dark);
}

button,
.action-button {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 0 18px;
  color: #fff;
  background: var(--dark);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover,
.action-button:hover {
  background: #333;
}

button svg,
.action-button svg,
.photo-caption svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.button-icon {
  font-size: 1.05rem;
}

.ghost-button {
  color: var(--dark);
  background: transparent;
  border: 1px solid var(--dark);
}

.ghost-button:hover {
  color: #fff;
  background: var(--dark);
}

.feedback {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.gallery-view {
  width: 100%;
  align-self: start;
}

.gallery-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 54px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.topbar-brand {
  display: flex;
  align-items: center;
}

.album-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: end;
  margin-bottom: 56px;
  padding: 18px 0 58px;
  border-bottom: 1px solid var(--line);
}

.album-hero h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(4rem, 10vw, 8.4rem);
}

.album-hero .guest {
  margin-bottom: 0;
}

.album-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
}

.album-summary {
  min-width: 132px;
  padding: 18px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--dark);
}

.album-summary.muted {
  background: var(--soft);
  border-color: var(--line);
}

.album-summary span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 400;
}

.album-summary strong {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.section-title strong {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  overflow: hidden;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
}

.photo-preview {
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 260px;
  padding: 0;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  background: #e7e7e2;
  display: block;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: transform 280ms ease, filter 280ms ease;
}

.photo-card:hover img {
  filter: grayscale(0);
  transform: scale(1.025);
}

.photo-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.78rem;
  font-weight: 900;
}

.photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 54px 16px 14px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.photo-caption strong,
.photo-caption span {
  display: block;
}

.photo-caption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 400;
}

.photo-caption span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.action-button {
  min-height: 54px;
  padding: 0 12px;
  font-size: 0.88rem;
}

.action-button.whatsapp {
  background: var(--dark);
}

.action-button.whatsapp:hover {
  background: var(--whatsapp);
}

.empty-state {
  padding: 44px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.empty-state h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.viewer {
  width: min(1180px, calc(100% - 28px));
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #f6f6f3;
  color: var(--dark);
  box-shadow: var(--shadow);
}

.viewer::backdrop {
  background: rgba(246, 246, 243, 0.92);
  backdrop-filter: blur(3px);
}

.viewer img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
  background: #111;
}

.viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: #f6f6f3;
  border-bottom: 1px solid var(--line);
}

.viewer-top strong,
.viewer-top span {
  display: block;
}

.viewer-top strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 400;
}

.viewer-top span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

.icon-button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--dark);
  background: #fff;
  border: 1px solid var(--line);
}

.icon-button:hover {
  color: #fff;
  background: var(--dark);
}

.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
}

.viewer-nav:hover {
  transform: translateY(-50%);
}

.viewer-prev {
  left: 24px;
}

.viewer-next {
  right: 24px;
}

.viewer-actions {
  display: flex;
  gap: 0;
  justify-content: flex-end;
  background: #f6f6f3;
  border-top: 1px solid var(--line);
}

.viewer-actions .action-button {
  min-width: 160px;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .album-hero {
    grid-template-columns: 1fr;
  }

  .album-stats {
    width: 100%;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 22px, 1220px);
    padding: 16px 0;
  }

  .login-panel {
    padding: 34px 26px;
  }

  .form-row,
  .gallery-topbar,
  .section-title {
    grid-template-columns: 1fr;
    display: grid;
  }

  h1,
  .album-hero h1 {
    font-size: 3.15rem;
  }

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

  .photo-preview {
    aspect-ratio: 4 / 4.8;
    min-height: 300px;
  }

  .viewer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .viewer-actions .action-button {
    min-width: 0;
  }

  .viewer-nav {
    top: auto;
    bottom: 78px;
  }
}
