/* Effigraph Gallery: the PW Media look. Montserrat for headings, Roboto for text, calm greys,
   the accent only as a thin line. Light theme per gallery. */
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('fonts/montserrat-600.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('fonts/montserrat-700.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 400; font-display: swap; src: url('fonts/roboto-400.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 500; font-display: swap; src: url('fonts/roboto-500.woff2') format('woff2'); }

:root {
  --deep: #111111; --bg: #161616; --surface: #1f1f1f; --field: #242424; --border: #333333; --hair: #2a2a2a;
  --text: #e6e6e6; --hi: #ffffff; --dim: #8a8a8a; --accent: #afffac; --warn: #ffc46b; --err: #ff8a8a;
  --heart: #ffffff; --shade: rgba(0, 0, 0, .55);
  --head: "Montserrat", -apple-system, "Segoe UI", sans-serif; --body: "Roboto", -apple-system, "Segoe UI", sans-serif;
}
[data-theme="light"] {
  --deep: #ffffff; --bg: #fafafa; --surface: #f2f2f2; --field: #ffffff; --border: #dcdcdc; --hair: #e8e8e8;
  --text: #2a2a2a; --hi: #111111; --dim: #7a7a7a; --heart: #ffffff; --shade: rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--deep); color: var(--text); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus { outline: none; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--dim); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: inherit; }

.eyebrow { font: 600 10px/1 var(--head); letter-spacing: 1.6px; text-transform: uppercase; color: var(--dim); }
.line { height: 1px; width: 48px; background: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--border); border-radius: 3px;
  color: var(--text); font: 600 12px/1 var(--head); letter-spacing: .3px; padding: 10px 14px; text-decoration: none; white-space: nowrap;
  transition: border-color .12s, color .12s; }
.btn:hover { border-color: var(--dim); color: var(--hi); }
.btn.primary { background: var(--hi); color: var(--deep); border-color: var(--hi); }
.btn.primary:hover { opacity: .9; color: var(--deep); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 10px; font-size: 11px; }
.btn:disabled { opacity: .35; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.field { width: 100%; background: var(--field); border: 1px solid var(--border); border-radius: 3px; padding: 10px 12px; }
.field:focus { outline: none; border-color: var(--dim); }
textarea.field { resize: vertical; min-height: 84px; }
label.lbl { display: block; font: 600 10px/1 var(--head); letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); margin: 16px 0 7px; }
.dim { color: var(--dim); }
.small { font-size: 12px; }

/* ---- client gallery */
.g-head { max-width: 1600px; margin: 0 auto; padding: 56px 24px 22px; display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; }
.g-head h1 { margin: 10px 0 6px; font: 700 30px/1.15 var(--head); color: var(--hi); letter-spacing: -.2px; }
.g-head .meta { color: var(--dim); font-size: 13px; }
.g-head .line { margin-top: 14px; }
.g-tools { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--deep) 92%, transparent); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--hair); }
.g-tools .in { max-width: 1600px; margin: 0 auto; padding: 10px 24px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; align-self: stretch; }
.tabs button { background: transparent; border: 0; border-bottom: 1px solid transparent; color: var(--dim); font: 600 12px/1 var(--head);
  padding: 10px 10px 9px; letter-spacing: .3px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--hi); border-bottom-color: var(--accent); }
.spacer { flex: 1; }
.who { font-size: 12px; color: var(--dim); margin-right: 4px; }
.who button { background: none; border: 0; color: var(--dim); text-decoration: underline; text-underline-offset: 2px; padding: 0; font-size: 12px; }
.banner { max-width: 1600px; margin: 14px auto 0; padding: 0 24px; }
.banner div { border: 1px solid var(--border); border-left: 1px solid var(--accent); border-radius: 3px; padding: 11px 14px; color: var(--text); font-size: 13px; }

