/* gernotwinter.com — base design system ("warm paper", v2: hero image + blue dark act) */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-semibold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  /* v2 light act: cool ice-blue tones matching the hero's deep blue */
  --paper: #f0f5fa;
  --ink: #14212e;
  --ink-soft: #4e6378;
  --accent: #1f6cb5;
  --hairline: #d7e2ee;
  /* v2 dark act: deep blue sampled from the hero image background */
  --dark-bg: #051529;
  --dark-ink: #e6f0fa;
  --dark-muted: #8aa9c7;
  --dark-panel: #0c2440;
  --dark-accent: #7cc4ff;
  --dark-hairline: #143354;
  --hero-blue: #010f22;
  --hero-lightblue: #9fd8ff;
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 40rem;          /* comfortable line length for prose */
  --space: clamp(3.5rem, 8vw, 7rem); /* vertical rhythm between sections */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: var(--space) 0; }

.act-light { background: var(--paper); color: var(--ink); }
.act-dark  { background: var(--dark-bg); color: var(--dark-ink); }

h1, h2, .quote-interlude { font-family: var(--font-serif); font-weight: 400; }

h2 { font-size: 1.75rem; line-height: 1.3; margin-bottom: 1.25rem; }

section p + p { margin-top: 1.1rem; }

.kicker {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.act-dark .kicker { color: var(--dark-muted); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.act-dark a { color: var(--dark-accent); }

img { max-width: 100%; height: auto; display: block; }

/* Hero — full-screen AI image with slow morph and staged text reveal */
.hero-full { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--hero-blue); }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.hero-img-data { opacity: 0; transition: opacity 5s ease; }
.hero-img-data.is-visible { opacity: 1; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(1, 15, 34, 0.72) 0%, rgba(1, 15, 34, 0.28) 42%, rgba(1, 15, 34, 0) 62%); }
.ai-mark { position: absolute; bottom: 12px; right: 12px; font-size: 32px; color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); line-height: 1; z-index: 2; }
.hero-content { position: absolute; z-index: 1; left: clamp(1.5rem, 7vw, 7rem); right: 1.5rem; top: 50%; transform: translateY(-50%); max-width: 36rem; }
.hero-kicker { font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--hero-lightblue); }
.hero-line1 { font-family: var(--font-serif); font-weight: 400; color: #ffffff; font-size: clamp(1.8rem, 3.6vw, 3.1rem); line-height: 1.25; margin-top: 1.2rem; }
.hero-line2 { font-family: var(--font-serif); color: var(--hero-lightblue); font-size: clamp(1.8rem, 3.6vw, 3.1rem); line-height: 1.25; margin-top: 0.6rem; }
.hero-roles { font-size: 1.05rem; color: var(--hero-lightblue); line-height: 1.7; margin-top: 1.2rem; max-width: 34rem; }
.hero-reveal { opacity: 0; transition: opacity 1.4s ease; }
.hero-reveal.is-visible { opacity: 1; }

/* Talks topic list */
.topics-list { list-style: disc; padding-left: 1.25rem; line-height: 2.05; margin: 0.3rem 0 1.1rem; }
.topics-list li::marker { color: var(--accent); }

/* Talks core-message quote */
.talk-quote { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.55; border-left: 3px solid var(--accent); padding-left: 1.2rem; margin-top: 1.4rem; max-width: var(--measure); }
.talk-quote + p { margin-top: 1.4rem; }

/* Quote interludes (currently unused in v2 — quotes return later) */
.quote-interlude-wrap { padding: calc(var(--space) * 0.6) 0; }
.quote-interlude { font-style: italic; font-size: clamp(1.25rem, 2.5vw, 1.6rem); text-align: center; color: var(--ink-soft); line-height: 1.5; }
.quote-dark { color: var(--dark-muted); }

/* Concepts */
.concept-list { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.concept-card { border: 1px solid var(--hairline); padding: 1.25rem 1.4rem; }
.concept-card h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.2rem; margin-bottom: 0.35rem; }
.more-link { white-space: nowrap; }

/* Songs / player */
.section-intro { color: var(--dark-muted); max-width: var(--measure); margin-bottom: 1.5rem; }
.player { display: flex; align-items: center; gap: 1rem; background: var(--dark-panel); padding: 0.9rem 1.1rem; margin-bottom: 0.7rem; max-width: 44rem; }
.player-toggle { background: none; border: 1px solid var(--dark-accent); color: var(--dark-accent); width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer; font-size: 0.9rem; flex-shrink: 0; }
.player-title { flex-shrink: 0; }
.player-bar { flex: 1; height: 3px; background: var(--dark-hairline); cursor: pointer; }
.player-progress { height: 100%; width: 0; background: var(--dark-accent); }
.player-time { font-size: 0.85rem; color: var(--dark-muted); font-variant-numeric: tabular-nums; }
.player-credits { font-size: 0.8rem; color: var(--dark-muted); margin: 0 0 1.6rem; max-width: 44rem; }
.player-desc { font-size: 0.9rem; font-style: italic; color: var(--dark-muted); margin: -0.35rem 0 0.4rem; max-width: 44rem; }
.texte-note { margin-top: 2rem; max-width: 44rem; }

/* Apps gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item a { display: block; background: var(--paper); padding: 0.5rem; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.gallery-item figcaption { font-size: 0.85rem; color: var(--dark-muted); margin-top: 0.5rem; }
.gallery-hint { font-size: 0.85rem; color: var(--dark-muted); margin-top: 1.2rem; }

/* Lightbox */
#lightbox { position: fixed; inset: 0; background: rgba(1, 10, 22, 0.92); display: none; align-items: center; justify-content: center; padding: 2rem; cursor: zoom-out; z-index: 10; }
#lightbox.open { display: flex; }
#lightbox img { max-width: min(90vw, 1200px); max-height: 90vh; }

/* Talks — full-bleed carousel (images + silent video slide) */
.carousel { position: relative; margin-top: 3rem; aspect-ratio: 16 / 9; max-height: 88vh; width: 100%; overflow: hidden; background: var(--hero-blue); }
.carousel-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.carousel-slide.is-active { opacity: 1; }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 0.9rem; display: flex; gap: 0.55rem; justify-content: center; z-index: 2; }
.carousel-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(240, 245, 250, 0.45); cursor: pointer; padding: 0; }
.carousel-dot.is-active { background: var(--paper); }

