:root {
  --cover: #213a30;
  --cover-edge: #182b23;
  --foil: #c8ae6a;
  --foil-hover: #d8c07f;
  --page: #2f3134;
  --ink: #ece8e1;
  --muted: #b3ada3;
  --print: #fafaf7;
  --corner: #17181a;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--foil); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--foil);
  outline-offset: 3px;
}

/* Header: the album cover with an embossed title */
.cover {
  background: var(--cover);
  border-bottom: 6px solid var(--cover-edge);
}

.cover-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.title {
  font: 600 1.75rem/1 var(--serif);
  letter-spacing: 0.08em;
  color: var(--foil);
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.cover nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
}

.cover nav a:first-child { margin-left: 0; }
.cover nav a:hover { color: var(--foil); }
.cover nav a[aria-current="page"] { color: var(--foil); }

/* Page body: the dark album page */
main {
  max-width: 68rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
}

h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 2.25rem 0 0.5rem; }

.lead { max-width: 38rem; }
.lead p { color: var(--muted); margin: 0 0 1.75rem; }

.prose { max-width: 40rem; }
.prose p { color: var(--muted); margin: 0 0 1rem; }

.button {
  display: inline-block;
  background: var(--foil);
  color: #1d1f21;
  font: 600 1rem/1 var(--sans);
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--foil-hover); }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* Albums: mounted prints held by photo corners */
.albums { margin-top: 3.5rem; }
.albums h2 { margin-top: 0; }
.albums .note { color: var(--muted); margin: 0 0 2.25rem; font-size: 0.95rem; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 2.75rem 2.25rem;
}

.print {
  position: relative;
  background: var(--print);
  padding: 0.6rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.grid li:nth-child(3n + 1) .print { transform: rotate(-1.2deg); }
.grid li:nth-child(3n + 2) .print { transform: rotate(0.8deg); }
.grid li:nth-child(3n) .print { transform: rotate(-0.4deg); }

.print::before,
.print::after,
.corners::before,
.corners::after {
  content: "";
  position: absolute;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--corner);
  z-index: 2;
}

.print::before { top: -0.35rem; left: -0.35rem; clip-path: polygon(0 0, 100% 0, 0 100%); }
.print::after { top: -0.35rem; right: -0.35rem; clip-path: polygon(0 0, 100% 0, 100% 100%); }

.corners { position: absolute; inset: -0.35rem; pointer-events: none; }
.corners::before { bottom: 0; left: 0; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.corners::after { bottom: 0; right: 0; clip-path: polygon(100% 0, 0 100%, 100% 100%); }

.photo {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #7d8a7f;
}

.photo .img {
  position: absolute;
  inset: -14px;
  background-size: cover;
  background-position: center;
  filter: blur(7px) saturate(0.85);
}

.photo .lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0.85;
}

.caption {
  margin: 1rem 0 0;
  font: italic 1.1rem/1.3 var(--serif);
  color: var(--ink);
}

.caption span {
  display: block;
  font: 400 0.85rem/1.4 var(--sans);
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Sign-in form */
.signin { max-width: 24rem; }

.field { margin: 0 0 1.25rem; }

.field label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: #26282b;
  border: 1px solid #55585d;
  border-radius: 3px;
}

.field input:focus { border-color: var(--foil); }

.error {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid #d9826b;
  background: rgba(217, 130, 107, 0.12);
  color: var(--ink);
  font-size: 0.95rem;
}

.hint { color: var(--muted); font-size: 0.95rem; margin-top: 1.75rem; }

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (max-width: 40rem) {
  h1 { font-size: 1.9rem; }
  main { padding-top: 2rem; }
  .cover nav a { margin-left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
