/* =========================================================
   Ace Kooley – Theme-Styles
   Standardbreite 1024 px, responsive bis 320 px
   ========================================================= */

:root {
  --text: #000;
  --muted: #555;
  --bg: #fff;
  --line: #000;
  --accent: #a8e84a;           /* Grün aus der Ass-Karte */
  --accent-dark: #4c7a12;
  --max: 1024px;
  --gutter: clamp(16px, 3vw, 32px);
  --serif: "Times New Roman", Times, Georgia, serif;
  --wide: "Copperplate", "Copperplate Gothic Light", "Bookman Old Style", Georgia, serif;
  --condensed: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --sans: Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: #000; color: #fff; padding: 8px 14px;
}
.skip-link:focus { top: 8px; }

.page {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--gutter);
}

/* ---------- Header ---------- */
.site-header { border-bottom: 3px solid var(--line); }

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__ace {
  display: grid;
  place-items: center;
  width: 38px; height: 50px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(160deg, #f4f48a, var(--accent) 55%, #8ee6d8);
  font-weight: 700;
  font-size: 1.6rem;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 1.5rem; }
.brand__text small { font-size: .95rem; font-weight: 700; }

.main-nav ul,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-family: var(--wide);
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border: 2px solid transparent;
}
.main-nav a:hover { border-color: var(--line); }
.main-nav a[aria-current] { background: var(--accent); border-color: var(--line); }

/* ---------- Footer ---------- */
.site-footer { border-top: 3px solid var(--line); margin-top: 32px; }

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter) 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: .95rem;
}

.site-footer__copy { margin: 0; }
.footer-nav a { padding: 4px 8px; }
.footer-nav a:hover, .footer-nav a[aria-current] { background: var(--accent); }

/* =========================================================
   Startseite
   ========================================================= */
.intro {
  display: grid;
  grid-template-columns: 1fr auto 260px;
  grid-template-areas:
    "title portrait card"
    "lang  lang     card"
    "cta   cta      card";
  gap: 24px 28px;
  align-items: start;
}

.intro__title { grid-area: title; }
.intro__title h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1;
  letter-spacing: .02em;
}
.intro__title p {
  margin: .25em 0 0;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
}

.intro__portrait { grid-area: portrait; width: 110px; margin: 0; }

.intro__card {
  grid-area: card;
  display: block;
  border-radius: 18px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.intro__card img { width: 100%; border-radius: 18px; }
.intro__card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 10px 24px rgba(0,0,0,.25); }

.intro__lang {
  grid-area: lang;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.box {
  border: 2px solid var(--line);
  padding: 8px 16px;
  text-align: center;
  font-weight: 700;
}
.box--info { font-family: var(--wide); letter-spacing: .06em; }
.box--info strong { display: block; font-size: 1.35rem; }
.box--info span { font-size: 1.05rem; }
.arrow-hint { font-size: 2rem; line-height: 1; }
.box--translate {
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background .2s;
}
.box--translate:hover { background: var(--accent); }

.intro__cta {
  grid-area: cta;
  margin: 0;
  font-family: var(--wide);
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  letter-spacing: .06em;
  line-height: 1.2;
}

.info {
  margin-top: 36px;
  text-align: center;
  font-family: var(--wide);
  letter-spacing: .04em;
}
.info h2 { margin: 0 0 .5em; font-size: clamp(1.1rem, 2.6vw, 1.6rem); }
.info p { margin: 0 auto .8em; max-width: 60ch; font-size: clamp(1rem, 2vw, 1.25rem); }
.info__mail {
  display: inline-block;
  margin: .4em 0 .6em;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: .03em;
  text-decoration: none;
  word-break: break-all;
}
.info__mail:hover { text-decoration: underline; text-decoration-color: var(--accent-dark); }
.info .info__note { font-weight: 700; }

.home-footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.imprint { flex: 1 1 0; min-width: 260px; font-family: var(--condensed); font-style: normal; font-size: 1.15rem; line-height: 1.5; }
.imprint .part { white-space: nowrap; }
.visit-counter { flex: 0 0 auto; }
.imprint p { margin: 0; }
.imprint .sep { margin: 0 .6em; }
.imprint a { text-decoration: none; }

.visit-counter {
  border: 4px solid var(--line);
  padding: 6px 14px;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.3;
}
.visit-counter output { display: block; font-variant-numeric: tabular-nums; font-size: 1.3rem; }

/* =========================================================
   Galerie
   ========================================================= */
.gallery__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.gallery__head h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.gallery__label {
  display: block;
  font-family: var(--wide);
  font-size: .5em;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gallery__pos { margin: 0; font-family: var(--sans); color: var(--muted); }

.gallery__stage {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  grid-template-areas: "prev grid next";
  align-items: center;
  gap: 12px;
}

.gallery__grid {
  grid-area: grid;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 24px;
}

.gallery__arrow {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  transition: background .2s, transform .2s;
}
.gallery__arrow svg { width: 44px; height: 33px; fill: currentColor; }
.gallery__arrow--prev { grid-area: prev; }
.gallery__arrow--next { grid-area: next; }
.gallery__arrow:hover { background: var(--accent); }
.gallery__arrow--prev:hover { transform: translateX(-3px); }
.gallery__arrow--next:hover { transform: translateX(3px); }

.artwork { text-align: center; }

.artwork__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
}
.artwork__open img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .2s ease, box-shadow .2s ease;
}
.artwork__open:hover img { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0,0,0,.25); }

