/* kikels.photos — Anton Kikels' photography. Same voice as anton.kikels.ch (Bricolage Grotesque,
   JetBrains Mono for the measurements), with the photography blue from there as the one accent
   colour. The pictures bring the rest. Light and dark follow the system. */

@font-face {
  font-family: 'Bricolage';
  src: url('/assets/fonts/bricolage-grotesque.woff2') format('woff2-variations'), url('/assets/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono.woff2') format('woff2-variations'), url('/assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #F4F2ED;
  --surface: #FBFAF7;
  --ink: #15140F;
  --ink-soft: #38362F;
  --muted: #5B5850;
  --line: #DCD8CE;
  --line-strong: #B9B4A7;
  --accent: #1F6E8C;       /* photography blue from anton.kikels.ch, dark enough for text on --bg */
  --on-accent: #FFFFFF;

  --sans: 'Bricolage', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --indent: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F0D;
    --surface: #171714;
    --ink: #ECE9E1;
    --ink-soft: #CFCBC1;
    --muted: #A19D92;
    --line: #2A2925;
    --line-strong: #45433C;
    --accent: #5EC8E5;
    --on-accent: #0F0F0D;
  }
}

@media (min-width: 900px) {
  :root { --indent: 160px; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw + 12px, 18px);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: var(--gutter); top: 10px; z-index: 50;
  padding: 10px 14px; border-radius: 6px;
  background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 13px; text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- Header ---------- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 650; font-size: 16px; letter-spacing: -.01em; text-decoration: none;
}
.brand .mark { width: 30px; height: auto; color: var(--accent); }
.brand-sub { margin-left: -2px; font-family: var(--mono); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.nav { --nav-gap: clamp(14px, 2.4vw, 28px); margin-left: auto; display: flex; align-items: center; gap: var(--nav-gap); font-family: var(--mono); font-size: 13px; }
.nav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav-lang {
  display: inline-grid; place-items: center; min-width: 38px; height: 28px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px;
}
.nav .nav-lang:hover { border-color: var(--ink); }
.nav-lang + .nav-lang { margin-left: calc(6px - var(--nav-gap)); }
@media (max-width: 760px) { .brand-sub { display: none; } }
@media (max-width: 600px) {
  .nav-opt { display: none; }
  .brand span { font-size: 15px; white-space: nowrap; }
}
@media (max-width: 380px) {
  .brand { gap: 10px; }
  .nav { --nav-gap: 12px; }
  .nav-lang { min-width: 32px; padding: 0 6px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px; border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(48px, 9vw, 120px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent);
  animation: puls 2.4s ease-out infinite;
}
@keyframes puls {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.hero-name {
  margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(56px, 13.5vw, 196px);
  font-weight: 720; font-stretch: 75%;
  line-height: .88; letter-spacing: -.018em;
}
.hero-name span { display: block; animation: scharf 1.3s var(--ease) both; }
.hero-name span:nth-child(2) { animation-delay: .1s; }
.hero-name span:nth-child(3) { animation-delay: .2s; color: var(--accent); }
@media (min-width: 900px) {
  .hero-name span:nth-child(2) { padding-left: var(--indent); }
  .hero-name span:nth-child(3) { padding-left: calc(2 * var(--indent)); }
}
/* The title comes into focus, like a lens finding its point */
@keyframes scharf {
  from { opacity: 0; filter: blur(14px); transform: scale(1.03); }
  to { opacity: 1; filter: none; transform: none; }
}

.hero-lead {
  margin-top: clamp(32px, 4.5vw, 56px);
  max-width: 32ch;
  font-size: clamp(20px, 2.1vw, 27px); line-height: 1.38; color: var(--ink-soft);
  text-wrap: pretty;
  animation: auftauchen .9s .35s var(--ease) both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; animation: auftauchen .9s .45s var(--ease) both; }
@media (min-width: 900px) {
  .hero > .wrap:first-child { display: grid; grid-template-columns: 1fr auto; column-gap: 40px; align-items: end; }
  .eyebrow, .hero-name { grid-column: 1 / -1; }
  .hero-lead { margin-left: var(--indent); }
  .hero-actions { justify-content: flex-end; }
}
@keyframes auftauchen { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* The frame: the cover picture inside viewfinder corners. Without a picture it shows the empty
   viewfinder with its rule-of-thirds grid and the focus point. */
.rahmen { margin: clamp(56px, 8vw, 104px) 0 0; animation: auftauchen 1s .55s var(--ease) both; }
.rahmen-sucher { --ecke: var(--accent); position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: var(--surface); }
.rahmen-sucher::before {
  content: ''; position: absolute; inset: clamp(10px, 1.6vw, 20px); z-index: 1; pointer-events: none;
  --l: clamp(18px, 2.6vw, 34px);
  background:
    linear-gradient(var(--ecke), var(--ecke)) top left / var(--l) 2px,
    linear-gradient(var(--ecke), var(--ecke)) top left / 2px var(--l),
    linear-gradient(var(--ecke), var(--ecke)) top right / var(--l) 2px,
    linear-gradient(var(--ecke), var(--ecke)) top right / 2px var(--l),
    linear-gradient(var(--ecke), var(--ecke)) bottom left / var(--l) 2px,
    linear-gradient(var(--ecke), var(--ecke)) bottom left / 2px var(--l),
    linear-gradient(var(--ecke), var(--ecke)) bottom right / var(--l) 2px,
    linear-gradient(var(--ecke), var(--ecke)) bottom right / 2px var(--l);
  background-repeat: no-repeat;
}
/* The cover always sits in a landscape frame, however the picture was taken; best is a landscape original */
.rahmen-bild { width: 100%; aspect-ratio: 3 / 2; max-height: 82vh; object-fit: cover; }
@media (max-width: 640px) { .rahmen-bild { aspect-ratio: 4 / 5; } }
.rahmen:not(.is-leer) .rahmen-sucher { --ecke: rgba(255, 255, 255, .85); }
.rahmen.is-leer .rahmen-sucher {
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line);
  background:
    linear-gradient(to right, transparent calc(100% / 3 - .5px), var(--line) calc(100% / 3 - .5px), var(--line) calc(100% / 3 + .5px), transparent calc(100% / 3 + .5px), transparent calc(200% / 3 - .5px), var(--line) calc(200% / 3 - .5px), var(--line) calc(200% / 3 + .5px), transparent calc(200% / 3 + .5px)),
    linear-gradient(to bottom, transparent calc(100% / 3 - .5px), var(--line) calc(100% / 3 - .5px), var(--line) calc(100% / 3 + .5px), transparent calc(100% / 3 + .5px), transparent calc(200% / 3 - .5px), var(--line) calc(200% / 3 - .5px), var(--line) calc(200% / 3 + .5px), transparent calc(200% / 3 + .5px)),
    var(--surface);
}
.rahmen.is-leer .rahmen-sucher::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent);
  animation: puls 2.4s ease-out infinite;
}
.rahmen-bald {
  position: absolute; left: 0; right: 0; top: calc(50% + 28px); text-align: center;
  font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.rahmen-legende {
  display: flex; justify-content: space-between; gap: 16px; padding-block: 14px;
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(88px, 12vw, 168px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(40px, 6vw, 80px); }
.section-index {
  font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .04em;
  margin-bottom: 18px;
}
.section-index::before { content: '['; color: var(--muted); }
.section-index::after { content: ']'; color: var(--muted); }
.section-head h2 {
  font-size: clamp(44px, 7.4vw, 104px);
  font-weight: 700; font-stretch: 78%; letter-spacing: -.02em; line-height: .94;
}
.section-intro { margin-top: 22px; max-width: 44ch; color: var(--muted); font-size: clamp(17px, 1.4vw, 20px); text-wrap: pretty; }
@media (min-width: 900px) {
  .section-head { display: grid; grid-template-columns: var(--indent) 1fr; align-items: baseline; }
  .section-index { grid-row: 1; margin: 0; }
  .section-head h2, .section-intro { grid-column: 2; }
}

/* ---------- Series ---------- */

.serie { padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.serie + .serie { margin-top: clamp(72px, 9vw, 120px); }
.serie-head {
  display: grid; gap: 8px 24px; grid-template-columns: auto 1fr;
  grid-template-areas: "num kind" "title title" "text text" "zahl zahl";
  margin-bottom: clamp(28px, 4vw, 48px);
}
.serie-num { grid-area: num; display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.serie-num::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.serie-kind { grid-area: kind; align-self: center; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.serie-head h3 { grid-area: title; margin-top: 6px; font-size: clamp(40px, 6.4vw, 88px); font-weight: 700; font-stretch: 75%; letter-spacing: -.02em; line-height: .92; }
.serie-text { grid-area: text; max-width: 46ch; color: var(--ink-soft); text-wrap: pretty; margin-top: 6px; }
.serie-zahl { grid-area: zahl; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
@media (min-width: 900px) {
  .serie-head {
    grid-template-columns: var(--indent) minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas: "num title text" "kind title zahl";
    column-gap: 0;
  }
  .serie-num { align-self: start; padding-top: .5em; }
  .serie-kind { align-self: end; padding-right: 24px; padding-bottom: .4em; }
  .serie-head h3 { margin: 0; align-self: center; padding-right: 32px; }
  .serie-text { margin: 0; align-self: start; }
  .serie-zahl { align-self: end; }
}

/* Uncropped pictures in columns, like prints laid out on a table */
.fotos { columns: 3 300px; column-gap: clamp(12px, 1.6vw, 20px); }
.foto { break-inside: avoid; margin-bottom: clamp(12px, 1.6vw, 20px); }
.foto-link { display: block; overflow: hidden; border-radius: 3px; background: var(--surface); cursor: zoom-in; }
.foto-link img { width: 100%; transition: transform .8s var(--ease), opacity .3s; }
@media (hover: hover) { .foto-link:hover img { transform: scale(1.025); } }
.foto-info {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted);
}
.foto-lizenz { color: var(--accent); text-decoration: none; white-space: nowrap; }
.foto-lizenz:hover { text-decoration: underline; }

/* A series without pictures yet: empty frames in the same rhythm */
.serie.is-leer .fotos { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); align-items: start; }
@media (max-width: 640px) { .serie.is-leer .fotos { grid-template-columns: 1fr; } }
.foto-leer { margin: 0; aspect-ratio: 4 / 5; border: 1px dashed var(--line-strong); border-radius: 3px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.foto-leer:nth-child(2) { aspect-ratio: 3 / 2; }
.foto-leer:nth-child(3) { aspect-ratio: 1; }
@media (max-width: 640px) { .foto-leer:nth-child(n + 2) { display: none; } }

/* ---------- Licensing ---------- */

.elsewhere-title {
  margin-top: clamp(64px, 8vw, 104px);
  font-family: var(--mono); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.elsewhere { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); column-gap: 32px; }
.elsewhere a, .agentur-bald {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-block: 16px; border-top: 1px solid var(--line);
  font-size: 20px; font-weight: 560; text-decoration: none;
  transition: color .2s;
}
.agentur-bald { color: var(--muted); }
.elsewhere .handle { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--muted); }
.elsewhere a:hover { color: var(--accent); }
.agenturen { margin-top: 0; }
.agenturen a, .agenturen .agentur-bald { font-size: clamp(22px, 2.4vw, 30px); padding-block: 22px; }
.lizenz-hinweis { margin-top: 28px; max-width: 52ch; color: var(--muted); text-wrap: pretty; }
@media (min-width: 900px) { .elsewhere-title, .elsewhere, .lizenz-hinweis { margin-left: var(--indent); } }

/* ---------- Assignments ---------- */

.angebote { margin: 0 0 clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--line); }
.angebote div { display: grid; gap: 4px 24px; padding-block: 18px; border-top: 1px solid var(--line); }
.angebote dt { font-size: clamp(19px, 1.7vw, 23px); font-weight: 620; letter-spacing: -.01em; }
.angebote dd { margin: 0; color: var(--ink-soft); }
@media (min-width: 900px) {
  .angebote { margin-left: var(--indent); }
  .angebote div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: baseline; }
}

.mail {
  display: inline-flex; align-items: baseline; flex-wrap: wrap;
  font-size: clamp(30px, 7vw, 104px);
  font-weight: 700; font-stretch: 75%; letter-spacing: -.018em; line-height: 1;
  text-decoration: none;
  transition: font-stretch .6s var(--ease);
}
.mail > span:first-child { color: var(--accent); }
.mail .arrow { display: inline-block; margin-left: .18em; font-size: .6em; color: var(--muted); transition: transform .35s var(--ease), color .2s; }
@media (hover: hover) {
  .mail:hover { font-stretch: 92%; }
  .mail:hover .arrow { transform: translateX(.12em); color: var(--accent); }
}
@media (min-width: 900px) { .mail { margin-left: var(--indent); } }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 10, 9, .96); color: #ECE9E1;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; animation: auftauchen .3s var(--ease) both; }
.lb-figur { margin: 0; display: grid; place-items: center; align-content: center; gap: 14px; padding: 64px var(--gutter) 24px; min-height: 0; }
.lb-bild { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.lb-info { min-height: 1.5em; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #A19D92; }
.lb-btn {
  position: fixed; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%;
  background: rgba(255, 255, 255, .06); color: inherit; font: 18px/1 var(--mono); cursor: pointer;
  transition: background .2s, border-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
.lb-btn:focus-visible { outline-color: #5EC8E5; }
.lb-zu { top: 12px; right: var(--gutter); }
.lb-zurueck, .lb-weiter { top: 50%; margin-top: -24px; }
.lb-zurueck { left: var(--gutter); }
.lb-weiter { right: var(--gutter); }
.lightbox.is-einzeln .lb-zurueck, .lightbox.is-einzeln .lb-weiter { display: none; }
@media (max-width: 640px) {
  .lb-zurueck, .lb-weiter { top: auto; bottom: 16px; margin: 0; }
  .lb-bild { max-height: calc(100dvh - 180px); }
}

/* ---------- Legal pages ---------- */

.doc-inner > * { max-width: 760px; }
@media (min-width: 900px) { .doc-inner { padding-left: var(--indent); } }
.doc h1 { hyphens: auto; overflow-wrap: break-word; font-size: clamp(40px, 7vw, 88px); font-weight: 700; font-stretch: 78%; letter-spacing: -.02em; line-height: .95; margin-bottom: 40px; }
.doc h2 { font-size: 21px; letter-spacing: -.01em; margin: 44px 0 12px; }
.doc p { color: var(--ink-soft); margin-bottom: 12px; }
.doc a { color: var(--accent); }
.doc-date { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: -24px; }
.doc-address { line-height: 1.7; }
.doc-more { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.checks { display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; color: var(--ink-soft); }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom)); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot-sign { display: inline-flex; align-items: center; gap: 12px; }
.foot-sign .mark { width: 24px; flex: none; color: var(--accent); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- 404 ---------- */

.lost { min-height: calc(100dvh - 64px - 90px); display: grid; align-content: center; padding-block: 64px; }
.lost h1 { font-size: clamp(64px, 13vw, 176px); font-weight: 700; font-stretch: 75%; letter-spacing: -.02em; line-height: .9; }
.lost-text { margin-top: 28px; max-width: 34ch; font-size: clamp(19px, 2vw, 24px); color: var(--ink-soft); }
.lost .hero-actions { animation: none; justify-content: flex-start; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
