/* Styled after www.souplessecycling.cc: white pages, near-black text, light Montserrat,
   wide-tracked uppercase labels, flat black buttons, black footer. */

@font-face { font-family: Montserrat; font-weight: 200; font-style: normal; font-display: swap;
             src: url("/static/fonts/montserrat-200.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 300; font-style: normal; font-display: swap;
             src: url("/static/fonts/montserrat-300.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 400; font-style: normal; font-display: swap;
             src: url("/static/fonts/montserrat-400.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #fff; --text: #1c1d1d; --muted: #707171; --border: #e8e8e1; --soft: #f6f6f3;
  --ink: #111; --on-ink: #fff; --danger: #d02e2e; --ok: #1e7a46;
  --font: Montserrat, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column;
       background: var(--bg); color: var(--text);
       font: 300 15px/1.65 var(--font); letter-spacing: .025em; }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.25rem 3.5rem; }
a { color: inherit; }
h1 { margin: 0 0 1.25rem; font-weight: 300; font-size: 1.6rem; line-height: 1.25; letter-spacing: .01em; }
.eyebrow, label, .badge, .pager a, .back, .viewer-foot a, button, .wordmark, .footer-tag {
  text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 400; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* the S mark: a mask, so it takes the text color around it */
.mark { display: inline-block; aspect-ratio: 529 / 720; background: currentColor;
        -webkit-mask: url("/static/logo-s.png") center / contain no-repeat;
                mask: url("/static/logo-s.png") center / contain no-repeat; }

/* header + footer */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
          padding: .9rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand .mark { height: 1.9rem; }
.wordmark { font-size: .8rem; letter-spacing: .28em; }
.topbar nav { display: flex; align-items: center; gap: 1.5rem; }
.who { color: var(--muted); font-size: .85rem; }
.footer { background: var(--ink); color: var(--on-ink); padding: 1.75rem 1.5rem;
          display: flex; align-items: center; justify-content: center; gap: 1rem; text-align: center; }
.footer .mark { height: 1.6rem; flex: none; }
.footer-tag { margin: 0; }

/* buttons + forms */
button { font-family: var(--font); cursor: pointer; border: 1px solid var(--ink); border-radius: 0;
         background: var(--ink); color: var(--on-ink); padding: 1rem 2rem; transition: background .15s, color .15s; }
button:hover { background: var(--bg); color: var(--ink); }
button.link { background: none; border: 0; padding: 0; color: var(--text); border-bottom: 1px solid transparent; }
button.link:hover { background: none; border-bottom-color: var(--ink); }
label { display: block; margin-bottom: 1.4rem; color: var(--muted); }
input { display: block; width: 100%; margin-top: .5rem; padding: .85rem .9rem; border-radius: 0;
        font: 300 1rem var(--font); letter-spacing: .02em; color: var(--text);
        background: var(--bg); border: 1px solid var(--border); }
input:focus { outline: none; border-color: var(--ink); }
.flash { margin: 0 0 1.5rem; padding: .85rem 1rem; border: 1px solid; font-size: .9rem; background: var(--bg); }
.flash.error { color: var(--danger); border-color: var(--danger); }
.flash.success { color: var(--ok); border-color: var(--ok); }

/* login */
body.auth main { max-width: none; padding: 0; display: flex; }
.auth-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand { background: var(--ink); color: var(--on-ink); display: flex; flex-direction: column;
              align-items: center; justify-content: center; gap: 2.5rem; padding: 3rem 2rem; text-align: center; }
.auth-brand .mark { height: min(46vh, 22rem); }
.auth-tag { margin: 0; font-weight: 200; font-size: 1.15rem; line-height: 1.7; letter-spacing: .2em; text-transform: uppercase; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.auth-form form { width: 100%; max-width: 22rem; }
.auth-form .eyebrow { margin: 0 0 .75rem; color: var(--muted); }
.auth-form h1 { font-weight: 200; font-size: 2rem; }
.auth-form .lead { margin: 0 0 2rem; color: var(--muted); }
.auth-form button { width: 100%; margin-top: .5rem; }
@media (max-width: 760px) {
  .auth-wrap { grid-template-columns: 1fr; min-height: 0; }
  .auth-brand { padding: 2.5rem 1.5rem; gap: 1.5rem; }
  .auth-brand .mark { height: 9rem; }
  .auth-tag { font-size: .85rem; }
  .auth-form { padding: 2.5rem 1.25rem 3.5rem; }
}

/* gallery */
.page-head { margin-bottom: 2rem; }
.page-head .eyebrow { margin: 0 0 .5rem; color: var(--muted); }
.page-head h1 { margin: 0; font-weight: 200; font-size: 2rem; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem 1rem;
          grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.thumbs a { position: relative; display: block; text-decoration: none; }
.thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
              background: var(--soft); border: 1px solid var(--border); transition: opacity .15s; }
.thumbs a:hover img { opacity: .82; }
.thumbs .name { display: block; margin-top: .6rem; font-size: .8rem; letter-spacing: .06em;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { position: absolute; top: 0; left: 0; padding: .3rem .6rem; font-size: .62rem;
         color: var(--on-ink); background: var(--ink); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
         margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.pager a { text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.pager .muted { font-size: .8rem; }

/* viewer */
main:has(.viewer) { max-width: 1400px; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.back { text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; white-space: nowrap; }
.viewer-title { flex: 1; text-align: center; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-bar .muted { font-size: .8rem; white-space: nowrap; }
.stage { display: grid; grid-template-columns: 3.25rem 1fr 3.25rem; gap: .75rem; align-items: center; }
.content { display: flex; justify-content: center; min-width: 0; }
.content img { max-width: 100%; max-height: calc(100vh - 14rem); object-fit: contain; background: var(--soft); }
.content iframe { width: 100%; height: calc(100vh - 14rem); border: 1px solid var(--border); background: var(--soft); }
.nav { display: flex; align-items: center; justify-content: center; align-self: stretch; min-height: 6rem;
       font-size: 2rem; font-weight: 200; line-height: 1; text-decoration: none;
       border: 1px solid var(--border); transition: background .15s, color .15s, border-color .15s; }
a.nav:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.nav.off { visibility: hidden; }
.viewer-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.viewer-foot a { text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.hint { font-size: .78rem; }
@media (max-width: 600px) {
  main { padding-top: 1.5rem; }
  .stage { grid-template-columns: 2.25rem 1fr 2.25rem; gap: .35rem; }
  .hint { display: none; }
  .topbar { padding: .75rem 1rem; }
  .who { display: none; }
}

/* files without a preview: the S on a plain tile */
.tile { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
        background: var(--soft); border: 1px solid var(--border); color: var(--ink); transition: opacity .15s; }
.tile .mark { height: 42%; }
.thumbs a:hover .tile { opacity: .82; }
.tile--big { width: min(320px, 70vw); }
.file-card { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.5rem 0; text-align: center; min-width: 0; }
.file-name { margin: 1rem 0 0; font-size: 1rem; max-width: 30rem; overflow-wrap: anywhere; }
.file-card .muted { margin: 0 0 1rem; font-size: .85rem; }
a.dl { display: inline-block; padding: 1rem 2rem; background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink);
       text-decoration: none; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 400;
       transition: background .15s, color .15s; }
a.dl:hover { background: var(--bg); color: var(--ink); }

/* gallery heading with the "download all" button */
.page-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; }
.page-head--row form { margin: 0; }
