/* jakopec.ch — Lake palette, Source Serif 4 + Inter (self-hosted). One file for the public site;
   the editor adds admin.css on top. */

@font-face { font-family: "Source Serif 4"; src: url("/assets/source-serif-4-latin-88e013b5.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/inter-latin-496a588b.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --base: #eef2f4;
  --surface: #ffffff;
  --ink: #15233a;
  --accent: #1f4e8c;
  --rule: #f08a24;
  --muted: #6b7a8c;
  --line: #d3dbe1;
  --soft: #34445a;
  --danger: #b42318;
  --display: "Source Serif 4", Georgia, serif;
  --body: Inter, system-ui, -apple-system, sans-serif;
  --content: 680px;
  --wide: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--base); color: var(--ink); font: 1.0625rem/1.6 var(--body); min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0 0 0.6rem; }
h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: calc(var(--wide) + 3rem); margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: var(--content); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.8rem; border-radius: 8px; z-index: 10; }

/* Header */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.5rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 2px solid currentColor; border-radius: 8px; font-size: 0.95rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; font-size: 0.9375rem; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.35rem 0; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }

/* Small pieces */
.kicker { color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.6rem; }
.rule { width: 44px; height: 3px; border: 0; background: var(--rule); margin: 1.6rem 0; }
.card { background: var(--surface); border-radius: 14px; border-top: 4px solid var(--rule); box-shadow: 0 12px 30px rgba(21, 35, 58, 0.08); padding: 1.4rem 1.5rem; }
.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.9375rem; color: var(--soft); }
.meta { font-size: 0.8125rem; color: var(--muted); margin: 0; }
.more { font-size: 0.875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.headrow { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.headrow h2 { margin: 0; }
.lede { font-family: var(--display); font-size: 1.3rem; line-height: 1.5; color: var(--soft); max-width: 620px; }
.empty { color: var(--muted); padding: 1.5rem 0; }
.draft-note { background: #fff4e5; border: 1px solid #f3c88b; border-radius: 10px; padding: 0.6rem 0.9rem; font-size: 0.875rem; margin: 0 0 1.5rem; }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 0.75rem 1.2rem; font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: #183f73; }
.btn.block { display: block; width: 100%; }
.btn.quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.quiet:hover { background: var(--surface); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px #ecc5c0; }

.flash { margin: 0 0 1.5rem; padding: 0.8rem 1rem; border-radius: 10px; background: #e3f1e6; color: #17512a; font-size: 0.9375rem; }
.flash.alert { background: #fbe9e7; color: var(--danger); }

/* Forms (sign-up, guest list, sign-in) */
.form label, .form legend { display: block; font-size: 0.8125rem; font-weight: 600; margin: 0.9rem 0 0.35rem; padding: 0; }
.form input:not([type=radio]):not([type=checkbox]):not([type=file]), .form textarea, .form select {
  display: block; width: 100%; font: 16px/1.4 var(--body); color: var(--ink); padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.form input:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.form .btn { margin-top: 1.1rem; }
.form .note { font-size: 0.875rem; color: var(--muted); margin: 1rem 0 0; }
.form .error { color: var(--danger); font-size: 0.9rem; margin: 0.6rem 0 0; }
.hp { position: absolute !important; left: -9999px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.seg legend { float: left; width: 100%; }
.seg label { margin: 0; flex: 1; min-width: 3rem; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 0.65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 1rem; font-weight: 500; cursor: pointer; }
.seg input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
details.reveal > summary { list-style: none; cursor: pointer; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal[open] > summary { display: none; }

/* Seat bar */
.seats { margin: 0.9rem 0 1rem; }
.seats-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.seats-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.seats small { display: block; margin-top: 0.35rem; font-size: 0.8125rem; color: var(--muted); }

/* Home */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 4rem; align-items: center; padding: 2rem 0 4rem; }
.hero .lede a { color: inherit; text-decoration-color: var(--rule); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.feature { position: relative; }
.feature-img img { display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 560px; object-fit: cover; border-radius: 14px; }
.feature.has-photo .card { position: absolute; left: -2rem; bottom: 1.5rem; width: 78%; }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; padding-bottom: 4rem; }
.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 1rem; align-items: baseline; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.numbered li::before { content: counter(n); font-family: var(--display); font-weight: 800; font-size: 2.1rem; line-height: 1; }
.numbered a { font-family: var(--display); font-size: 1.375rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.numbered a:hover { color: var(--accent); }
.numbered time { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.grid2 { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* Page heads */
.page-head { padding: 1.5rem 0 2.2rem; }
.page-head h1 { margin-bottom: 0.8rem; }

/* Journal overview */
.feat, .row { color: var(--ink); text-decoration: none; }
.feat h2, .row h2 { margin: 0.4rem 0 0.6rem; }
.feat:hover h2, .row:hover h2 { color: var(--accent); }
.ph { overflow: hidden; background: var(--line); }
.ph img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feat { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.2rem; align-items: center; background: var(--surface); border-radius: 16px; padding: 18px; margin-bottom: 1.6rem; }
.feat.no-photo { grid-template-columns: 1fr; padding: 2rem; }
.feat .ph { border-radius: 12px; }
.feat h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.ex { margin: 0; color: #3b4a5e; font-size: 1rem; line-height: 1.55; }
.read { display: inline-block; margin-top: 0.9rem; color: var(--accent); font-weight: 600; font-size: 0.875rem; }
.row { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; align-items: center; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.row .ph { border-radius: 10px; aspect-ratio: 4 / 3; }
.row h2 { font-size: 1.6rem; }
.pages { display: flex; justify-content: space-between; margin-top: 2rem; font-weight: 600; }
.pages a { text-decoration: none; }

/* Photos overview */
.photogrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1rem; }
.photogrid a { color: var(--ink); text-decoration: none; display: block; }
.photogrid img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; margin-bottom: 0.6rem; background: var(--line); }
.photogrid b { display: block; font-size: 1.05rem; font-weight: 600; }
.photogrid a:hover b { color: var(--accent); }

/* Journal post */
.post-head { display: grid; gap: 2.5rem; align-items: end; margin: 0.5rem 0 2.5rem; }
.post-head.has-photo { grid-template-columns: 1.1fr 1fr; }
.post-head h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.03; margin: 0.6rem 0 1rem; }
.dek { font-family: var(--display); font-size: 1.375rem; line-height: 1.45; color: var(--soft); margin: 0; }
.post-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 520px; object-fit: cover; border-radius: 14px; }
.post-grid { display: grid; grid-template-columns: 190px minmax(0, 700px); gap: 3rem; }
.post-side { position: sticky; top: 2rem; align-self: start; display: grid; gap: 1.1rem; font-size: 0.875rem; color: var(--muted); }
.post-side b { display: block; color: var(--ink); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.2rem; }
.post-side a, .copy { color: var(--accent); font-weight: 600; text-decoration: none; }
.copy { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }

.prose { font-family: var(--display); font-size: 1.25rem; line-height: 1.7; overflow-wrap: anywhere; }
.prose .trix-content > div, .prose p { margin: 0 0 1.2em; }
.prose.dropcap .trix-content > div:first-child::first-letter, .prose.dropcap .trix-content > p:first-child::first-letter { float: left; font-weight: 800; font-size: 3.4em; line-height: 0.85; margin: 0.06em 0.08em 0 0; }
.prose h1, .prose h2 { font-size: 1.8rem; margin: 2rem 0 0.8rem; }
.prose figure { margin: 2.2rem 0; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: 10px; }
.prose figcaption, .shots figcaption { font-family: var(--body); font-size: 0.8125rem; color: var(--muted); margin-top: 0.5rem; }
.prose blockquote { border-left: 3px solid var(--rule); padding-left: 1.4rem; margin: 2.2rem 0; font-size: 1.6rem; line-height: 1.35; font-weight: 600; }
.prose pre { font-size: 0.9rem; background: var(--surface); padding: 1rem; border-radius: 10px; overflow-x: auto; }
.prose .attachment-gallery { display: flex; gap: 12px; margin: 2.2rem 0; }
.prose .attachment-gallery figure { margin: 0; flex: 1 1 0; }

.post-end { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.5; }
.author { display: flex; gap: 0.9rem; align-items: center; color: #3b4a5e; margin-bottom: 1.8rem; }
.author p { margin: 0; }
.author b { color: var(--ink); }
.av { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 800; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pcard { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; background: var(--surface); border-radius: 12px; padding: 10px; text-decoration: none; color: var(--ink); }
.pcard img, .pcard .blank { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: 8px; background: var(--line); }
.pcard small { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.pcard b { font-family: var(--display); font-size: 1.125rem; }
.pcard:hover b { color: var(--accent); }

/* Photo post: one photo → big and whole; several → justified rows (--r = width / height) */
.photo-head { margin: 0.5rem 0 1.5rem; }
.photo-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.photo-text { max-width: var(--content); }
.shots { margin: 2rem 0 0; }
.shots figure { margin: 0; }
.shots img { display: block; border-radius: 10px; }
.shots.one { text-align: center; }
.shots.one img { display: inline-block; width: auto; max-width: 100%; max-height: 82vh; border-radius: 12px; }
.shots.one figcaption { text-align: left; }
.shots.many { display: flex; flex-wrap: wrap; gap: 12px; }
.shots.many figure { flex: calc(var(--r, 1.5) * 100) 1 calc(var(--r, 1.5) * 240px); }
.shots.many img { width: 100%; height: auto; }
.shots.many::after { content: ""; flex: 10000 1 0; }

/* Events */
.event-list { display: grid; gap: 1.5rem; margin-bottom: 3rem; }
.event-item { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2rem; align-items: center; background: var(--surface); border-radius: 16px; padding: 18px; color: var(--ink); text-decoration: none; }
.event-item.no-photo { grid-template-columns: 1fr; padding: 1.8rem 2rem; }
.event-item .ph { border-radius: 12px; }
.event-item h2 { margin: 0.3rem 0 0.5rem; }
.event-item:hover h2 { color: var(--accent); }
.facts { margin: 0; display: grid; gap: 0.2rem; font-size: 0.9375rem; color: var(--soft); }
.past { list-style: none; margin: 0; padding: 0; }
.past li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.past a { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.past time { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.event { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 3.5rem; align-items: start; padding-bottom: 2rem; }
.event h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin-bottom: 1.2rem; }
.event dl { margin: 0 0 2rem; display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.5rem 1rem; font-size: 1rem; }
.event dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 0.25rem; }
.event dd { margin: 0; }
.event-cover img { display: block; width: 100%; border-radius: 14px; margin-bottom: 2rem; }
.event .prose { font-size: 1.15rem; }
.event .card { position: sticky; top: 1.5rem; }
.left { font-size: 0.8125rem; color: var(--muted); text-align: center; margin: 0.6rem 0 0; }
.thanks { max-width: 560px; margin: 2rem auto 4rem; }
.thanks dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 1rem 0; font-size: 0.9375rem; }
.thanks dt { color: var(--muted); }
.thanks dd { margin: 0; font-weight: 600; }

/* Footer */
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; margin-top: 3rem; font-size: 0.875rem; color: var(--muted); }
.site-foot p { margin: 0; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }

/* Full view */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(13, 21, 32, 0.96); color: #fff; }
.lightbox::backdrop { background: #0d1520; }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 86dvh; object-fit: contain; border-radius: 6px; }
.lightbox p { margin: 0; padding: 0.6rem 1rem 1rem; font-size: 0.875rem; color: #c9d3dd; min-height: 2.6rem; text-align: center; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, 0.1); color: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox .x { top: 1rem; right: 1rem; }
.lightbox .prev { left: 1rem; top: 50%; }
.lightbox .next { right: 1rem; top: 50%; }
.lightbox.single .prev, .lightbox.single .next { display: none; }
a[data-zoom] { cursor: zoom-in; display: block; }

/* Sign-in */
.signin { max-width: 380px; margin: 3rem auto; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 1rem 0 3rem; }
  .feature.has-photo .card { position: relative; left: auto; bottom: auto; width: auto; margin: -3rem 0.75rem 0; }
  .two { grid-template-columns: 1fr; gap: 3rem; }
  .numbered li { grid-template-columns: 2.5rem 1fr; }
  .numbered time { grid-column: 2; }
  .photogrid { grid-template-columns: 1fr 1fr; }
  .feat, .event-item { grid-template-columns: 1fr; gap: 1.2rem; }
  .row { grid-template-columns: 110px 1fr; gap: 1rem; }
  .row .ex { display: none; }
  .row h2 { font-size: 1.25rem; }
  .post-head.has-photo, .post-grid, .cards, .event { grid-template-columns: 1fr; }
  .post-grid { gap: 1.5rem; }
  .post-side { position: static; grid-template-columns: 1fr 1fr 1fr; }
  .prose { font-size: 1.125rem; }
  .prose .attachment-gallery { flex-direction: column; }
  .event { gap: 2rem; }
  .event .card { position: static; }
  .site-foot { flex-direction: column; }
  .lightbox .prev, .lightbox .next { top: auto; bottom: 1rem; }
}
