/* Anne & Dick - album styling, matched to annedick2025.nl */

:root {
  --primary: #484b39;      /* donker olijfgroen */
  --primary-dark: #191a14;
  --secondary: #671b2a;    /* wijnrood */
  --secondary-dark: #22090e;
  --sage: #b9bca0;
  --rose: #b48686;
  --bg: #ffffff;
  --ink: #1f1f1a;
  --muted: #6a6a5c;
  --line: #e7e3d8;
  --serif: 'Xanh Mono', monospace;
  --display: 'Tenor Sans', sans-serif;
  --body: 'Jost', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--secondary-dark); }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--primary);
  font-weight: 400;
  margin: 0 0 .4em 0;
}

/* ---------- Login page ---------- */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at 15% 0%, rgba(185, 188, 160, .25), transparent 60%),
    radial-gradient(circle at 85% 100%, rgba(180, 134, 134, .22), transparent 55%),
    var(--bg);
}

.login-card {
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 2.5rem 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
}

.login-card .hearts {
  width: 64px;
  height: auto;
  margin-bottom: 1rem;
  opacity: .85;
}

.login-card h1 {
  font-size: 2.4rem;
  margin-bottom: .1em;
}

.login-card .subtitle {
  font-family: var(--serif);
  color: var(--secondary);
  font-size: 1.1rem;
  margin: 0 0 1.4rem 0;
}

.login-card .intro {
  font-family: var(--display);
  color: var(--muted);
  margin: 0 0 1.5rem 0;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

#login-form input[type="password"] {
  font-family: var(--body);
  font-size: 1.1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  text-align: center;
  letter-spacing: .08em;
}

#login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(72, 75, 57, .15);
}

.btn-primary {
  font-family: var(--display);
  font-size: 1rem;
  padding: .8rem 1.4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .15s;
}
.btn-primary:hover { background: var(--primary-dark); }

.error {
  color: var(--secondary);
  font-family: var(--display);
  font-size: .95rem;
  margin-top: .2rem;
}

.footer-note {
  margin-top: 2rem;
  font-family: var(--serif);
  color: var(--primary);
  letter-spacing: .15em;
  font-size: .85rem;
}

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

.album-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.album-header .brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--serif);
  color: var(--primary);
  font-size: 1.2rem;
}

.album-header .brand img {
  width: 28px;
  height: auto;
}

.album-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--display);
}

.album-nav a,
.album-nav .link-button {
  color: var(--secondary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: .04em;
}

.album-nav a.current {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
}

.album-nav a:hover,
.album-nav .link-button:hover { color: var(--secondary-dark); }

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

#album-title {
  font-size: 2.2rem;
  margin-bottom: 0;
}

.album-meta {
  font-family: var(--display);
  color: var(--muted);
  margin: .25rem 0 .25rem 0;
}

.album-credit {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: .9rem;
  margin: 0 0 1.5rem 0;
  letter-spacing: .02em;
}
.album-credit a {
  color: var(--secondary);
}
.album-credit a:hover {
  color: var(--secondary-dark);
}

.empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--display);
  border: 1px dashed var(--line);
  border-radius: 6px;
}

/* ---------- Grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.thumb {
  position: relative;
  padding-top: 100%;
  background: #f5f2eb;
  cursor: pointer;
  overflow: hidden;
  border-radius: 3px;
}

.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
  opacity: 0;
}
.thumb img.loaded { opacity: 1; }
.thumb:hover img { transform: scale(1.04); }

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
  pointer-events: none;
}

/* Play-badge overlay for video items in the grid. */
.thumb.video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,.35) 0%, rgba(0,0,0,.05) 60%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}
.thumb.video > .play-icon,
.thumb.video::after {
  /* fallback :after also paints the triangle so we don't need an extra element */
  content: "";
}
.thumb.video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  /* triangle pointing right */
  border-left: 22px solid rgba(255,255,255,.92);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  transform: translate(-40%, -50%);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
  box-shadow: none;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 12, .94);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lb-stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 4.5rem 1rem;
  min-height: 0;
}

.lb-stage img,
.lb-stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .6);
  background: #000;
}

.lb-bar {
  padding: .8rem 1.5rem 1.2rem;
  color: #f0ece1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  font-family: var(--display);
  font-size: .95rem;
}

.lb-actions { display: inline-flex; gap: 1.2rem; }

.btn-link {
  color: #f0ece1;
  border: 1px solid rgba(240, 236, 225, .5);
  background: transparent;
  padding: .4rem 1rem;
  border-radius: 3px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .04em;
}
.btn-link:hover { background: rgba(240, 236, 225, .12); color: #fff; }
.btn-link.danger { border-color: rgba(255, 153, 102, .7); color: #ffb594; }
.btn-link.danger:hover { background: rgba(255, 95, 15, .18); }

.lb-btn {
  position: absolute;
  background: rgba(0, 0, 0, .25);
  border: none;
  color: #f0ece1;
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: .85;
  transition: opacity .15s, background .15s;
  font-family: var(--serif);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover { opacity: 1; background: rgba(0, 0, 0, .45); }
.lb-close { top: max(.8rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); }
.lb-prev { left: .6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .6rem; top: 50%; transform: translateY(-50%); }

.lb-stage img {
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y pinch-zoom;
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
  main { padding: 1.2rem 1rem 3rem; }
  #album-title { font-size: 1.7rem; }
  .album-header {
    padding: .6rem .8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
  .album-header .brand { font-size: 1.05rem; }
  .album-nav {
    gap: .9rem;
    flex-wrap: wrap;
    font-size: .95rem;
    width: 100%;
  }
  .album-nav a, .album-nav .link-button { font-size: .95rem; }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 4px;
  }
  .lb-stage { padding: 3.6rem .6rem .6rem; }
  .lb-btn {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.9rem;
  }
  .lb-bar {
    padding: .6rem 1rem max(.8rem, env(safe-area-inset-bottom));
    font-size: .9rem;
  }
  .lb-actions { gap: .8rem; }
  .btn-link { padding: .5rem .9rem; font-size: .9rem; }
  .login-card { padding: 1.8rem 1.2rem; }
  .login-card h1 { font-size: 2rem; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .lb-bar { flex-direction: column; gap: .5rem; }
}