footer { padding: 2.5rem 0; border-top: 1px solid var(--hairline); }
.footer-line { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-soft); }
.footer-line a { color: var(--ink-soft); }

/* Subpage shell */
.subpage main { padding: calc(var(--space) * 0.75) 0; }
.subpage main p { margin-bottom: 1.1rem; }
.subpage h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.3rem; margin: 2rem 0 0.7rem; }
.subpage .container { max-width: var(--measure); }
.back-link { display: inline-block; margin-top: 2.5rem; font-size: 0.9rem; }

@media (max-width: 640px) {
  .hero-content { left: 1.25rem; right: 1.25rem; max-width: none; }
  .hero-shade { background: linear-gradient(90deg, rgba(1, 15, 34, 0.82) 0%, rgba(1, 15, 34, 0.45) 55%, rgba(1, 15, 34, 0.12) 80%); }
  .gallery { grid-template-columns: 1fr; }
  .player { flex-wrap: wrap; }
  .player-title { flex-basis: 100%; order: -1; }
}

/* gentle edge where light meets dark */
#apps { border-top: 1px solid var(--dark-hairline); }
#vortraege { border-top: 1px solid var(--hairline); }

/* About: two columns */
.container-wide { max-width: 76rem; }
.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-columns h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.5rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--hairline); margin-bottom: 1.1rem; }
.about-list { list-style: disc; margin: 0; padding-left: 1.25rem; line-height: 1.75; }
.about-list li + li { margin-top: 0.5rem; }
.about-list li::marker { color: var(--accent); }
.about-mail { margin-top: 1.4rem; }
@media (max-width: 640px) { .about-columns { grid-template-columns: 1fr; gap: 2rem; } }

/* Zeitenwende modal */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(1, 15, 34, 0.85); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: pointer; }
.modal-overlay[hidden] { display: none; }
.modal-panel { position: relative; max-width: 46rem; max-height: 86vh; overflow-y: auto; background: var(--paper); color: var(--ink); padding: clamp(2rem, 5vw, 3.25rem); border-top: 4px solid var(--accent); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); outline: none; }
.modal-panel h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.15; margin-bottom: 1.2rem; }
.modal-panel p + p { margin-top: 1.1rem; }
.modal-panel strong { font-weight: 600; background: rgba(31, 108, 181, 0.14); padding: 0.08em 0.25em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.modal-close { position: absolute; top: 0.9rem; right: 1.1rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }

/* Page overlay (v3): apps + konzepte open in a popup instead of subpages */
.page-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(1, 15, 34, 0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.page-overlay[hidden] { display: none; }
.page-overlay-frame { position: relative; width: 95vw; height: 94vh; background: var(--paper); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65); animation: overlay-pop 0.35s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes overlay-pop { from { transform: scale(0.92) translateY(2vh); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .page-overlay-frame { animation: none; } }
.page-overlay-iframe { display: block; width: 100%; height: 100%; border: 0; }
.page-overlay-close { position: absolute; top: 0.55rem; right: 0.7rem; z-index: 2; border: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgba(1, 15, 34, 0.55); color: #ffffff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.page-overlay-close:hover { background: rgba(1, 15, 34, 0.8); }

/* Talks section claim (below the "Vorträge" heading) */
.talks-claim { font-family: var(--font-serif); font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.45; margin-bottom: 1.4rem; }

/* Slim fixed anchor navigation */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: flex-end; gap: 1.4rem; padding: 0.85rem clamp(1rem, 3vw, 2rem); font-size: 0.85rem; letter-spacing: 0.04em; transition: background 0.3s ease, box-shadow 0.3s ease; }
.site-nav a { color: var(--hero-lightblue); }
.site-nav.is-scrolled { background: rgba(240, 245, 250, 0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--hairline); }
.site-nav.is-scrolled a { color: var(--ink); }
@media (max-width: 640px) { .site-nav { gap: 0.9rem; font-size: 0.78rem; justify-content: center; } }
section[id] { scroll-margin-top: 3rem; }

/* Hero call-to-action link */
.hero-cta { margin-top: 1.7rem; }
.hero-cta a { display: inline-block; border: 1px solid var(--hero-lightblue); color: var(--hero-lightblue); padding: 0.6rem 1.4rem; font-size: 0.95rem; }
.hero-cta a:hover { background: var(--hero-lightblue); color: var(--hero-blue); text-decoration: none; }

/* Talk request block */
.talk-request { margin-top: 2.5rem; border: 1px solid var(--hairline); padding: 1.75rem 1.9rem; max-width: var(--measure); }
.talk-request h3 { font-family: var(--font-serif); font-weight: 400; font-size: 1.5rem; margin-bottom: 0.6rem; }
.talk-request-btn { display: inline-block; margin-top: 1.1rem; border: 1px solid var(--accent); color: var(--accent); padding: 0.6rem 1.4rem; font-weight: 600; font-size: 0.95rem; }
.talk-request-btn:hover { background: var(--accent); color: #ffffff; text-decoration: none; }
