:root {
  --bg: #edf7ff;
  --bg-strong: #ffffff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #f7fbff;
  --surface-border: rgba(111, 162, 207, 0.2);
  --text: #14324a;
  --text-muted: #56758c;
  --accent: #63a9dd;
  --accent-strong: #2f7fbe;
  --accent-soft: #dff1ff;
  --shadow: 0 18px 60px rgba(81, 131, 176, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --gutter: clamp(0.85rem, 1.8vw, 1.5rem);
  --step--1: 0.95rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.272rem;
  --step-3: 1.5rem;
  --step-4: 1.86rem;
  --step-5: 2.33rem;
  --step-6: 3.56rem;
  --line: rgba(111, 162, 207, 0.28);
  --hero-title-size: clamp(2.45rem, 4.15vw, 3.95rem);
  --subpage-title-size: clamp(2.35rem, 4vw, 3.65rem);
  --album-title-size: clamp(2rem, 2.7vw, 2.9rem);
  --lead-size: clamp(0.98rem, 1.12vw, 1.1rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(194, 228, 255, 0.72), transparent 34%),
    radial-gradient(circle at right 12% top 16%, rgba(220, 241, 255, 0.9), transparent 22%),
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.68;
  background-size: auto, auto, 24px 24px, 24px 24px, auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
  filter: blur(0.5px);
}

body::before {
  top: 4rem;
  right: -3rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 231, 255, 0.8), rgba(200, 231, 255, 0));
}

body::after {
  left: -5rem;
  bottom: 6rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(171, 212, 246, 0.34), rgba(171, 212, 246, 0));
}

body.motion-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(0.985);
  transition:
    opacity 0.72s ease,
    transform 0.72s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
}

body.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max-width));
  margin: 0 auto;
  padding-bottom: 5rem;
}

.hero,
.subpage-hero {
  position: relative;
  padding: 1.5rem 0 2.8rem;
}

