/* chrisbell.barant.com - a dark, quiet frame so the photographs carry the page. */
:root {
  --bg: #0f0f0e;
  --bg-2: #171715;
  --bg-3: #20201d;
  --line: #2c2b28;
  --text: #ece8e1;
  --muted: #9d978d;
  --accent: #c9a96e;
  --danger: #e07a6a;
  --ok: #8fbf8a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.opt { color: var(--muted); font-weight: 400; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { max-width: 760px; }
.empty { padding: 40px 0; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header / footer ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px clamp(16px, 4vw, 40px); max-width: 1280px; width: 100%; margin: 0 auto; }
.brand { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .02em; text-decoration: none; }
.site-nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.site-nav a { text-decoration: none; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a.current { color: var(--text); border-bottom-color: var(--accent); }
body.home .site-head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
body.home .adminbar + .site-head { top: 40px; }
.site-foot { border-top: 1px solid var(--line); margin-top: 80px; padding: 28px 0; color: var(--muted); font-size: .85rem; }
.foot-row { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; }
.foot-links .quiet { opacity: .5; }

/* ---------- Admin bar ---------- */
.adminbar { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; background: #000; border-bottom: 1px solid var(--line); padding: 8px clamp(16px, 4vw, 40px); font-size: .85rem; position: relative; z-index: 6; min-height: 40px; }
.adminbar a { text-decoration: none; color: var(--muted); }
.adminbar a:hover { color: var(--text); }
.adminbar .spacer { flex: 1; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #111; font-size: .75rem; font-weight: 600; text-align: center; }

/* ---------- Buttons, forms ---------- */
.btn { display: inline-block; font: 500 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 14px 26px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-light { border-color: color-mix(in srgb, var(--text) 60%, transparent); color: var(--text); background: transparent; }
.btn-light:hover { background: var(--text); color: var(--bg); }
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { background: var(--accent); color: #111; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #111; }
.btn-block { display: block; width: 100%; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .8rem; letter-spacing: .06em; margin-bottom: 6px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.field-btn { display: flex; align-items: flex-end; }
input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; border: 1px solid; }
.alert-ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.alert-error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.note { display: inline-block; padding: 8px 14px; border: 1px dashed var(--accent); border-radius: var(--radius); font-size: .9rem; }

/* ---------- Home ---------- */
.hero { position: relative; height: 92vh; min-height: 520px; max-height: 1100px; display: flex; align-items: flex-end; overflow: hidden; background: var(--bg-2); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 50%, rgba(0,0,0,.65) 100%); }
.hero-empty { background: radial-gradient(ellipse at 30% 20%, #2a2722 0%, var(--bg) 70%); align-items: center; }
.hero-text { position: relative; z-index: 1; padding: 0 clamp(16px, 4vw, 40px) clamp(40px, 8vh, 90px); max-width: 1280px; width: 100%; margin: 0 auto; }
.hero-text h1 { font-size: clamp(2.8rem, 8vw, 6rem); font-weight: 400; margin-bottom: .15em; }
.hero-text p { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.4vw, 1.6rem); margin-bottom: 1.6em; opacity: .9; }
.intro { padding-top: clamp(56px, 10vw, 110px); padding-bottom: clamp(40px, 6vw, 70px); text-align: center; font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.55; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.section-head a { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.featured-wrap { margin-top: clamp(48px, 8vw, 90px); }
.cta { text-align: center; padding: clamp(64px, 10vw, 120px) 0 20px; }
.cta h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.cta .btn { margin-top: 10px; }

/* ---------- Galleries ---------- */
.page-title { padding-top: clamp(24px, 5vw, 56px); padding-bottom: clamp(24px, 4vw, 40px); }
.lede { font-size: 1.1rem; max-width: 640px; }
.crumb { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.crumb a { text-decoration: none; color: var(--muted); }
.gallery-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(12px, 2vw, 24px); }
.gallery-card { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); text-decoration: none; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .4s; }
.gallery-card:hover img { transform: scale(1.04); }
.gallery-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0) 45%); }
.gallery-card-text { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; display: flex; flex-direction: column; color: var(--text); }
.gallery-card-name { font-family: var(--serif); font-size: 1.8rem; line-height: 1.15; }
.gallery-card-count { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.masonry { columns: 3 300px; column-gap: 12px; }
.tile { display: block; margin-bottom: 12px; break-inside: avoid; background: var(--bg-2); overflow: hidden; cursor: zoom-in; }
.tile img { width: 100%; height: auto; transition: opacity .3s, transform .6s cubic-bezier(.2,.7,.2,1); }
.tile:hover img { opacity: .88; transform: scale(1.015); }

/* ---------- Lightbox ---------- */
.lb-lock, .lb-lock body { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,7,.97); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px clamp(8px, 7vw, 90px) 16px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; transition: opacity .25s; }
.lightbox img.loading { opacity: .3; }
.lightbox figcaption { min-height: 40px; padding-top: 12px; display: flex; gap: 20px; color: var(--muted); font-size: .9rem; text-align: center; }
.lb-count { opacity: .7; white-space: nowrap; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--text); cursor: pointer; opacity: .7; font: 300 48px/1 var(--sans); padding: 12px 18px; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 4px; right: 8px; font-size: 40px !important; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { display: none; } }

/* ---------- About / contact ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 80px); align-items: start; padding-top: clamp(24px, 5vw, 56px); }
.about-noimg { grid-template-columns: minmax(0, 760px); justify-content: center; }
.about-img img { width: 100%; height: auto; }
.prose { font-size: 1.05rem; }
.about h2 { margin-top: 1.4em; }
.services { list-style: none; padding: 0; margin: 0 0 2em; display: flex; flex-wrap: wrap; gap: 10px; }
.services li { border: 1px solid var(--line); padding: 6px 14px; border-radius: 40px; font-size: .9rem; }
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 80px); padding-top: clamp(24px, 5vw, 56px); }
.info { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 28px 0 0; }
.info dt { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.info dd { margin: 0; }
.thanks { border: 1px solid var(--line); padding: 40px; text-align: center; }
@media (max-width: 820px) { .about, .contact { grid-template-columns: 1fr; } }
.notfound { padding-top: 80px; text-align: center; }

/* ---------- Sign in ---------- */
.auth { max-width: 420px; padding-top: clamp(32px, 8vw, 80px); }

/* ---------- Admin ---------- */
body.admin .wrap { max-width: 1100px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 28px 0 20px; }
.page-head h1 { font-size: 2.4rem; margin: 0; }
.page-head p { margin: 4px 0 0; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: clamp(16px, 3vw, 28px); margin-bottom: 24px; }
.card h2 { font-size: 1.6rem; }
.card-headrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .875rem; }
.row-actions a { color: var(--muted); }
.row-actions a:hover { color: var(--accent); }
.pill { display: inline-block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.pill-on { border-color: var(--accent); color: var(--accent); }
.admin-galleries { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; margin-bottom: 28px; }
.admin-gallery { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.admin-gallery-img { display: flex; aspect-ratio: 3 / 2; background: var(--bg-3); align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; text-decoration: none; }
.admin-gallery-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-gallery-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.admin-gallery-name { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 36px 16px; border: 1.5px dashed var(--line); border-radius: 6px; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.dropzone-text b { color: var(--accent); font-weight: 500; }
.progress { position: relative; margin-top: 16px; height: 34px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--accent) 35%, transparent); transition: width .3s; }
.progress-text { position: relative; line-height: 34px; padding: 0 12px; font-size: .875rem; }
.photo-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.photo-item { background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 8px; cursor: grab; transition: border-color .3s, opacity .2s; }
.photo-item.dragging { opacity: .4; }
.photo-item.saving { border-color: var(--muted); }
.photo-item.saved { border-color: var(--ok); }
.photo-thumb { position: relative; aspect-ratio: 1; background: #000; border-radius: 3px; overflow: hidden; }
.photo-thumb img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.badge { position: absolute; top: 6px; left: 6px; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: #111; padding: 1px 7px; border-radius: 3px; }
.badge-2 { top: auto; bottom: 6px; background: var(--text); }
.photo-item .caption { padding: 7px 9px; font-size: .85rem; }
.more summary { cursor: pointer; font-size: .8rem; color: var(--muted); list-style: none; }
.more summary::before { content: "\22EF  "; }
.more[open] { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.more a { color: var(--muted); }
.more a:hover { color: var(--text); }
.more a.danger { color: var(--danger); }
.tabs { display: flex; gap: 4px; }
.tabs a { text-decoration: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 4px; font-size: .85rem; color: var(--muted); }
.tabs a.tab-open-open, .tabs a.tab-archived-archived { color: var(--text); border-color: var(--accent); }
.inquiry { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 6px; padding: 18px 20px; margin-bottom: 14px; }
.inquiry-new { border-left-color: var(--accent); }
.inquiry-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.inquiry-msg { white-space: normal; border-left: 2px solid var(--line); padding-left: 14px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 20px; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
