/* cardopoli.com - two moods.
   .calm  the photography: white, quiet, photos first (home, Work, posts).
   colour pages: the same type and sizes on a colour from the palette (Info, Links, or any page that picks one).
   Loaded after the kit's site.css and design settings, so it wins. Old Tumblr theme for reference: docs/tumblr-theme/. */

/* Type (Dec 2026, option D): Inter Tight for words, IBM Plex Mono capitals for what you click or scan.
   Both SIL Open Font Licence, served from the site itself - nothing loads from Google. (Geist files kept in /fonts.) */
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* (previous choice, option A) Geist and Geist Mono */
@font-face { font-family: "Geist"; src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cp-paper: #fcfcfc;   /* the opener GIF's own background (Dec 2026) */
  --cp-ink: #111111;
  --cp-dim: #8a8a8a;
  --cp-soft: #f3f3f1;
  --cp-gap: clamp(10px, 1.4vw, 22px);
  --cp-edge: clamp(16px, 3vw, 40px);
  --cp-font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cp-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --cp-ease: cubic-bezier(.2, .7, .2, 1);
  --cp-accent: #ff6b1a;
}

html { background: var(--cp-paper); overscroll-behavior-y: none; }
body.calm { background: var(--cp-paper); color: var(--cp-ink); font: 400 14px/1.5 var(--cp-font); -webkit-font-smoothing: antialiased; }
body.calm a { color: inherit; text-decoration: none; }