.hero::after,
.subpage-hero::after {
  content: "";
  position: absolute;
  inset: 6.8rem 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 169, 221, 0.45), transparent);
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0 2.2rem;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1rem;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.brand {
  position: relative;
  flex: 0 0 auto;
  padding-right: 1.4rem;
  font-family: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.85rem, 2.8vw, 2.7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand::after {
  content: "wspomnienia tego dnia";
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.topbar__links {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-left: auto;
  max-width: min(100%, 46rem);
}

.ghost-link,
.text-link,
.secondary-link {
  color: var(--accent-strong);
  font-weight: 600;
}

.ghost-link {
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(111, 162, 207, 0.18);
  backdrop-filter: blur(14px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ghost-link.is-active {
  color: #f7fcff;
  border-color: rgba(47, 127, 190, 0.24);
  background: linear-gradient(135deg, #7abfe8 0%, #2f7fbe 100%);
  box-shadow: 0 12px 24px rgba(47, 127, 190, 0.2);
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 2.4rem;
  align-items: stretch;
  padding: 2.8rem;
  border-radius: 36px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 251, 255, 0.93));
  box-shadow: 0 26px 70px rgba(67, 116, 160, 0.12);
  overflow: hidden;
}

.hero-layout > * {
  animation: none;
}

.hero-layout::before,
.hero-layout::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-layout::before {
  top: 1.25rem;
  left: 1.25rem;
  width: 6rem;
  height: 6rem;
  border-top: 1px solid rgba(99, 169, 221, 0.44);
  border-left: 1px solid rgba(99, 169, 221, 0.44);
  border-top-left-radius: 24px;
}

.hero-layout::after {
  right: 1.25rem;
  bottom: 1.25rem;
  width: 6rem;
  height: 6rem;
  border-right: 1px solid rgba(99, 169, 221, 0.44);
  border-bottom: 1px solid rgba(99, 169, 221, 0.44);
  border-bottom-right-radius: 24px;
}

.hero-copy,
.subpage-hero__content {
  position: relative;
  padding: 2.4rem 1rem 2.1rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.12;
}

h1 {
  max-width: 11ch;
  font-size: var(--hero-title-size);
  font-weight: 600;
}

.hero-copy h1 {
  max-width: 13ch;
  line-height: 1.16;
}

h2 {
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 600;
}

.lead {
  margin: 1.4rem 0 0;
  max-width: 50ch;
  color: var(--text-muted);
  font-size: var(--lead-size);
  line-height: 1.84;
}

.hero-actions,
.album-banner {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.banner-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 2.3rem;
}

.hero-actions > * {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-link,
.submit-button {
  border: 0;
  cursor: pointer;
  color: #f7fcff;
  background: linear-gradient(135deg, #7abfe8 0%, #2f7fbe 100%);
  box-shadow: 0 12px 26px rgba(47, 127, 190, 0.24);
}

.primary-link,
.secondary-link,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.3rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
}

.secondary-link {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(111, 162, 207, 0.22);
}

.primary-link:hover,
.secondary-link:hover,
.ghost-link:hover,
.submit-button:hover {
  transform: translateY(-2px);
}

.primary-link:active,
.secondary-link:active,
.ghost-link:active,
.submit-button:active {
  transform: translateY(0);
}

.upload-card,
.album-banner,
.photo-card,
.photo-viewer,
.subpage-hero__content {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.upload-card {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 249, 255, 0.96));
}

.upload-card::before {
  content: "";
  position: absolute;
  inset: 1rem;
  width: auto;
  height: auto;
  border: 1px solid rgba(111, 162, 207, 0.18);
  border-radius: 24px;
  background: none;
  pointer-events: none;
}

.upload-card__header,
.upload-form {
  position: relative;
  z-index: 1;
}

.upload-card__eyebrow {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
}

.upload-card__header h2 {
  margin-top: 0.55rem;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.upload-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.file-picker,
.field {
  display: grid;
  gap: 0.55rem;
}

.field span,
.file-picker__label {
  font-weight: 700;
}

.file-picker {
  padding: 1.1rem;
  border: 1.6px dashed rgba(99, 169, 221, 0.4);
  border-radius: var(--radius-md);
  background: rgba(246, 251, 255, 0.88);
}

.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-picker__hint {
  color: var(--text-muted);
  font-size: var(--step--1);
}

.file-picker__actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.file-picker__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(111, 162, 207, 0.22);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.file-picker__action--primary {
  color: #f7fcff;
  background: linear-gradient(135deg, #7abfe8 0%, #2f7fbe 100%);
  box-shadow: 0 12px 24px rgba(47, 127, 190, 0.18);
}

.file-picker__action:hover {
  transform: translateY(-2px);
}

.file-picker__selection {
  display: block;
  color: var(--text-muted);
  font-size: var(--step--1);
  line-height: 1.5;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(111, 162, 207, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.field input:focus,
.field textarea:focus,
.file-picker input:focus {
  outline: 2px solid rgba(99, 169, 221, 0.34);
  outline-offset: 2px;
}

.submit-button {
  width: 100%;
  min-height: 3.4rem;
}

.submit-button[disabled] {
  cursor: wait;
  opacity: 0.75;
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.form-status.is-error {
  color: #b04949;
}

.form-status.is-success {
  color: #2f7d67;
}

.content {
  display: grid;
  gap: 2.5rem;
  padding-top: 1.7rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0 0.35rem;
}

.section-heading h2 {
  margin-top: 0.25rem;
}

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

.photo-grid:empty::before {
  content: attr(data-empty-text);
  display: block;
  grid-column: 1 / -1;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(111, 162, 207, 0.14);
  color: var(--text-muted);
  text-align: center;
}

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

.photo-card {
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 250, 255, 0.95));
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(81, 131, 176, 0.18);
}

.photo-card__image-link {
  position: relative;
  display: block;
  padding: 1rem 1rem 0;
}

.photo-card__media {
  display: block;
  width: 100%;
  height: auto;
  max-height: 20rem;
  object-fit: contain;
  border-radius: calc(var(--radius-lg) - 8px);
  background: linear-gradient(180deg, rgba(234, 246, 255, 0.85), rgba(255, 255, 255, 0.96));
}

.photo-card__badge {
  position: absolute;
  top: 1.65rem;
  left: 1.65rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(18, 44, 70, 0.82);
  color: #f5fbff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.photo-card__body {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.1rem 1.35rem;
}

.photo-card__message {
  margin: 0;
  font-size: var(--step-0);
  line-height: 1.65;
}

.photo-card__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.album-banner {
  justify-content: space-between;
  padding: 2rem 2.1rem;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(229, 243, 255, 0.88));
}

.album-banner h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.album-banner p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.subpage-hero__content {
  padding: 2.7rem 2.5rem;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(243, 249, 255, 0.96));
}

.subpage-hero__content h1 {
  max-width: 16ch;
  font-size: var(--subpage-title-size);
  line-height: 1.14;
}

.subpage-hero__content .lead {
  max-width: 58ch;
}

.subpage-hero__content--album {
  max-width: min(100%, 58rem);
}

.subpage-hero__content--album h1 {
  max-width: 22ch;
  font-size: var(--album-title-size);
  line-height: 1.18;
}

.subpage-hero__content--slideshow {
  max-width: min(100%, 66rem);
}

.subpage-hero__content::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(111, 162, 207, 0.18);
  border-radius: 24px;
  pointer-events: none;
}

.menu-panel {
  position: relative;
  padding: 2rem;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 255, 0.96));
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.menu-panel::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(111, 162, 207, 0.15);
  border-radius: 24px;
  pointer-events: none;
}

.menu-panel__intro,
.meal-timeline {
  position: relative;
  z-index: 1;
}

.menu-panel__lead {
  margin: 0;
  max-width: 54ch;
  color: var(--text-muted);
  font-size: var(--step-1);
}

.meal-timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-left: 2rem;
}

