/* Shared styles for every page of alpinerover.ch. A page that needs more
   brings its own stylesheet (tasks.css) rather than adding page-only rules
   here.

   Corporate design, taken from the logo: navy for the mountain and the
   letters, glacier blue for the ice, Swiss red only where the flag is. */
:root {
  --night: #0b1f3a;
  /* logo navy */
  --night-2: #0f2848;
  --ice: #eef3fa;
  --ice-dim: #a3b5cf;
  --line: rgba(160, 195, 235, .18);
  --glow: #3a9be8;
  /* logo glacier blue */
  --glow-soft: rgba(58, 155, 232, .16);
  --snow: #ffffff;
  --stencil: "Black Ops One", ui-sans-serif, Impact, sans-serif;
  --maxw: 1080px;
  --nav-h: 68px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ice);
  font: 400 17px/1.65 ui-sans-serif, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px
}

a {
  color: var(--ice)
}

h1,
h2,
h3,
h4 {
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0
}

h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 650
}

h3 {
  font-size: 19px;
  font-weight: 650
}

h4 {
  font-size: 17px;
  font-weight: 650
}

p {
  margin: 0
}

section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--nav-h);
}

/* Alternating bands give the page a rhythm without needing more dividers. */
.band {
  background: var(--night-2)
}

.eyebrow {
  font-family: var(--stencil);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--glow);
  font-weight: 400;
  margin-bottom: 14px;
}

.lede {
  color: var(--ice-dim);
  font-size: 18px;
  max-width: 62ch;
  margin-top: 16px
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: var(--nav-h);
  background: rgba(11, 31, 58, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-mark img {
  display: block;
  width: 84px;
  height: auto
}

.nav-links {
  display: flex;
  gap: 26px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.nav-links a {
  color: var(--ice-dim);
  text-decoration: none
}

.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--ice)
}

.nav .btn {
  padding: 9px 18px;
  font-size: 15px
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 44px) 0 64px;
  border-top: 0;
  overflow: hidden;
}

/* Davos: the lake, the congress centre, the ridge behind. Its blue-black
   palette is close enough to --night that the scrim below only has to
   darken, not recolour. */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('/assets/hero-davos.jpg') center 38% / cover no-repeat;
}

/* Two scrims, because the headline sits left and the section boundary sits
   bottom. The horizontal one keeps text on near-solid --night while the
   right-hand third of the photograph stays legible as a photograph; the
   vertical one fades the base into the section below so the seam does not
   read as a hard crop. */
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(11, 31, 58, .97) 0%, rgba(11, 31, 58, .93) 46%, rgba(11, 31, 58, .72) 70%, rgba(11, 31, 58, .45) 100%),
    linear-gradient(to bottom, rgba(11, 31, 58, .55) 0%, transparent 22%, transparent 62%, var(--night) 100%);
}

.hero-glow {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: 50%;
  top: 22%;
  transform: translate(-50%, -50%);
  width: min(1100px, 140vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--glow-soft) 0%, transparent 62%);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  width: 100%
}

/* The logo is the headline; its alt text carries the event name. */
h1 .logo {
  display: block;
  width: clamp(250px, 36vw, 420px);
  height: auto;
}

.tagline {
  margin-top: 30px;
  font-size: clamp(21px, 2.6vw, 28px);
  font-weight: 600;
  color: var(--ice);
  max-width: 34ch;
  line-height: 1.3;
}

.hero .lede {
  max-width: 54ch
}

/* The key facts sit in one frosted panel so they read as a unit, separate
   from the pitch above them. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 56px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 31, 58, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fact {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.fact:last-child {
  border-right: 0
}

.fact dt {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ice-dim);
  margin-bottom: 7px
}

.fact dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600
}

.fact .tbc {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ice-dim);
  margin-top: 3px
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 36px
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 15px 28px;
  border-radius: 8px;
  text-align: center;
  transition: transform .15s ease, background .15s ease;
}

.btn-primary {
  background: var(--glow);
  color: var(--night)
}

.btn-primary:hover {
  background: #62b2f0;
  transform: translateY(-1px)
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ice)
}

.btn-ghost:hover {
  border-color: var(--ice-dim)
}

/* ---------- subpage intro ---------- */
/* The home page opens on the photograph; every other page opens on this
   plain header, so the photograph stays the home page's alone. */
.page-intro {
  padding: calc(var(--nav-h) + 64px) 0 56px;
  border-top: 0;
  background: radial-gradient(ellipse at 80% 0%, var(--glow-soft) 0%, transparent 60%);
}

.page-intro h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 650
}

/* ---------- why: card grid ---------- */
.grid {
  display: grid;
  gap: 16px;
  margin-top: 48px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr)
}

.card {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 26px;
}

.band .card {
  background: var(--night)
}

.card p {
  color: var(--ice-dim);
  font-size: 15.5px;
  margin-top: 10px
}

.num {
  font-family: var(--stencil);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--glow);
  font-weight: 400;
  margin-bottom: 14px;
  display: block;
}

/* ---------- tasks: one card per task, its parts inside ---------- */
.tasks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.task-when {
  font-size: 14px;
  color: var(--ice-dim);
  margin-top: 6px
}

.parts {
  list-style: none;
  margin: 24px 0 0;
  padding: 0
}

.parts li {
  padding: 20px 0 0;
  margin-top: 20px;
  border-top: 1px solid var(--line)
}

