/* ═══════════════════════════════════════════════════════════════
   Langnau Hackathon — landing page
   Swiss grid discipline, Apple-quiet surfaces, one red accent.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f5f5f7;
  --ink:       #08080a;
  --ink-2:     #6e6e73;
  --ink-3:     #a1a1a6;
  --line:      rgba(0, 0, 0, .11);
  --red:       #e30613;
  --red-dark:  #b8040f;

  --wrap:      1240px;
  --gutter:    clamp(20px, 5vw, 56px);
  --nav-h:     58px;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
h1, h2, p, dl, dd { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  font-size: 14px;
}
.skip:focus { left: 0; }

/* ── Navigation ──────────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav__inner {
  height: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.mark__glyph { width: 20px; height: 20px; flex: none; border-radius: 5px; }
.mark__text  { color: var(--ink); font-weight: 400; }
.mark__text b { font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
  --pad-y: 15px;
  --pad-x: 28px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.015em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .22s var(--ease), transform .22s var(--ease);
}
.btn:hover  { background: var(--red-dark); }
.btn:active { transform: scale(.975); }

.btn--sm { --pad-y: 8px; --pad-x: 16px; font-size: 14px; }
.btn--lg { --pad-y: 19px; --pad-x: 38px; font-size: 19px; }

.btn__arrow {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform .22s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

:where(a, button):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 6px;
}
.nav .btn:focus-visible,
.close .btn:focus-visible { outline-color: var(--ink); }

/* ── Media: blur-up frames ───────────────────────────────────── */

/* Every frame defines its own box (aspect-ratio, flex or inset). The picture is
   taken out of flow so the photo can never push that box taller than intended. */
.media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background-color: var(--bg-soft);
  background-size: cover;
  background-position: center;
}
.media > picture {
  position: absolute;
  inset: 0;
  display: block;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.media.is-loaded img { opacity: 1; }

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.hero__text {
  padding-top: calc(var(--nav-h) + clamp(48px, 11vh, 128px));
  padding-bottom: clamp(40px, 7vh, 80px);
}

.eyebrow {
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: clamp(18px, 2.6vw, 30px);
}

/* The event name carries the page. */
.display {
  font-size: clamp(2.35rem, 7.9vw, 6.9rem);
  line-height: .94;
  font-weight: 600;
  letter-spacing: -.048em;
  text-wrap: balance;
}

/* The motto sits directly beneath it — secondary in weight, still loud. */
.motto {
  margin-top: clamp(14px, 1.8vw, 22px);
  font-size: clamp(21px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -.035em;
  color: var(--ink-2);
  text-wrap: balance;
}
.motto em {
  font-style: normal;
  color: var(--red);
}

.hero__cta {
  margin-top: clamp(30px, 4vw, 46px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
}
.hero__note {
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: -.005em;
}

.hero__media {
  flex: 1 1 auto;
  min-height: clamp(260px, 38svh, 460px);
}
/* Sit the crop on the horizon: Alps and the path, not empty sky. */
.hero__media img { object-position: 50% 62%; }

/* ── Facts ───────────────────────────────────────────────────── */

.facts {
  padding-block: clamp(56px, 9vw, 112px);
}
.facts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.fact {
  background: var(--bg);
  padding: clamp(24px, 3.2vw, 40px) clamp(18px, 2.4vw, 32px);
}
.fact dt {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.fact dd {
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.25;
}
.fact dd span {
  display: inline-block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--ink-2);
}

/* ── Panorama band ───────────────────────────────────────────── */

.band { padding-bottom: clamp(56px, 9vw, 112px); }

.media--pano {
  width: 100%;
  aspect-ratio: 2200 / 513;
}

.statement {
  margin-top: clamp(36px, 5vw, 64px);
  font-size: clamp(2rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -.04em;
}
.statement em { font-style: normal; color: var(--ink-3); }

/* ── Mosaic ──────────────────────────────────────────────────── */

.mosaic-wrap { padding-bottom: clamp(56px, 9vw, 112px); }

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
}
.mosaic .media { border-radius: clamp(8px, 1vw, 14px); }

.m1 { grid-column: 1 / 6;   aspect-ratio: 4 / 5; }
.m2 { grid-column: 7 / 13;  aspect-ratio: 3 / 2; align-self: center; }
.m3 { grid-column: 1 / 8;   aspect-ratio: 3 / 2; }
.m4 { grid-column: 9 / 13;  aspect-ratio: 4 / 5; align-self: end; }
.m5 { grid-column: 1 / 13;  aspect-ratio: 21 / 9; }

/* ── Closing CTA ─────────────────────────────────────────────── */

.close {
  position: relative;
  isolation: isolate;
  min-height: clamp(440px, 74svh, 760px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.close__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.close::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
              rgba(0, 0, 0, .34) 0%,
              rgba(0, 0, 0, .16) 45%,
              rgba(0, 0, 0, .42) 100%);
}
.close__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(26px, 3.6vw, 42px);
  padding-block: 72px;
}
.close__kicker {
  color: rgba(255, 255, 255, .82);
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: clamp(-14px, -1.4vw, -8px);
  text-shadow: 0 1px 20px rgba(0, 0, 0, .4);
}
.close__title {
  color: #fff;
  font-size: clamp(2.6rem, 7.6vw, 6rem);
  line-height: .98;
  font-weight: 600;
  letter-spacing: -.045em;
  text-shadow: 0 1px 34px rgba(0, 0, 0, .3);
}
.close .btn {
  background: #fff;
  color: var(--ink);
}
.close .btn:hover { background: var(--bg-soft); }

/* ── Footer ──────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--line);
  padding-block: 34px;
}
.foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: -.01em;
}
.foot__mark { color: var(--ink); }
.foot__mark b { font-weight: 600; }

/* ── Scroll reveal ───────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease) var(--d, 0ms),
              transform .7s var(--ease) var(--d, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.no-js .reveal { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .facts__grid { grid-template-columns: 1fr; }
  .m1, .m2, .m3, .m4, .m5 { grid-column: 1 / 13; align-self: auto; }
  .m5 { aspect-ratio: 3 / 2; }
  .media--pano { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__note { display: none; }
  .mark__text { font-size: 14px; }
  .m1, .m4 { aspect-ratio: 3 / 4; }
}

/* ── Motion & contrast preferences ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .close__bg { display: none; }
  body { color: #000; }
}