.meal-timeline::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  bottom: 0.8rem;
  left: 0.8rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(99, 169, 221, 0.22), rgba(47, 127, 190, 0.44), rgba(99, 169, 221, 0.22));
}

.meal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.35rem 1.35rem 1.35rem 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(111, 162, 207, 0.16);
  background: rgba(255, 255, 255, 0.84);
}

.meal-card::before {
  content: "";
  position: absolute;
  top: 1.75rem;
  left: -1.53rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #8fcdf1 0%, #2f7fbe 100%);
  box-shadow: 0 0 0 7px rgba(237, 247, 255, 0.95);
}

.meal-card__time {
  margin: 0;
  align-self: center;
  color: var(--accent-strong);
  font-family: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 700;
  line-height: 1;
}

.meal-card__content h3 {
  margin: 0;
  font-family: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
}

.meal-card__content p {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
}

.slideshow-panel {
  position: relative;
  padding: 1.45rem;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 255, 0.98));
  border: 1px solid rgba(111, 162, 207, 0.16);
  box-shadow: var(--shadow);
}

.slideshow-stage {
  position: relative;
  display: grid;
  gap: 1rem;
}

.slideshow-stage__viewport {
  position: relative;
  min-height: clamp(32rem, 76vh, 48rem);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(20, 50, 74, 0.1), rgba(20, 50, 74, 0.2)),
    #d9efff;
  border: 1px solid rgba(111, 162, 207, 0.18);
}

.slideshow-stage__backdrop,
.slideshow-stage__photo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition:
    opacity 0.95s ease,
    transform 6.5s ease;
}

.slideshow-stage__backdrop {
  inset: -4%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(30px) saturate(1.05);
  transform: scale(1.08);
}

.slideshow-stage__backdrop--current {
  opacity: 0.6;
  transform: scale(1.02);
  animation: slideshow-drift 8s ease-in-out both;
}

.slideshow-stage__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 36, 56, 0.18) 0%, rgba(14, 36, 56, 0.08) 18%, rgba(14, 36, 56, 0.34) 100%);
  pointer-events: none;
}

.slideshow-stage__figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.slideshow-stage__photo {
  width: 100%;
  height: 100%;
  padding: clamp(1rem, 2.8vw, 2rem);
  object-fit: contain;
  filter: drop-shadow(0 26px 46px rgba(16, 42, 65, 0.18));
  transform: scale(1.04);
}

.slideshow-stage__photo--current {
  opacity: 1;
  transform: scale(1);
  animation: slideshow-kenburns 8s ease-in-out both;
}

.slideshow-stage__caption {
  display: grid;
  gap: 0.45rem;
  max-width: 100%;
  padding: 1.2rem 1.25rem;
  border-radius: 24px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(111, 162, 207, 0.16);
  box-shadow: 0 14px 34px rgba(67, 116, 160, 0.1);
}

.slideshow-stage__eyebrow,
.slideshow-stage__message,
.slideshow-stage__meta,
.slideshow-stage__counter {
  margin: 0;
}

.slideshow-stage__eyebrow {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
}

.slideshow-stage__message {
  font-family: "Cormorant Garamond", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.7rem, 2.7vw, 2.5rem);
  line-height: 1.12;
}