/* header: name left, menu right; it steps aside as you scroll down */
.cp-head { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--cp-edge); background: color-mix(in srgb, var(--cp-paper) 92%, transparent); backdrop-filter: blur(8px); }
.cp-logo { font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.cp-nav { display: flex; gap: 22px; text-transform: uppercase; font-size: 11px; letter-spacing: .12em; }
.cp-nav a { color: var(--cp-dim); transition: color .3s var(--cp-ease); }
.cp-nav a:hover, .cp-nav a[aria-current] { color: var(--cp-ink); }

.cp-wrap { padding: 8px var(--cp-edge) 96px; }
.cp-intro { max-width: 46ch; margin: 24px 0 40px; color: var(--cp-dim); }
.cp-intro p { margin: 0 0 .6em; }
.cp-empty { color: var(--cp-dim); padding: 20vh 0; text-align: center; }

/* filter buttons */
.cp-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 28px; }
.cp-tags a { padding: 5px 14px; border-radius: 999px; background: var(--cp-soft); color: #111; transition: filter .2s, background .3s, color .3s; }
.cp-tags a:hover { filter: brightness(.93); }
.cp-tags a.on-dark { color: #fff; }
.cp-tags a[aria-current] { background: var(--cp-ink); color: var(--cp-paper); filter: none; }

/* the grid: masonry by columns, each photo at its own shape */
.cp-grid { list-style: none; margin: 0; padding: 0; columns: 4; column-gap: var(--cp-gap); }
.cp-grid li { break-inside: avoid; margin: 0 0 var(--cp-gap); }
.cp-grid a { display: block; position: relative; }
.cp-grid img, .cp-noimg { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--cp-soft);
  transition: opacity .5s var(--cp-ease), transform .8s var(--cp-ease); }
.cp-noimg { aspect-ratio: 4 / 5; }
.cp-cap { display: block; padding: 8px 0 0; font-size: 12px; color: var(--cp-dim); opacity: 0; transform: translateY(-3px);
  transition: opacity .4s var(--cp-ease), transform .4s var(--cp-ease); }
.cp-grid a:hover img { opacity: .9; }
.cp-grid a:hover .cp-cap, .cp-grid a:focus-visible .cp-cap { opacity: 1; transform: none; }
@media (max-width: 1200px) { .cp-grid { columns: 3; } }
@media (max-width: 800px)  { .cp-grid { columns: 2; } .cp-cap { opacity: 1; transform: none; } }

/* a post */
.cp-post { max-width: 1040px; margin: 0 auto; padding: 8px var(--cp-edge) 96px; }
.cp-close { color: var(--cp-dim); white-space: nowrap; }
.cp-close:hover { color: var(--cp-ink); }
.cp-post-head h1 { font: 500 18px/1.3 var(--cp-font); margin: 0; letter-spacing: 0; text-transform: none; }
.cp-sub { margin: 4px 0 0; color: var(--cp-dim); }
.cp-post-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin: 8px 0 24px; min-height: 1.3em; }
/* the gallery: photos first, all the same width per row, click for the viewer */
.cp-gallery { columns: 3; column-gap: var(--cp-gap); margin: 0 0 40px; }
.cp-gallery.n1 { columns: 1; } .cp-gallery.n2, .cp-gallery.n4 { columns: 2; }
.cp-gallery .plate { display: block; break-inside: avoid; margin: 0 0 var(--cp-gap); cursor: zoom-in; }
.cp-gallery img { display: block; width: 100%; height: auto; border-radius: 4px; transition: opacity .2s; }
.cp-gallery .plate:hover img { opacity: .88; }
@media (max-width: 900px) { .cp-gallery.nmany, .cp-gallery.n3, .cp-gallery.n5 { columns: 2; } }
@media (max-width: 560px) { .cp-gallery { columns: 1 !important; } }
.cp-view { position: fixed; inset: 0; z-index: 80; background: var(--cp-paper); display: flex; flex-direction: column; }
.cp-view[hidden] { display: none; }
.cp-view figure { flex: 1; min-height: 0; margin: 0; display: flex; align-items: center; justify-content: center; padding: 52px 64px 8px; cursor: zoom-out; }
.cp-view img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; }
.cp-view button { position: absolute; background: none; border: 0; font: inherit; color: var(--cp-dim); cursor: pointer; padding: 12px 16px; }
.cp-view button:hover { color: var(--cp-ink); }
.cp-view .x { top: 8px; right: 12px; } .cp-view .pv, .cp-view .nx { top: 50%; transform: translateY(-50%); font-size: 30px; line-height: 1; }
.cp-view .pv { left: 6px; } .cp-view .nx { right: 6px; }
.cp-count { text-align: center; color: var(--cp-dim); font-size: 13px; margin: 0; padding: 10px 0 16px; }
@media (max-width: 640px) { .cp-view figure { padding: 48px 0 8px; } .cp-view .pv, .cp-view .nx { display: none; } }
.cp-body { font-size: 15px; }
.cp-body > p { max-width: 62ch; margin: 0 0 1em; }
.cp-body a { border-bottom: 1px solid #ddd; }
.cp-body a.plate { border: 0; }
.cp-body img, .cp-body video, .cp-body iframe { display: block; width: 100%; height: auto; border-radius: 4px; }
.cp-body p:has(> .plate) { max-width: none; display: flex; gap: var(--cp-gap); margin: 0 0 var(--cp-gap); }
.cp-body p:has(> .plate) > .plate { flex: 1 1 0; min-width: 0; }
.cp-body p:has(> .plate) > br { display: none; }
@media (max-width: 640px) { .cp-body p:has(> .plate) { flex-direction: column; } }
.cp-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.cp-post-tags a { padding: 4px 12px; border-radius: 999px; background: var(--cp-soft); color: var(--cp-dim); font-size: 12px; }
.cp-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; margin: 64px 0 0; padding-top: 18px; border-top: 1px solid #eee; color: var(--cp-dim); }
.cp-pager a:hover { color: var(--cp-ink); }

@media (prefers-reduced-motion: reduce) { body.calm * { transition: none !important; } }

/* ── colour pages (Info, Links, any page or post with a Background colour) ──
   Same type, same sizes as the photo pages; only the colours change. The colours come from the page's
   own settings (baseof.html sets --cp-paper and --cp-ink); the palette is the list in the editor. */
.cp-page { max-width: 1040px; padding: 24px var(--cp-edge) 96px; }
.cp-page > p:first-child { margin: 0 0 32px; }
.cp-page .cols { column-width: 240px; column-gap: 40px; margin: 0 0 40px; }
.cp-page .cols > div { break-inside: avoid; margin: 0 0 24px; }
.cp-page .cols.list a { display: block; }
.cp-page a { border-bottom: 1px solid color-mix(in srgb, var(--cp-ink) 35%, transparent); }
.cp-page a:hover { border-color: var(--cp-ink); }
.cp-page img { display: block; max-width: 480px; width: 60%; height: auto; image-rendering: pixelated; margin: 40px 0 0; border-radius: 4px; }
@media (max-width: 740px) { .cp-page img { width: 100%; } }

/* the one clever bit: a blinking orange cursor after the name (in the text colour on coloured pages) */
.cp-cursor { color: var(--cp-accent); margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cp-cursor { animation: none; } }

/* campaign pages (/go/<name>/): a post with one clear button at the end */
.cp-go-cta { margin: 48px 0 0; }
.cp-go-cta a { display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--cp-ink); color: var(--cp-paper) !important;
  font-weight: 500; transition: transform .3s var(--cp-ease); }
.cp-go-cta a:hover { transform: translateY(-2px); }
.cp-picks { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 0; max-width: 760px; }
.cp-picks a { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--cp-ink); transition: background .25s, color .25s; }
.cp-picks a:hover { background: var(--cp-ink); color: var(--cp-paper); }

.cp-pager .next { text-align: right; } .cp-pager .all { text-align: center; }

