/* ============================================================
   SITE - shared styles for every page (header, search, feed
   posts, specs, sidebar, footer, photo viewer).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --text:   #303030;
  --muted:  #767676;
  --line:   #e6e6e6;
  --soft:   #f5f5f5;
  --link:   #8C6A32;
  --link-2: #6a4f23;
  --tint:   #f3ecdf;
  --bg:     #ffffff;
  --max:    1180px;
  --accent: #8C6A32;
  --sand:   #dbd3c3;
  --ink:    #1b1b1b;
  --serif:  "Book Antiqua", Palatino, "Palatino Linotype", "URW Palladio L", "Palatino LT STD", Georgia, serif;
}

html { scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > footer { margin-top: auto; flex-shrink: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--serif);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-2); text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── HEADER (serif masthead, thin rules, centered nav) ── */
.site-header { position: relative; z-index: 100; background: #fff; font-family: var(--serif); }
.hdr-top { padding: 22px 8vw 12px; }
.logo-wrap { display: flex; align-items: center; gap: 16px; }
.logo-mark img { display: block; height: 64px; width: auto; }
.logo { display: inline-block; vertical-align: top; color: var(--ink); line-height: 1; }
.logo:hover { color: var(--ink); text-decoration: none; }
.logo-name { display: block; width: max-content; white-space: nowrap; font-size: 34px; font-weight: 500; letter-spacing: .02em; font-variant: small-caps; }
.logo-sub  { display: block; width: max-content; white-space: nowrap; margin-top: 4px; font-size: 15px; letter-spacing: .06em; font-variant: small-caps; }
.hdr-nav {
  display: flex; flex-wrap: wrap; gap: 6px 44px; padding: 9px 8vw;
  border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent);
}
.nav-row { display: contents; }
.hdr-nav { align-items: center; }
.hdr-nav a { display: block; line-height: 1.4; }
.hdr-nav .dd { display: flex; align-items: center; }
.hdr-nav a { font-size: 16px; color: var(--ink); padding: 2px 0; border-bottom: 1px solid transparent; }
.hdr-nav a:hover { color: var(--accent); text-decoration: none; }
.hdr-nav a.active { border-bottom-color: var(--accent); color: var(--accent); }
/* nav dropdown: opens while the pointer is over the link or the list */
.dd { position: relative; }
.dd-menu {
  position: absolute; top: 100%; left: -18px; z-index: 20; padding-top: 11px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility 0s linear .3s;
}
.dd:hover .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s, visibility 0s; }
.dd-panel { min-width: 230px; padding: 6px 0; background: #fff; border: 1px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.hdr-nav .dd-panel a { display: block; padding: 8px 18px; font-size: 15px; border-bottom: 0; white-space: nowrap; }
.hdr-nav .dd-panel a:hover { background: var(--tint); }
.hdr-nav .dd-panel a.dd-h { padding: 7px 18px 1px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hdr-nav .dd-panel a.dd-i { padding: 2px 18px 4px 28px; font-size: 15px; line-height: 1.3; }
.hdr-nav .dd-panel a.dd-p { padding: 7px 18px 6px; font-size: 15px; line-height: 1.3; }
.hdr-nav .dd-panel a.dd-p span { display: block; padding-bottom: 1px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hdr-nav .dd-panel a.dd-p:hover,
.hdr-nav .dd-panel a.dd-h:hover, .hdr-nav .dd-panel a.dd-i:hover { background: var(--tint); }
.dd-label { padding: 6px 18px 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dd > a::after { content: '▾'; margin-left: 6px; font-size: 11px; color: var(--accent); }

/* ── PAGE LAYOUT ── */
.page { padding: 28px 0 72px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb span::before { content: '›'; margin-right: 6px; }
.breadcrumb > :first-child::before { content: none; margin: 0; }
.page-title { font-size: 30px; font-weight: 600; line-height: 1.2; }
.page-kicker { margin-top: 4px; font-size: 15px; color: var(--muted); }
.sec-label {
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text);
}
.empty { padding: 28px; background: var(--soft); text-align: center; font-size: 15px; color: var(--muted); }
[id] { scroll-margin-top: 20px; }

/* ── FEED POST (category page) ── */
.post { padding: 28px 0; border-bottom: 1px solid var(--line); }
.post:first-of-type { padding-top: 8px; }
.post-title { font-size: 24px; font-weight: 600; line-height: 1.25; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--link); }
.post-date { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }

.cover { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-btn { width: 100%; padding: 0; border: 0; cursor: pointer; }
.cover-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: var(--muted); }

.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.thumb { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--soft); overflow: hidden; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.thumb:hover img { opacity: .85; }
.thumb-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); font-size: 26px; font-weight: 600; color: #fff; }

.tags { margin-top: 16px; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--link); }
.specs { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.specs li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.specs svg { flex-shrink: 0; color: var(--text); }
.specs b { font-weight: 400; color: var(--link); }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: #fff; border: 1px solid var(--link); border-radius: 3px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--link);
}
.btn-outline:hover { background: var(--tint); text-decoration: none; }
.btn-solid {
  display: inline-block; padding: 9px 18px; border-radius: 3px;
  background: var(--link); font-size: 15px; font-weight: 600; color: #fff;
}
.btn-solid:hover { background: var(--link-2); color: #fff; text-decoration: none; }
.read-more { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* ── SIDEBAR ── */
.side-box { margin-bottom: 36px; }
.side-card { margin-bottom: 36px; padding: 20px; background: var(--soft); }
.side-card .sec-label { border-color: #dcdcdc; }
.side-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text); }
.side-item:hover { color: var(--link); text-decoration: none; }
.side-item img, .side-item .side-ph { width: 96px; height: 64px; flex-shrink: 0; object-fit: cover; background: var(--soft); }
.side-item small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); }
.side-links a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.side-links a.active { font-weight: 700; }
.side-links span { color: var(--muted); }
.side-links a.two-line { display: block; padding: 7px 0; }
.side-links a.two-line span { display: block; font-size: 12px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── FOOTER ── */
.site-footer { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 24px; background: var(--sand); font-family: var(--serif); font-size: 13px; line-height: 1; text-align: center; color: var(--ink); }
/* ── PHOTO VIEWER (full-screen gallery) ── */
.viewer {
  position: fixed; inset: 0; z-index: 1000;
  display: none; grid-template-rows: 56px minmax(0, 1fr) 100px;
  background: #111; color: #fff;
}
.viewer.open { display: grid; animation: vwFade .2s ease; }
@keyframes vwFade { from { opacity: 0; } to { opacity: 1; } }
.vw-top { display: flex; align-items: center; gap: 16px; padding: 0 12px 0 20px; font-size: 14px; color: #aaa; }
.vw-title { font-size: 20px; }
.vw-title a { color: #fff; }
.vw-title a:hover { text-decoration: underline; }
.vw-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #fff; }
.vw-close { width: 40px; height: 40px; background: none; border: 0; cursor: pointer; font-size: 30px; line-height: 1; color: #fff; }
.vw-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 76px; }
.vw-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vw-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.1); font-size: 28px; line-height: 1; color: #fff;
}
.vw-arrow:hover { background: rgba(255,255,255,.22); }
.vw-prev { left: 16px; }
.vw-next { right: 16px; }
.vw-strip { position: relative; display: flex; align-items: center; gap: 6px; padding: 12px 20px; overflow-x: auto; scrollbar-width: none; }
.vw-strip::-webkit-scrollbar { display: none; }
.vw-strip button { flex: 0 0 auto; width: 100px; height: 70px; padding: 0; border: 2px solid transparent; background: #222; cursor: pointer; opacity: .5; transition: opacity .15s; }
.vw-strip button:hover { opacity: .85; }
.vw-strip button.active { border-color: #fff; opacity: 1; }
.vw-strip img { width: 100%; height: 100%; object-fit: cover; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .dd-menu { display: none; }   /* no hover on phones: the tab opens the category page */
  .dd > a::after { display: none; }
  .hdr-top { padding: 22px 16px 14px; }
  .logo-name { font-size: 40px; }
  .logo-sub { font-size: 18px; }
  .hdr-nav { display: block; padding: 11px 16px; }
  .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .nav-row + .nav-row { margin-top: 8px; }
  .hdr-nav a { font-size: 17px; white-space: nowrap; }
  .hdr-nav .dd-panel a { font-size: 18px; }
  .logo-mark img { height: 58px; }
}
@media (max-width: 380px) {
  .hdr-nav a { font-size: 15px; }
  .logo-name { font-size: 36px; }
  .logo-sub { font-size: 16px; }
}
@media (max-width: 760px) {
  [id] { scroll-margin-top: 20px; }

  .page { padding-top: 20px; }
  .page-title { font-size: 25px; }
  .post-title { font-size: 20px; }
  .thumbs { gap: 6px; }
  .thumb-more { font-size: 18px; }

  .viewer { grid-template-rows: 52px minmax(0, 1fr) 84px; }
  .vw-stage { padding: 0 8px; }
  .vw-arrow { width: 40px; height: 40px; background: rgba(0,0,0,.45); }
  .vw-prev { left: 8px; }
  .vw-next { right: 8px; }
  .vw-strip button { width: 80px; height: 56px; }
}


/* ── CURSOR (dot + halo ring + soft hue, hue never larger than the halo) ── */
html.has-cursor, html.has-cursor * { cursor: none !important; }
/* videos use the normal cursor: the custom one can't be drawn above a full-screen video */
html.has-cursor video, html.has-cursor video:fullscreen { cursor: auto !important; }
.cur { position: fixed; left: 0; top: 0; z-index: 3000; pointer-events: none; opacity: 0; transition: opacity .25s; will-change: transform; }
.cur.on { opacity: 1; }
.cur-dot  { width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #8C6A32; }
.cur-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 1.5px solid rgba(140,106,50,.85); }
.cur-hue {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,106,50,.7) 0%, rgba(140,106,50,.4) 55%, rgba(140,106,50,0) 100%);
}
.cur.cur-hue.on { opacity: .4; }
.cur.cur-hue.on.hot { opacity: 1; }   /* over something clickable the hue gets stronger */
@media (hover: none), (pointer: coarse) { .cur { display: none; } }