.slideshow-stage__meta,
.slideshow-stage__counter {
  color: var(--text-muted);
}

.slideshow-stage__meta {
  font-size: var(--step-0);
}

.slideshow-stage__counter {
  font-size: var(--step--1);
}

.slideshow-stage__controls {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.7rem;
  flex-wrap: nowrap;
  justify-content: stretch;
  width: 100%;
}

.slideshow-control {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.05rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(111, 162, 207, 0.22);
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.slideshow-control--primary {
  background: linear-gradient(135deg, rgba(122, 191, 232, 0.95) 0%, rgba(47, 127, 190, 0.96) 100%);
  border-color: rgba(223, 241, 255, 0.4);
}

.slideshow-control:hover {
  transform: translateY(-2px);
}

.slideshow-empty {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: 2rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(111, 162, 207, 0.16);
}

@keyframes slideshow-kenburns {
  from {
    transform: scale(1.015);
  }

  to {
    transform: scale(1.055);
  }
}

@keyframes slideshow-drift {
  from {
    transform: scale(1.04) translate3d(-1%, -1%, 0);
  }

  to {
    transform: scale(1.08) translate3d(1%, 1%, 0);
  }
}

.photo-viewer {
  width: min(100%, 1100px);
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(18, 44, 70, 0.92);
  color: #f5fbff;
}

.photo-viewer::backdrop {
  background: rgba(24, 56, 86, 0.58);
  backdrop-filter: blur(8px);
}

.photo-viewer__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 50%;
  font-size: 1.7rem;
  color: inherit;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.photo-viewer__media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(70vh, 34rem);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 34%),
    #1b476c;
}

.photo-viewer__media img,
.photo-viewer__media video {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
  transition: opacity 0.18s ease;
}

.photo-viewer__media video {
  background: rgba(10, 24, 38, 0.45);
}

.photo-viewer.is-loading .photo-viewer__media img,
.photo-viewer.is-loading .photo-viewer__media video {
  opacity: 0;
}

.photo-viewer__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.8rem;
  padding: 2rem;
  text-align: center;
  color: rgba(245, 251, 255, 0.86);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.photo-viewer__loading::before {
  content: "";
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 3px solid rgba(245, 251, 255, 0.22);
  border-top-color: rgba(245, 251, 255, 0.9);
  animation: viewer-spin 0.8s linear infinite;
}

.photo-viewer.is-loading .photo-viewer__loading {
  opacity: 1;
}

@keyframes viewer-spin {
  to {
    transform: rotate(360deg);
  }
}

.photo-viewer__details {
  display: grid;
  gap: 0.5rem;
  padding: 1.1rem 1.4rem 1.35rem;
}

.photo-viewer__message,
.photo-viewer__meta {
  margin: 0;
}

.photo-viewer__message {
  font-size: var(--step-1);
  line-height: 1.7;
}

.photo-viewer__meta {
  color: rgba(245, 251, 255, 0.76);
}