.parts li:first-child {
  margin-top: 0
}

.parts .part-when {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--glow);
  font-weight: 600;
  display: block;
  margin-bottom: 6px
}

.parts p {
  margin-top: 6px
}

/* ---------- schedule: timeline ---------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  max-width: 820px
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 0 0 30px 38px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--ice-dim);
  background: var(--night);
}

.timeline li::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 24px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline li:last-child {
  padding-bottom: 0
}

.timeline li:last-child::after {
  display: none
}

.timeline .day {
  font-weight: 650;
  font-size: 15px
}

.timeline .what {
  color: var(--ice-dim);
  font-size: 16px
}

/* Competition days carry the brand blue; travel days stay quiet. */
.timeline .comp::before {
  border-color: var(--glow);
  background: var(--glow);
  box-shadow: 0 0 0 5px var(--glow-soft);
}

.timeline .comp .what {
  color: var(--ice)
}

/* ---------- location ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.venues {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  border-top: 1px solid var(--line)
}

.venues li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--ice-dim);
}

.venues li b {
  display: block;
  color: var(--ice);
  font-weight: 600
}

/* A bright, sunny photograph on a dark page. Framing it rather than
   bleeding it to the edges is what keeps it from fighting the palette:
   the border and radius make it read as a document, not a background. */
.photo {
  margin: 0;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.photo figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ice-dim);
}

/* ---------- team ---------- */
/* The portraits come from different cameras and backgrounds; the same square
   crop, radius and border are what make them read as one set. */
.people {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.people img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.people .role {
  display: block;
  font-family: var(--stencil);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--glow);
  margin-top: 6px;
}

.people p {
  color: var(--ice-dim);
  font-size: 15px;
  line-height: 1.55;
  margin-top: 8px;
}

/* ---------- register ---------- */
#register {
  background:
    radial-gradient(ellipse at 85% 0%, var(--glow-soft) 0%, transparent 60%),
    var(--night-2)
}

.reg {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center
}

.reg-list {
  margin: 24px 0 0;
  padding-left: 20px;
  color: var(--ice-dim);
  font-size: 16px
}

.reg-list li {
  margin-bottom: 7px
}

.reg-card {
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 30px;
}

.reg-card img {
  display: block;
  width: 120px;
  height: auto;
  margin-bottom: 22px
}

.reg-card .when {
  font-size: 20px;
  font-weight: 650
}

.reg-card .where {
  color: var(--ice-dim);
  font-size: 15px;
  margin-top: 2px
}

.reg-card .btn {
  display: block;
  margin-top: 26px
}

.reg-card .contact {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ice-dim);
  text-align: center
}

.reg-card .contact a {
  color: var(--ice-dim)
}

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start
}

/* The Tally form is styled in Tally to the site colours and embedded with a
   transparent background, so its fields read as part of the page. */
.contact-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 30px 8px;
}

.contact-form iframe {
  display: block;
  border: 0
}

/* ---------- footer ---------- */
footer {
  padding: 56px 0 72px;
  border-top: 1px solid var(--line);
  color: var(--ice-dim);
  font-size: 14.5px
}

footer .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between
}

footer .mark {
  display: block;
  width: 92px;
  height: auto;
  margin-bottom: 16px
}

footer strong {
  color: var(--ice);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  font-size: 15px
}

footer a {
  color: var(--ice-dim)
}

footer a:hover {
  color: var(--ice)
}

/* One address per concern, so a message lands with whoever handles it. */
.contacts {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 18px;
  margin: 0
}

.contacts dt {
  color: var(--ice)
}

.contacts dd {
  margin: 0
}

.disclaimer {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  max-width: 70ch
}

@media (max-width:900px) {
  .nav-links {
    display: none
  }

  .nav .btn {
    margin-left: auto
  }

  .facts {
    grid-template-columns: repeat(2, 1fr)
  }

  .fact:nth-child(2) {
    border-right: 0
  }

  .fact:nth-child(-n+2) {
    border-bottom: 1px solid var(--line)
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr)
  }

  .people {
    grid-template-columns: repeat(3, 1fr)
  }

  .split,
  .reg,
  .contact {
    grid-template-columns: 1fr;
    gap: 40px
  }
}

@media (max-width:640px) {
  :root {
    --nav-h: 60px
  }

  .grid-3,
  .tasks {
    grid-template-columns: 1fr
  }

  .people {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px
  }

  /* The horizontal scrim assumes text occupies the left of a wide viewport.
     On a phone it spans the full width, so darken evenly instead and let
     the photograph read as texture behind it rather than as a subject. */
  .hero-photo::after {
    background:
      linear-gradient(180deg, rgba(11, 31, 58, .9) 0%, rgba(11, 31, 58, .84) 55%, var(--night) 100%);
  }

  /* One column, not two: the longest value ("Davos, Switzerland") plus its
     TBC line does not fit in half a phone width without wrapping to the
     point of being unreadable. Stacked, each fact keeps one line. */
  .facts {
    grid-template-columns: 1fr
  }

  .fact {
    border-right: 0;
    border-bottom: 1px solid var(--line)
  }

  .fact:last-child {
    border-bottom: 0
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 3px
  }

  section {
    padding: 72px 0
  }

  .contact-form {
    padding: 16px 16px 0
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    animation: none !important
  }

  html {
    scroll-behavior: auto
  }
}