/* homepage opener: one picture filling the first screen, then the work */
.cp-opener { position: relative; height: 100svh; min-height: 360px; margin: -68px 0 24px; overflow: hidden; }
.cp-opener img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
@media (orientation: portrait) { .cp-opener img { object-fit: contain; } }
.cp-down { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: var(--cp-ink); opacity: .7; padding: 8px; }
.cp-down:hover { opacity: 1; }
#work { scroll-margin-top: 16px; }

/* post layout (Dec 2026): a quiet panel on the left like enricopolicardo.com, photos on the right.
   Without text the panel is just the title line and the photos take the width. */
.cp-post { max-width: 1320px; display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 40px; align-items: start; }
.cp-post:not(.has-text) { grid-template-columns: 1fr; gap: 0; }
.cp-side { position: sticky; top: 16px; font-size: 13px; line-height: 1.5; max-height: calc(100svh - 32px); overflow: auto; }
.cp-post:not(.has-text) .cp-side { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 20px; max-height: none; }
.cp-post:not(.has-text) .cp-side .cp-close { margin: 0 0 0 auto; }
.cp-side h1 { font: 500 15px/1.35 var(--cp-font); margin: 0 0 4px; }
.cp-side .cp-sub { margin: 0 0 4px; color: var(--cp-dim); }
.cp-meta { margin: 0 0 16px; color: var(--cp-dim); font-size: 12px; text-transform: capitalize; }
.cp-post:not(.has-text) .cp-meta { margin: 0; }
.cp-meta a { color: var(--cp-dim); }
.cp-meta a:hover { color: var(--cp-ink); }
.cp-side .cp-body { font-size: 13px; }
.cp-side .cp-body > p { max-width: none; margin: 0 0 .9em; }
.cp-side .cp-close { display: inline-block; margin-top: 16px; font-size: 12px; }
.cp-gallery.c1 { columns: 1; } .cp-gallery.c2 { columns: 2; } .cp-gallery.c3 { columns: 3; }
@media (max-width: 860px) {
  .cp-post, .cp-post.has-text { grid-template-columns: 1fr; gap: 0; }
  .cp-side, .cp-post.has-text .cp-side { position: static; max-height: none; margin: 0 0 20px; }
  .cp-post.has-text .cp-main { order: 2; }
  .cp-gallery.c3 { columns: 2; }
}

/* over the opener the header is see-through; it frosts again once the work starts */
.cp-head { transition: background .3s, backdrop-filter .3s; }
.cp-head.clear { background: transparent; backdrop-filter: none; }

/* Type (Dec 2026): Geist for words, Geist Mono small capitals for everything you click or scan */
.cp-nav, .cp-tags a, .cp-meta, .cp-close, .cp-pager, .cp-count, .cp-cap, .cp-view button.x, .cp-side .cp-sub {
  font-family: var(--cp-mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.cp-meta a { text-transform: uppercase; }
.cp-nav { gap: 26px; }

/* filters: plain capitals; a black block slides to the one you pick and the letters turn light as it passes */
.cp-tags { position: relative; gap: 4px; margin: 8px 0 32px; }
.cp-tags a { position: relative; z-index: 1; padding: 7px 11px; border-radius: 0; background: none; color: var(--cp-dim); transition: color .35s var(--cp-ease); }
.cp-tags a:hover { color: var(--cp-ink); filter: none; }
.cp-tags a[aria-current] { background: none; color: var(--cp-paper); }
.cp-tags .cp-ind { position: absolute; z-index: 0; top: 0; left: 0; height: 0; background: var(--cp-ink); pointer-events: none;
  transition: transform .45s var(--cp-ease), width .45s var(--cp-ease), height .45s var(--cp-ease), opacity .2s; }
.cp-tags:not(.js) a[aria-current] { background: var(--cp-ink); }
@media (prefers-reduced-motion: reduce) { .cp-tags .cp-ind, .cp-tags a { transition: none; } }

/* option D labels: no block; the chosen filter at full strength with a small dot, the others faded back */
.cp-tags .cp-ind { display: none; }
.cp-tags a, .cp-tags:not(.js) a[aria-current] { color: var(--cp-ink); background: none; opacity: .4; transition: opacity .35s var(--cp-ease); }
.cp-tags a:hover { opacity: .8; }
.cp-tags a[aria-current] { opacity: 1; color: var(--cp-ink); background: none; }
.cp-tags a[aria-current]::before { content: "\25CF"; font-size: 7px; position: relative; top: -2px; margin-right: 6px; }
.cp-nav, .cp-tags a, .cp-meta, .cp-close, .cp-pager, .cp-count, .cp-cap, .cp-view button.x, .cp-side .cp-sub { letter-spacing: .1em; }