@media (max-width: 1024px) {
  :root {
    --hero-title-size: clamp(2.3rem, 5.4vw, 3.5rem);
    --subpage-title-size: clamp(2.15rem, 5vw, 3.2rem);
    --album-title-size: clamp(1.9rem, 3.6vw, 2.55rem);
    --lead-size: clamp(0.96rem, 1.45vw, 1.06rem);
  }

  .page-shell {
    width: min(calc(100% - 1.5rem), var(--max-width));
  }

  .brand {
    padding-left: 0;
  }

  .topbar__links {
    gap: 0.6rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 1.7rem;
  }

  .hero-copy,
  .subpage-hero__content {
    padding: 1rem 0.35rem 0.4rem;
  }

  .lead {
    max-width: 56ch;
  }

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

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

@media (max-width: 960px) {
  .hero-layout {
    padding: 1.7rem;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 0.55rem;
    --step--1: 0.92rem;
    --step-0: 0.98rem;
    --step-1: 1.08rem;
    --step-2: 1.18rem;
    --step-3: 1.38rem;
    --step-4: 1.68rem;
    --hero-title-size: clamp(2rem, 9.6vw, 2.85rem);
    --subpage-title-size: clamp(1.95rem, 8.2vw, 2.7rem);
    --album-title-size: clamp(1.72rem, 7vw, 2.2rem);
    --lead-size: 0.98rem;
  }

  .page-shell {
    width: min(calc(100% - 1.1rem), var(--max-width));
  }

  .topbar,
  .section-heading,
  .album-banner {
    align-items: start;
    flex-direction: column;
  }

  .topbar {
    display: flex;
    align-items: flex-start;
    text-align: left;
    padding-bottom: 1.8rem;
  }

  .topbar::after {
    display: none;
  }

  .brand {
    padding: 0;
    font-size: clamp(1.55rem, 8vw, 2.05rem);
  }

  .topbar__links {
    width: 100%;
    justify-content: flex-start;
  }

  .brand::after {
    letter-spacing: 0.22em;
    font-size: 0.62rem;
  }

  .hero-layout,
  .photo-grid,
  .photo-grid--album {
    grid-template-columns: 1fr;
  }

  .hero,
  .subpage-hero {
    padding-top: 1rem;
  }

  h1 {
    max-width: 100%;
  }

  h2 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .upload-card,
  .subpage-hero__content,
  .album-banner,
  .menu-panel {
    padding: 1.35rem;
  }

  .hero-layout {
    padding: 1.2rem;
    border-radius: 28px;
  }

  .hero-layout::before,
  .hero-layout::after {
    width: 4rem;
    height: 4rem;
  }

  .hero-actions,
  .album-banner,
  .banner-actions {
    width: 100%;
  }

  .meal-timeline {
    padding-left: 1.6rem;
  }

  .meal-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1.15rem 1.1rem 1.15rem 1.25rem;
  }

  .meal-card::before {
    top: 1.4rem;
    left: -1.15rem;
  }

  .hero-actions > a,
  .album-banner > a,
  .banner-actions > a,
  .file-picker__action,
  .submit-button {
    width: 100%;
  }

  .slideshow-panel {
    padding: 0.9rem;
  }

  .slideshow-stage__viewport {
    min-height: 28rem;
  }

  .slideshow-stage__caption {
    padding: 1rem;
  }

  .photo-card:hover {
    transform: none;
  }

  .photo-viewer {
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 0.42rem;
    --hero-title-size: clamp(1.82rem, 9.8vw, 2.35rem);
    --subpage-title-size: clamp(1.72rem, 9vw, 2.15rem);
    --album-title-size: clamp(1.52rem, 7.4vw, 1.92rem);
  }

  body {
    background-size: auto, auto, 18px 18px, 18px 18px, auto;
  }

  .page-shell {
    width: min(calc(100% - 0.85rem), var(--max-width));
  }

  .hero,
  .subpage-hero {
    padding-bottom: 2rem;
  }

  .hero::after,
  .subpage-hero::after {
    inset: 5.8rem 0 auto;
  }

  .topbar {
    gap: 0.7rem;
    padding-bottom: 1.25rem;
  }

  .topbar__links {
    gap: 0.55rem;
  }

  .topbar__links .ghost-link {
    width: 100%;
    justify-content: center;
  }

  .brand::after {
    letter-spacing: 0.16em;
  }

  .ghost-link,
  .primary-link,
  .secondary-link,
  .submit-button {
    min-height: 3.05rem;
    padding: 0.85rem 1.1rem;
  }

  .hero-layout,
  .upload-card,
  .album-banner,
  .subpage-hero__content,
  .photo-card,
  .menu-panel,
  .meal-card,
  .slideshow-panel,
  .slideshow-empty {
    border-radius: 22px;
  }

  .meal-timeline {
    padding-left: 1.2rem;
  }

  .meal-card::before {
    left: -0.8rem;
    width: 0.82rem;
    height: 0.82rem;
    box-shadow: 0 0 0 5px rgba(237, 247, 255, 0.95);
  }

  .photo-card__image-link {
    padding: 0.8rem 0.8rem 0;
  }

  .photo-card__body {
    padding: 1rem 0.9rem 1.15rem;
  }

  .slideshow-stage__viewport {
    min-height: 23rem;
    border-radius: 22px;
  }

  .slideshow-stage__photo {
    padding: 0.8rem;
  }

  .slideshow-stage__caption {
    gap: 0.35rem;
    padding: 0.9rem;
    border-radius: 18px;
  }

  .slideshow-stage__message {
    font-size: clamp(1.38rem, 7vw, 1.78rem);
  }

  .slideshow-control {
    min-height: 2.85rem;
    padding: 0.7rem 0.7rem;
  }

  .photo-viewer__media {
    min-height: min(58vh, 24rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body.motion-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