.artwork__title { margin: 12px 0 4px; font-size: 1.1rem; line-height: 1.2; }
.artwork__count { margin: 0; font-family: var(--sans); font-size: .95rem; }
.artwork__count output { font-variant-numeric: tabular-nums; }

.gallery__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
.gallery__dots a {
  width: 14px; height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
}
.gallery__dots a[aria-current] { background: var(--line); }
.gallery__dots a:hover { background: var(--accent); }

.gallery__hint {
  margin: 20px 0 0;
  text-align: center;
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--muted);
}

/* ---------- Großansicht ---------- */
.lightbox {
  width: min(92vw, 900px);
  max-height: 94vh;
  padding: 16px 16px 12px;
  border: 0;
  background: #fff;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox__figure { margin: 0; text-align: center; }
.lightbox__img {
  margin: 0 auto;
  max-height: calc(94vh - 90px);
  width: auto;
  object-fit: contain;
}
.lightbox figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-family: var(--sans);
}
.lightbox__title { font-family: var(--serif); font-size: 1.2rem; }

.lightbox__close,
.lightbox__btn {
  position: absolute;
  width: 44px; height: 44px;
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close { top: -18px; right: -18px; }
.lightbox__btn { top: 50%; transform: translateY(-50%); }
.lightbox__btn--prev { left: -22px; }
.lightbox__btn--next { right: -22px; }
.lightbox__close:hover, .lightbox__btn:hover { background: var(--accent); }

/* ---------- Textseiten ---------- */
.text-page { max-width: 70ch; font-family: var(--sans); line-height: 1.6; }
.text-page h1 { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "grid grid" "prev next";
  }
  .gallery__arrow--prev { justify-self: start; }
  .gallery__arrow--next { justify-self: end; }
}

@media (max-width: 820px) {
  .intro {
    grid-template-columns: 1fr auto;
    grid-template-areas: "title portrait" "card card" "cta cta" "lang lang";
  }
  .intro__card { width: min(260px, 70%); margin: 0 auto; }
  .intro__cta { text-align: center; }
  .intro__lang { justify-content: center; }
}

@media (max-width: 560px) {
  .site-header__inner { justify-content: center; }
  .main-nav ul { justify-content: center; }
  .site-footer__inner { justify-content: center; text-align: center; }

  .intro {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "portrait" "card" "cta" "lang";
    text-align: center;
  }
  .intro__portrait { margin: 0 auto; }
  .intro__lang { flex-direction: column; }
  .arrow-hint { transform: rotate(90deg); }

  .home-footer { flex-direction: column; align-items: center; text-align: center; }
  .imprint .sep { display: none; }
  .imprint .part { display: block; }

  .gallery__grid { gap: 28px 14px; }
  .lightbox__btn--prev { left: 4px; }
  .lightbox__btn--next { right: 4px; }
  .lightbox__close { right: 4px; top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .intro__card:hover, .artwork__open:hover img { transform: none; }
}
