/* CorkCamera.com shared stylesheet */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b6168;
  --line: #e2ded5;
  --accent: #0f5c6e;
  --accent-hover: #0a4452;
  --chip: #eef3f4;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --radius: 10px;
  --max: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141719;
    --surface: #1c2024;
    --text: #e8e6e1;
    --muted: #a3a9ae;
    --line: #2d3338;
    --accent: #6cc3d5;
    --accent-hover: #9adbe8;
    --chip: #22303a;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: .2px; }
.brand span { color: var(--accent); }
.topnav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; }
.topnav a { text-decoration: none; }
.topnav a:hover { text-decoration: underline; }

/* Headings / text */
h1 { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.2rem); line-height: 1.2; margin: 20px 0 6px; }
h2 { font-size: 1.35rem; margin: 34px 0 12px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-top: 16px; }
.crumbs a { text-decoration: none; }
.meta { margin: 0 0 16px; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.meta li { display: inline; }
.meta li + li::before { content: " · "; }
.notice { background: var(--chip); border-radius: var(--radius); padding: 10px 14px; font-size: .9rem; margin: 16px 0; }

/* Hero (home) */
.hero { padding: 26px 0 8px; }
.hero p { margin: 4px 0; max-width: 60ch; }

/* Updates timeline (home) */
.updates { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.updates li { display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.updates li:first-child { border-top: 0; }
.updates time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .92rem; padding-top: 1px; }
@media (max-width: 560px) {
  .updates li { grid-template-columns: 1fr; gap: 0; }
}

/* Collection cards (home) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card > a.cover { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--chip); }
.card > a.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 12px 16px 16px; }
.card ul { margin: 6px 0 0; padding-left: 1.1em; font-size: .93rem; }
.card li { margin: 2px 0; }
.card .when { font-size: .82rem; color: var(--muted); }
.card .extra { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .93rem; }
.covers2 { display: grid; grid-template-columns: 1fr 1fr; }
.covers2 a { display: block; position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.covers2 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Gallery grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 30px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.grid a { display: block; text-decoration: none; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.grid .thumb { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--chip); border-radius: 6px; overflow: hidden; }
.grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.grid a:hover img { transform: scale(1.04); }
.grid .cap { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.grid a:target .thumb { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Photo page */
.photo-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn[aria-disabled="true"] { visibility: hidden; }
.count { color: var(--muted); font-size: .9rem; text-align: center; }
figure.photo { margin: 0; text-align: center; }
figure.photo img { max-height: 82vh; width: auto; border-radius: 4px; background: var(--chip); box-shadow: var(--shadow); }
figure.photo figcaption { margin-top: 10px; font-size: .95rem; overflow-wrap: anywhere; }

/* Plain content pages */
.prose { max-width: 70ch; }
.prose li { margin: 4px 0; }

/* Footer */
footer.site { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); }
footer.site .wrap { padding-top: 16px; padding-bottom: 22px; font-size: .88rem; color: var(--muted); }
footer.site .hits { margin-top: 8px; font-variant-numeric: tabular-nums; }
