/* ============================================================
   Rudolfine · rolze.com · massively template aesthetic
   Alpine ski day at Nassfeld, February 2013
   ============================================================ */

/* --- Custom properties ------------------------------------ */
:root {
  --snow:        #f8f9fa;
  --charcoal:    #1a1a1a;
  --mid-grey:    #555;
  --light-grey:  #d0d4d8;
  --ice-blue:    #4a9eda;
  --ice-blue-dk: #2c7db8;
  --rule-color:  #c8d6e0;

  --font-serif:  'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans:   'Raleway', 'Segoe UI', Helvetica, Arial, sans-serif;

  --max-content: 680px;
  --max-feature: 760px;

  --header-h:    56px;
  --transition:  0.25s ease;
}

/* --- Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--snow);
  color: var(--charcoal);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.85;
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.ready { opacity: 1; }

a {
  color: var(--ice-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
a:hover {
  color: var(--ice-blue-dk);
  border-bottom-color: var(--ice-blue-dk);
}

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

/* --- Wrapper ---------------------------------------------- */
#wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Header / sticky nav ---------------------------------- */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--snow);
  border-bottom: 2px solid var(--rule-color);
  height: var(--header-h);
  transition: box-shadow var(--transition);
}
#header.scrolled {
  box-shadow: 0 2px 16px rgba(74, 158, 218, 0.12);
}

#nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(var(--max-feature) + 4rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-home {
  font-weight: 900;
  font-size: 1rem;
  color: var(--charcoal);
  letter-spacing: 0.15em;
  border-bottom: none;
}
.nav-home:hover { color: var(--ice-blue); border-bottom: none; }

.nav-sep { color: var(--light-grey); }

.nav-title {
  color: var(--mid-grey);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-labels {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.label-pill {
  display: inline-block;
  padding: 0.15em 0.65em;
  border-radius: 2px;
  background: var(--snow);
  border: 1px solid var(--ice-blue);
  color: var(--ice-blue);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.6;
  border-bottom: 1px solid var(--ice-blue);
  transition: background var(--transition), color var(--transition);
}
.label-pill:hover {
  background: var(--ice-blue);
  color: #fff;
  border-bottom-color: var(--ice-blue);
}

/* --- Intro / hero ----------------------------------------- */
#intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
}

.intro-rule {
  width: 100%;
  max-width: 520px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rule-color), var(--ice-blue), var(--rule-color), transparent);
  margin: 1.25rem 0;
}

.intro-kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ice-blue);
  margin-bottom: 0.5rem;
}

.intro-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(3.5rem, 12vw, 7rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--charcoal);
  margin: 0.25rem 0;
}

.intro-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--mid-grey);
  margin-top: 0.5rem;
}

.intro-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 2px solid var(--rule-color);
  color: var(--mid-grey);
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 2px solid var(--rule-color);
  animation: bounce 2s ease-in-out infinite;
  transition: border-color var(--transition), color var(--transition);
}
.intro-scroll:hover {
  border-color: var(--ice-blue);
  color: var(--ice-blue);
  border-bottom-color: var(--ice-blue);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* --- Main ------------------------------------------------- */
#main {
  flex: 1;
}

/* --- Featured image --------------------------------------- */
#featured {
  padding: 0 1.5rem 3rem;
}

.featured-figure {
  max-width: var(--max-feature);
  margin: 0 auto;
}

.featured-img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  cursor: zoom-in;
  transition: box-shadow var(--transition), transform var(--transition);
}
.featured-img:hover {
  box-shadow: 0 8px 40px rgba(74, 158, 218, 0.25);
  transform: translateY(-2px);
}

figcaption {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--mid-grey);
  margin-top: 0.65rem;
  font-style: italic;
}

/* --- Event body ------------------------------------------- */
#content {
  padding: 0 1.5rem 4rem;
}

.event-body {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.85;
  max-width: 68ch;
  margin: 0 auto;
  color: var(--charcoal);
}

.event-body p + p {
  margin-top: 1.4rem;
}

.event-body a {
  color: var(--ice-blue);
  border-bottom: 1px solid var(--ice-blue);
}
.event-body a:hover {
  color: var(--ice-blue-dk);
  border-bottom-color: var(--ice-blue-dk);
}

/* --- Footer ----------------------------------------------- */
#footer {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
}

.footer-rule {
  width: 100%;
  max-width: var(--max-content);
  height: 1px;
  background: var(--rule-color);
  margin: 0 auto 1.25rem;
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

/* --- Lightbox --------------------------------------------- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 18, 26, 0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#lightbox.active {
  display: flex;
}
#lightbox-img {
  max-width: min(90vw, 960px);
  max-height: 88vh;
  border-radius: 3px;
  box-shadow: 0 8px 64px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  cursor: default;
}
#lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color var(--transition);
  font-family: var(--font-sans);
}
#lightbox-close:hover { color: #fff; }

/* --- Loading fade-in -------------------------------------- */
@keyframes fadein {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ready #intro  { animation: fadein 0.7s ease 0.1s both; }
.ready #featured { animation: fadein 0.7s ease 0.3s both; }
.ready #content  { animation: fadein 0.7s ease 0.5s both; }

/* --- Breakpoints ------------------------------------------ */
@media (max-width: 768px) {
  #intro { padding: 3.5rem 1rem 3rem; }

  .intro-title { font-size: clamp(2.8rem, 14vw, 5rem); }

  #featured { padding: 0 1rem 2.5rem; }

  #content { padding: 0 1rem 3rem; }

  .event-body { font-size: 1rem; }

  #nav { gap: 0.5rem; }

  .nav-title { display: none; }
}

@media (max-width: 480px) {
  :root { --header-h: 48px; }

  #intro { padding: 2.5rem 1rem 2rem; }

  .intro-title { font-size: 3rem; letter-spacing: -0.01em; }

  .intro-kicker { font-size: 0.65rem; }

  .label-pill { font-size: 0.65rem; padding: 0.1em 0.5em; }

  .event-body { font-size: 0.97rem; line-height: 1.75; }

  figcaption { font-size: 0.7rem; }

  #lightbox-img { max-width: 98vw; max-height: 80vh; }
}

/* ── Collection links ── */
nav.event-collections{display:flex;flex-wrap:wrap;gap:.5rem 1rem;padding:1rem 1.5rem;border-top:1px solid rgba(128,128,128,.2);font-family:var(--font-head,sans-serif);font-size:.82rem}
nav.event-collections .ec-link{color:var(--ice-blue,#4a9eda);text-decoration:none;opacity:.8;transition:opacity .2s}
nav.event-collections .ec-link:hover{opacity:1}
