/* carlakunst.ch — design C "Atelierwand mit Abendbild" */

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/caveat.woff2) format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(/assets/fonts/nunito-sans.woff2) format('woff2');
}

:root {
  --sky: #E6EEEF;
  --ink: #173F43;
  --accent: #B83A5E;
  --accent-dark: #8E2A47;
  --paper: #F7F9F9;
  --line: #C5D5D7;
  --muted-on-ink: #C9DADB;
  --hand: 'Caveat', cursive;
  --sans: 'Nunito Sans', system-ui, sans-serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, p, figure, blockquote, dl, dd { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.hand { font-family: var(--hand); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; background: #FFFFFF; color: var(--ink); border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 16px; }

/* ---------- Sunset band: header (+ hero on the home page) ---------- */

.sunset { position: relative; background-color: #3A2A20; }
.sunset__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sunset > :not(.sunset__img) { position: relative; }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 24px; padding-bottom: 24px;
}
.logo { display: block; background: #FFFFFF; padding: 8px 16px; border-radius: 12px; }
.logo img { height: 56px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; font-weight: 700; font-size: 16px; }
.pill {
  display: inline-block; padding: 12px 18px; border-radius: 999px;
  background: #FFFFFF; color: var(--ink); text-decoration: none; font-weight: 700;
}
.pill:hover { color: var(--ink); background: #F1F5F5; }
.pill--accent { background: var(--accent); color: #FFFFFF; }
.pill--accent:hover { background: var(--accent-dark); color: #FFFFFF; }
.pill--ink { background: var(--ink); color: #FFFFFF; }
.pill--ink:hover { background: #0F2E31; color: #FFFFFF; }

.hero {
  display: flex; flex-wrap: wrap; gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 120px;
}
.hero__card {
  flex: 1 1 440px; min-width: 0;
  display: flex; flex-direction: column; gap: 20px;
  background: rgba(23, 63, 67, 0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #FFFFFF; padding: 40px 44px; border-radius: 20px;
}
.hero__hello { font-family: var(--hand); font-size: 34px; font-weight: 700; line-height: 1; color: #F6B8C9; }
.hero h1 { font-size: 60px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.hero__lead { font-size: 20px; max-width: 34ch; }
.hero__card .pill { align-self: flex-start; margin-top: 8px; padding: 14px 26px; }

.hero__pics { flex: 1 1 440px; min-width: 0; display: flex; justify-content: center; align-items: flex-start; padding: 24px 0; }
.polaroid {
  background: #FFFFFF; padding: 10px 10px 4px;
  box-shadow: 0 10px 24px rgba(23, 63, 67, 0.18);
}
.polaroid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.polaroid figcaption { font-family: var(--hand); font-size: 24px; text-align: center; line-height: 1.6; }
.hero__pics .polaroid { width: 34%; position: relative; z-index: 1; }
.hero__pics .polaroid:nth-child(1) { margin-right: -24px; transform: rotate(-6deg); }
.hero__pics .polaroid:nth-child(2) { width: 38%; margin-top: 40px; transform: rotate(2deg); z-index: 2; box-shadow: 0 14px 30px rgba(23, 63, 67, 0.22); }
.hero__pics .polaroid:nth-child(3) { margin-left: -24px; transform: rotate(7deg); }
.hero__pics a { color: var(--ink); text-decoration: none; display: block; }

/* ---------- Gallery ---------- */

.band-white { background: #FFFFFF; }
.section { padding-top: 88px; padding-bottom: 104px; display: flex; flex-direction: column; gap: 48px; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; }
.section h2 { font-size: 44px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.section__note { font-family: var(--hand); font-size: 28px; color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 56px 40px; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 12px 10px; background: var(--paper);
  box-shadow: 0 8px 20px rgba(23, 63, 67, 0.14);
  color: var(--ink); text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:nth-child(6n+1) { transform: rotate(-2deg); }
.card:nth-child(6n+2) { transform: rotate(1.5deg); }
.card:nth-child(6n+3) { transform: rotate(-1deg); }
.card:nth-child(6n+4) { transform: rotate(2deg); }
.card:nth-child(6n+5) { transform: rotate(-1.5deg); }
.card:nth-child(6n+6) { transform: rotate(1deg); }
.card:hover, .card:focus-visible { transform: rotate(0) scale(1.03); box-shadow: 0 14px 30px rgba(23, 63, 67, 0.22); color: var(--ink); }
.card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #DCE6E7; }
.card__title { font-family: var(--hand); font-size: 28px; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.card__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.tag { padding: 2px 10px; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ---------- About + quotes ---------- */

.about { padding-top: 104px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.about .polaroid { flex: 0 1 380px; min-width: 0; padding: 14px 14px 6px; transform: rotate(-2deg); box-shadow: 0 14px 30px rgba(23, 63, 67, 0.2); }
.about .polaroid img { aspect-ratio: 4 / 5; }
.about .polaroid figcaption { font-size: 28px; }
.about__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about__text h2 { font-size: 44px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.about__text p { font-size: 19px; max-width: 54ch; }

.quotes { padding-top: 32px; padding-bottom: 104px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.quotes blockquote { padding: 28px; background: #FFFFFF; border-radius: 16px; display: flex; flex-direction: column; gap: 12px; }
.quotes blockquote p { font-family: var(--hand); font-size: 30px; line-height: 1.2; }
.quotes footer { font-size: 14px; font-weight: 700; }

/* ---------- Contact + footer ---------- */

.contact { background: var(--ink); color: #FFFFFF; }
.contact__inner { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.contact h2 { font-size: 44px; font-weight: 700; }
.contact p { font-size: 19px; max-width: 48ch; }
.contact__mail { font-family: var(--hand); font-size: 52px; font-weight: 700; line-height: 1.2; color: #FFFFFF; padding: 4px 0; word-break: break-word; }
.contact__mail:hover { color: var(--muted-on-ink); }
.contact__sign { font-family: var(--hand); font-size: 30px; }
.site-footer {
  padding-top: 24px; padding-bottom: 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-size: 14px; color: var(--muted-on-ink);
}

/* ---------- Artwork page ---------- */

.work { padding-top: 32px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.back { align-self: flex-start; color: var(--ink); font-weight: 700; text-decoration: none; padding: 10px 0; }
.back:hover { color: var(--accent); }
.work__body { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.work__photos { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.work__main {
  display: block; position: relative; width: 100%; padding: 14px; border: 0; cursor: zoom-in;
  background: #FFFFFF; box-shadow: 0 14px 30px rgba(23, 63, 67, 0.18); transform: rotate(-1deg);
}
.work__main img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: #DCE6E7; }
.zoom {
  position: absolute; right: 28px; bottom: 28px;
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: rgba(23, 63, 67, 0.86); color: #FFFFFF; font-family: var(--sans); font-size: 15px; font-weight: 700;
}
.thumbs { display: flex; flex-wrap: wrap; gap: 16px; }
.thumb {
  width: 104px; height: 104px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  background: #FFFFFF; box-shadow: 0 4px 10px rgba(23, 63, 67, 0.15); opacity: 0.75;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 3px var(--ink); }

.work__info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding-top: 8px; }
.status { align-self: flex-start; padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.status--available { background: #D6EAD8; color: #1D4D2B; }
.status--reserved { background: #F6E3C4; color: #6B4310; }
.status--sold { background: #E2E2E2; color: #3A3A3A; }
.work__info h1 { font-family: var(--hand); font-size: 80px; font-weight: 700; line-height: 0.95; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.facts dt { font-weight: 700; }
.work__info .pill { align-self: flex-start; padding: 16px 28px; font-size: 17px; }
.work__note { font-family: var(--hand); font-size: 26px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; font-weight: 700; }
.pager a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.pager a:hover { color: var(--accent); }
.more { padding-top: 80px; padding-bottom: 96px; gap: 40px; }
.more h2 { font-size: 36px; }
.more .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px; }

.footer-band { background: var(--ink); color: #FFFFFF; }
.footer-band .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-band a { font-family: var(--hand); font-size: 34px; font-weight: 700; color: #FFFFFF; padding: 4px 0; }
.footer-band span { font-size: 14px; color: var(--muted-on-ink); }

/* ---------- Full-screen viewer ---------- */

.viewer {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0F1B1C; color: #FFFFFF;
}
.viewer::backdrop { background: #0F1B1C; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; }
.viewer__title { font-family: var(--hand); font-size: 34px; line-height: 1; }
.viewer__count { font-size: 15px; color: var(--muted-on-ink); margin-left: 16px; }
.viewer__stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; }
.viewer__stage img { flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; object-fit: contain; }
.round {
  flex: 0 0 auto; width: 56px; height: 56px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
}
.round:hover { background: rgba(255, 255, 255, 0.22); }
.viewer__close { width: 48px; height: 48px; }
.viewer__thumbs { display: flex; justify-content: center; gap: 12px; padding: 16px 24px 24px; }
.viewer__thumbs button { width: 64px; height: 64px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #1E2E30; opacity: 0.55; }
.viewer__thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px #FFFFFF; }
.viewer__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.viewer--single .round:not(.viewer__close), .viewer--single .viewer__thumbs { display: none; }

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .logo img { height: 44px; }
  .pill { padding: 10px 14px; }
  .hero { padding-top: 24px; padding-bottom: 64px; gap: 32px; }
  .hero__card { padding: 28px 24px; }
  .hero h1 { font-size: 40px; }
  .hero__lead { font-size: 18px; }
  .hero__pics { padding: 8px 0; }
  .polaroid figcaption { font-size: 18px; }
  .section { padding-top: 56px; padding-bottom: 64px; gap: 32px; }
  .section h2, .about__text h2, .contact h2 { font-size: 34px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .card { padding: 8px 8px 6px; }
  .card__title { font-size: 22px; }
  .card__meta { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; }
  .about { padding-top: 64px; gap: 40px; }
  .contact__inner { padding-top: 64px; padding-bottom: 64px; }
  .contact__mail { font-size: 36px; }
  .work__body { gap: 40px; }
  .work__info h1 { font-size: 56px; }
  .work__main { padding: 8px; transform: none; }
  .zoom { right: 16px; bottom: 16px; }
  .thumb { width: 72px; height: 72px; }
  .viewer__stage { padding: 0 8px; gap: 8px; }
  .viewer__stage .round { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
