/* ============================================================
   FRIEDHELM RUSCHAK – ORGANISIERTE ZUFÄLLE
   Main Stylesheet
   Font: Agency FB nur fuer Titelseite, Ueberschriften und Navigation,
   sonst Barlow Condensed (via Google) als Fallback-Schrift.
   ============================================================ */

/* ---------- Typography ---------- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;600;700&display=swap');

@font-face {
  font-family: 'Agency FB';
  src: url('../fonts/agencyfb.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #a7a5a6;
  --dark:      #231f20;
  --white:     #ffffff;
  --accent:    #2b6fa8;
  --font-fallback: 'Barlow Condensed', 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-display:  'Agency FB', var(--font-fallback);
}

body {
  font-family: var(--font-fallback);
  background-color: var(--bg);
  color: var(--dark);
  margin: 0;
  overflow-x: hidden;
}

/* Agency FB nur fuer die Titelseite, Ueberschriften und Navigation -
   ansonsten gilt die obige Fallback-Schriftkette. */
.hero,
h1,
.subpage__header {
  font-family: var(--font-display);
}

/* ============================================================
   HERO – ONE-PAGER
   ============================================================ */

.hero {
  min-height: 100vh;
  background-color: var(--bg);
  display: flex;
  align-items: stretch;
}

.hero__left {
  flex: 0 0 60%;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 3.5rem 3rem 4rem;
  position: relative;
}

.hero__title {
  color: var(--white);
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
}

.hero__title-line {
  display: inline-block;
}

.hero__title-flip-a {
  display: inline-block;
  line-height: 1;
  transform: rotate(180deg);
  vertical-align: -0.024em;
  /* Beim Drehen um 180deg vertauschen sich die seitlichen Abstaende
     (Side-Bearings) des Buchstabens - ohne Korrektur wirkt der Abstand
     zum folgenden "lle" zu eng. */
  margin-right: 0.6em;
}


.hero__bottom {
  margin-top: auto;
}

.hero__name {
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  margin: 0 0 1.5rem;
}

/* ---------- Navigation ---------- */
.hero__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero__nav li {
  border-top: 1px solid rgba(35, 31, 32, 0.25);
}

.hero__nav li:last-child {
  border-bottom: 1px solid rgba(35, 31, 32, 0.25);
}

.hero__nav a {
  display: block;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  padding: 0.45rem 0;
  transition: color 0.2s, padding-left 0.2s;
}

.hero__nav a:hover {
  color: var(--white);
  padding-left: 0.5rem;
}

/* ---------- Right column (painting) ---------- */
.hero__right {
  flex: 0 0 40%;
  max-width: 40%;
  overflow: hidden;
}

.hero__right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ============================================================
   SUB PAGES
   ============================================================ */

.subpage {
  min-height: 100vh;
  background-color: var(--bg);
}

.subpage__header {
  padding: 2.5rem 4rem 1.5rem;
  border-bottom: 2px solid rgba(35, 31, 32, 0.2);
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.subpage__logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
}

.subpage__logo span {
  color: var(--white);
  display: block;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.subpage__nav-link {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.subpage__nav-link:hover,
.subpage__nav-link.active {
  color: var(--white);
  border-bottom-color: var(--white);
}

.subpage__content {
  padding: 4rem;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subpage__content--history,
.subpage__content--paintings {
  align-items: flex-start;
}

.subpage__content--paintings {
  justify-content: flex-start;
  display: block;
}

.subpage__placeholder {
  text-align: center;
  color: rgba(35, 31, 32, 0.4);
}

.subpage__placeholder p {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Shared large heading style ---------- */
.subpage__placeholder h1,
.history__main h1,
.paintings h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}

.subpage__placeholder h1 { margin: 0 0 1rem; }
.paintings h1            { margin: 0 0 2rem; }

/* ============================================================
   HISTORY PAGE
   ============================================================ */

.history {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  text-align: left;
}

.history__portrait {
  flex: 0 0 300px;
  margin: 0;
}

.history__main {
  flex: 1 1 auto;
  min-width: 0;
}

.history__main h1 {
  line-height: 0.6;
  margin: 0 0 0.5rem;
}

.history__subtitle {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dark);
  margin: 0 0 2rem;
}

.history__timeline {
  margin: 0 0 2.5rem;
}

.history__timeline dt {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.history__timeline dd {
  margin: 0.15rem 0 1.1rem;
  font-size: 1rem;
  line-height: 1.4;
}

.history__painting {
  margin: 0;
  /* Bild reicht nach rechts fast bis an den Browserrand (kleiner Abstand bleibt), linke Kante bleibt an der Textkante. */
  margin-right: min(-3rem, calc(600px - 50vw + 1rem));
}

/* ---------- Shared image + caption styles ---------- */
.history__portrait img,
.history__painting img {
  width: 100%;
  height: auto;
  display: block;
}

.history__portrait figcaption,
.history__painting figcaption,
.gallery__item figcaption {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(35, 31, 32, 0.65);
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .history {
    flex-direction: column;
  }

  .history__portrait {
    flex: none;
    max-width: 300px;
  }
}

/* ============================================================
   PAINTINGS GALLERY
   ============================================================ */

.paintings {
  width: 100%;
}

.gallery {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--white) rgba(35, 31, 32, 0.15);
  scrollbar-width: thin;
}

.gallery::-webkit-scrollbar {
  height: 10px;
}

.gallery::-webkit-scrollbar-track {
  background: rgba(35, 31, 32, 0.15);
}

.gallery::-webkit-scrollbar-thumb {
  background-color: var(--white);
  border-radius: 5px;
}

.gallery__item {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: start;
}

.gallery__item img {
  width: auto;
  height: min(360px, 55vh);
  max-width: min(500px, 70vw);
  display: block;
  cursor: pointer;
  object-fit: contain;
  object-position: top;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  cursor: pointer;
  z-index: 1000;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox p {
  color: var(--white);
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-align: center;
  max-width: 60ch;
}

body.lightbox-open {
  overflow: hidden;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    min-height: auto;
  }

  .hero__left,
  .hero__right {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .hero__left {
    padding: 2rem 1.5rem;
    min-height: 60vh;
  }

  .hero__right {
    height: auto;
    overflow: visible;
  }

  .hero__right img {
    height: auto;
    object-fit: contain;
  }

  .subpage__header {
    padding: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .subpage__content {
    padding: 2rem 1.5rem;
  }

  .history__painting {
    margin-right: min(-0.5rem, calc(600px - 50vw + 1rem));
  }
}

@media (max-width: 480px) {
  .hero__left {
    padding: 1.5rem 1.25rem;
  }

  .hero__title {
    font-size: clamp(2.5rem, 14vw, 5rem);
  }
}