.grid { max-width: 1600px; margin: 0 auto; padding: 18px 24px 80px; }
.row { display: flex; gap: 6px; margin-bottom: 6px; }
.tile { position: relative; background: var(--surface); overflow: hidden; cursor: zoom-in; flex: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .16s; }
.tile img.in { opacity: 1; }
.tile .acts { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.tile:hover .acts, .tile .acts.keep { opacity: 1; }
@media (hover: none) { .tile .acts { opacity: 1; } }
.icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 3px;
  background: var(--shade); color: #fff; position: relative; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.fav svg path { fill: transparent; stroke: #fff; transition: fill .12s; }
.icon-btn.fav.on svg path { fill: var(--accent); stroke: var(--accent); }
.icon-btn .n { position: absolute; top: 3px; right: 3px; font: 600 9px/1 var(--head); }
.empty { text-align: center; color: var(--dim); padding: 80px 20px; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 40; background: #0a0a0a; display: grid; grid-template-columns: 1fr auto; }
.lb[hidden] { display: none; }
.lb .stage { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; touch-action: pan-y; }
.lb .stage img { max-width: calc(100% - 120px); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); display: block; user-select: none; -webkit-user-drag: none; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #cfcfcf; padding: 20px; }
.lb .nav svg { width: 26px; height: 26px; }
.lb .nav:hover { color: #fff; }
.lb .prev { left: 4px; } .lb .next { right: 4px; }
.lb .top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: #bdbdbd; font-size: 12px; }
.lb .top .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .bottom { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; padding: 14px; }
.lb .icon-btn { background: rgba(255, 255, 255, .08); }
.lb .icon-btn:hover { background: rgba(255, 255, 255, .14); }
.lb .side { width: 340px; background: #141414; border-left: 1px solid #262626; display: flex; flex-direction: column; color: #e6e6e6; min-height: 0; }
.lb .side[hidden] { display: none; }
.side .hd { padding: 16px 16px 12px; border-bottom: 1px solid #262626; display: flex; align-items: center; }
.side .list { flex: 1; overflow: auto; padding: 8px 16px; }
.side .c { padding: 10px 0; border-bottom: 1px solid #222; }
.side .c b { font: 600 11.5px/1.2 var(--head); color: #fff; }
.side .c .t { white-space: pre-wrap; margin-top: 4px; font-size: 13px; }
.side .c.admin { border-left: 1px solid var(--accent); padding-left: 10px; }
.side form { padding: 12px 16px 16px; border-top: 1px solid #262626; display: grid; gap: 8px; }
.side .field { background: #1c1c1c; border-color: #333; color: #e6e6e6; }
@media (max-width: 760px) {
  .g-head { padding: 34px 16px 16px; } .g-head h1 { font-size: 24px; }
  .g-tools .in, .grid, .banner { padding-left: 12px; padding-right: 12px; }
  /* phone: the picture on top, the comments below it (never over it) */
  .lb { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb .stage { min-height: 0; }
  .lb .stage img { max-width: 100%; max-height: calc(100% - 112px); }
  .lb .side { width: auto; max-height: 46vh; max-height: 46dvh; border-left: 0; border-top: 1px solid #262626; }
  .lb .side .list { min-height: 0; }
  .lb .top { padding-top: max(12px, env(safe-area-inset-top)); }
  .lb .bottom { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .lb .nav { display: none; }
}

/* dialogs */
.dlg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg[hidden] { display: none; }
.dlg .box { width: 100%; max-width: 420px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 22px; }
.dlg h2 { margin: 6px 0 6px; font: 700 18px/1.25 var(--head); color: var(--hi); }
.dlg .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.err { color: var(--err); font-size: 12px; min-height: 16px; margin-top: 8px; }
.menu { position: absolute; z-index: 20; background: var(--bg); border: 1px solid var(--border); border-radius: 3px; padding: 6px; min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.menu a, .menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 2px; text-decoration: none; font-size: 13px; }
.menu a:hover, .menu button:hover { background: var(--surface); }

/* lock screen */
.lock { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lock .box { width: 100%; max-width: 360px; }
.lock .acts { display: flex; justify-content: flex-end; margin-top: 16px; }
.lock h1 { font: 700 24px/1.2 var(--head); color: var(--hi); margin: 10px 0 18px; }
.foot { max-width: 1600px; margin: 0 auto; padding: 0 24px 40px; color: var(--dim); font-size: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--dim); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80; background: var(--hi); color: var(--deep);
  border-radius: 3px; padding: 10px 14px; font-size: 13px; opacity: 0; transition: opacity .16s; pointer-events: none; }
.toast.on { opacity: 1; }
.logos { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.logos img { max-height: 64px; max-width: 280px; object-fit: contain; display: block; }
.logos .sep { width: 1px; height: 44px; background: var(--border); }
.cover-in .logos img { max-height: 76px; max-width: 320px; }
@media (max-width: 760px) {
  .logos img, .cover-in .logos img { max-height: 52px; max-width: 220px; }
  .logos .sep { height: 36px; }
}
.foot .credit { opacity: .7; }
.g-head .kind { margin-top: 2px; }
.g-head .intro { margin: 14px 0 0; color: var(--dim); font-size: 13px; max-width: 560px; }
/* start page of the main address: calm, in the middle */
body.home { min-height: 100vh; min-height: 100dvh; display: flex; }
.home-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.home-in { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 40px 24px; display: flex; flex-direction: column; justify-content: center; }
.home-in h1 { font: 700 30px/1.15 var(--head); color: var(--hi); margin: 8px 0 14px; }
.home-in .line { margin-bottom: 18px; }
.find { display: flex; gap: 8px; margin-top: 18px; }
.find .field { flex: 1; min-width: 0; }
.home-foot { width: 100%; justify-content: center; padding-bottom: 28px; }
/* cover: one picture big, the title on it */
.cover { position: relative; background: #000 center / cover no-repeat; display: flex; align-items: flex-end; }
.cover-full { min-height: 100vh; min-height: 100svh; }
.cover-half { min-height: 62vh; }
.cover::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,.38) 0%, rgba(0,0,0,.12) 40%, rgba(0,0,0,0) 65%),
    linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.55) 20%, rgba(0,0,0,.22) 42%, rgba(0,0,0,0) 62%); }
.cover-in h1, .cover-in .meta, .cover-in .eyebrow { text-shadow: 0 1px 14px rgba(0,0,0,.45); }
.cover-in { position: relative; z-index: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 24px 7vh; color: #fff; }
.cover-in h1 { margin: 10px 0 6px; font: 700 clamp(30px, 5vw, 56px)/1.08 var(--head); color: #fff; letter-spacing: -.3px; }
.cover-in .eyebrow { color: rgba(255,255,255,.75); }
.cover-in .meta { color: rgba(255,255,255,.8); font-size: 14px; }
/* on the picture: every logo in white, calm whatever its colours */
.cover-in .logos img.mono { filter: brightness(0) invert(1); opacity: .92; }
.cover-in .logos .sep { background: rgba(255,255,255,.45); }
.cover-go { margin-top: 22px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(6px); }
.cover-go:hover { border-color: #fff; color: #fff; }
.g-head.with-cover { display: none; }
/* other layouts */
.sq { display: grid; }
.sq .tile { aspect-ratio: 1; width: auto; height: auto; }
.cols .tile { width: 100%; display: block; break-inside: avoid; }
@media (max-width: 760px) { .cover-in { padding: 0 16px 6vh; } }
/* the pre-selection's short how-to */
.help h2 { margin-bottom: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .ico { flex: none; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.steps .ico svg { width: 16px; height: 16px; }
.steps b { font: 600 13px/1.3 var(--head); color: var(--hi); }
.steps p { margin: 3px 0 0; color: var(--dim); font-size: 13px; }
.help-btn { background: transparent; border: 1px solid var(--border); color: var(--dim); font: 600 13px/1 var(--head); width: 32px; height: 32px; border-radius: 50%; }
.help-btn:hover { color: var(--hi); border-color: var(--dim); }
.btn.primary.soft { background: transparent; color: var(--hi); border-color: var(--border); }
.btn.primary.soft:hover { border-color: var(--dim); }
/* final gallery: choosing pictures to download */
.tile .pick { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #fff;
  background: rgba(0,0,0,.25); box-shadow: 0 1px 6px rgba(0,0,0,.35); display: none; }
body.picking .tile .pick { display: block; }
body.picking .tile { cursor: pointer; }
.tile.picked .pick { background: var(--accent); border-color: var(--accent); }
.tile.picked .pick::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #111; border-width: 0 2px 2px 0; transform: rotate(45deg); }
body.picking .tile.picked img { opacity: .82; }
