/* Skiride: the website wears the app's design. Snow white and sky blue, graphite thin type, translucent glass cards
   with a soft blue shadow (Jony Ive's iOS 7), one tiny orange accent for the one main action (Dieter Rams). Tokens are
   the app's: mercandalli_ios/app_gps_ski/theme/GpsSkiTheme.swift (copied in js/theme/SkiTheme.js too). */
:root {
    --bg: #f4f8fc;
    --sky: #d8e9f8;
    --text: #1c1f24;
    --text-2: #778595;
    --hairline: rgba(28, 31, 36, 0.1);
    --blue: #399deb;
    --orange: #ff6a13;
    --green: #34a865;
    --red: #df4146;
    --piste-blue: #2d74d9;
    --lift: #f8bb19;
    --lift-text: #b07a00;
    --poi: #8d5736;
    --glass: rgba(255, 255, 255, 0.62);
    --glass-border: rgba(255, 255, 255, 0.92);
    --shadow: 0 18px 50px rgba(74, 115, 156, 0.18), 0 2px 6px rgba(74, 115, 156, 0.1);
    --radius: 26px;
    --gutter: clamp(16px, 4vw, 48px);
    --max: 1180px;
    --sans: -apple-system, "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, system-ui, sans-serif;
    --hero: 0;
    color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; color: var(--text); font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.55;
    background: linear-gradient(180deg, var(--bg) 0%, #fff 30%, var(--bg) 60%, var(--sky) 100%);
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 200; letter-spacing: -0.035em; line-height: 1.03; }
h1 { font-size: clamp(46px, 8.6vw, 116px); font-weight: 100; }
h2 { font-size: clamp(34px, 5.4vw, 68px); }
h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--text-2); max-width: 580px; line-height: 1.5; }
.eyebrow { display: block; margin-bottom: 20px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.note { font-size: 13px; color: var(--text-2); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.glass {
    background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
}

/* Buttons: the one main action is orange (Rams), the others white glass. */
.button {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; border: 0;
    font: 600 16px/1 var(--sans); letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
    background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(255, 106, 19, 0.3); transition: transform 0.2s, box-shadow 0.2s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255, 106, 19, 0.36); }
.button--ghost { background: rgba(255, 255, 255, 0.8); color: var(--text); box-shadow: var(--shadow); }
.button--ghost:hover { box-shadow: 0 14px 34px rgba(74, 115, 156, 0.24); }
.button--small { padding: 10px 16px; font-size: 14px; }
.button svg { width: 18px; height: 18px; }

/* Store badges, light. */
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badges--center { justify-content: center; }
.store-badge {
    display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 14px; border-radius: 14px;
    background: var(--text); color: #fff; transition: transform 0.2s;
}
.store-badge:hover { transform: translateY(-1px); }
.store-badge__logo { width: 24px; height: 24px; }
.store-badge__text { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge__pre { font-size: 11px; font-weight: 400; opacity: 0.85; }
.store-badge__store { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.store-badge.is-soon { background: rgba(28, 31, 36, 0.55); cursor: default; }
.store-badge.is-soon:hover { transform: none; }

/* Nav */
.nav {
    position: fixed; inset: 0 0 auto 0; z-index: 20; height: 64px; display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding: 0 var(--gutter); border-bottom: 1px solid transparent; transition: background-color 0.4s, border-color 0.4s;
}
.nav--solid {
    background: rgba(255, 255, 255, 0.66); border-bottom-color: var(--hairline);
    -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font: 600 17px var(--sans); letter-spacing: -0.01em; }
.nav__brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 8px rgba(74, 115, 156, 0.25); }
.nav__links { display: flex; gap: 28px; font-size: 14px; font-weight: 400; color: var(--text-2); }
.nav__links a:hover { color: var(--text); }
@media (max-width: 860px) { .nav__links { display: none; } }

/* Language menu (the tennis site's, in the ski design): a globe and the code, a glass list of the 15 languages. */
.nav__end { display: flex; align-items: center; gap: 10px; }
.lang-switch { position: relative; }
.lang-switch__toggle {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
    border: 1px solid var(--hairline); background: rgba(255, 255, 255, 0.55); color: var(--text);
    font: 500 13px var(--sans); letter-spacing: 0.02em; cursor: pointer;
}
.lang-switch__toggle:hover { background: #fff; }
.lang-switch__toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.lang-switch__globe { width: 16px; height: 16px; color: var(--text-2); }
.lang-switch__menu {
    position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; margin: 0; padding: 6px; list-style: none;
    min-width: 172px; max-height: min(70vh, 520px); overflow-y: auto; border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}
.lang-switch__menu[hidden] { display: none; }
.lang-switch__item { display: block; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 400; color: var(--text); white-space: nowrap; }
.lang-switch__item:hover { background: rgba(57, 157, 235, 0.1); }
.lang-switch__item.is-active { background: var(--blue); color: #fff; font-weight: 600; }
.lang-switch__item:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
@media (max-width: 400px) { .nav__end .button--small { padding: 10px 12px; } .lang-switch__toggle { padding: 0 10px; } }

/* Hero: the 3D map turning over a ski area, behind the title. */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--sky); }
.hero__map { position: absolute; inset: 0; }
.hero__map .maplibregl-ctrl-bottom-right { bottom: 8px; }
.hero__veil {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(244, 248, 252, 0.96) 0%, rgba(244, 248, 252, 0.72) 28%, rgba(244, 248, 252, 0) 58%),
        linear-gradient(to bottom, rgba(244, 248, 252, 0.85), rgba(244, 248, 252, 0) 16%);
}
.hero__content {
    position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(44px, 8vh, 90px);
    display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
    transform: translate3d(0, calc(var(--hero) * 80px), 0); opacity: calc(1 - var(--hero) * 1.3);
}
.hero__tag {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--text);
}
.hero__tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(52, 168, 101, 0.2); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__legend {
    position: absolute; z-index: 1; top: 84px; right: var(--gutter); display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
    border-radius: 20px; font-size: 13px; font-weight: 500;
    transform: translate3d(0, calc(var(--hero) * -40px), 0); opacity: calc(1 - var(--hero) * 1.6);
}
.legend__row { display: flex; align-items: center; gap: 10px; }
.legend__row i { width: 22px; height: 4px; border-radius: 2px; background: var(--c); }
@media (max-width: 720px) {
    .hero__legend { display: none; }
    /* The text takes most of a phone's height: the veil comes higher. */
    .hero__veil {
        background: linear-gradient(to top, rgba(244, 248, 252, 0.97) 0%, rgba(244, 248, 252, 0.86) 42%, rgba(244, 248, 252, 0) 72%),
            linear-gradient(to bottom, rgba(244, 248, 252, 0.85), rgba(244, 248, 252, 0) 14%);
    }
}

/* Numbers */
.promise {
    max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 110px) var(--gutter) 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.promise__number { font-size: clamp(40px, 6vw, 76px); font-weight: 100; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.promise__caption { margin-top: 10px; font-size: 15px; color: var(--text-2); }
@media (max-width: 640px) { .promise { grid-template-columns: 1fr; gap: 28px; } }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 150px) var(--gutter) 0; }
.section--wide { max-width: 1380px; }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; gap: 18px; }
.section__head .eyebrow { margin-bottom: 0; }

/* The live map, embedded */
.live-map { position: relative; height: min(82vh, 760px); min-height: 520px; border-radius: 30px; overflow: hidden; }
.live-map ski-map-view { position: absolute; inset: 0; }
/* Beside the map's own 3D and position buttons (top right), clear of the attribution line. */
.live-map__open { position: absolute; z-index: 3; right: 68px; top: 14px; }
@media (max-width: 640px) {
    .live-map { height: 86svh; border-radius: 24px; margin: 0 calc(var(--gutter) * -0.5); }
    .live-map__open { right: auto; left: 12px; top: 12px; }
}
.hints { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
.hint { font-size: 14px; color: var(--text-2); }
.hint b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 860px) { .hints { grid-template-columns: repeat(2, 1fr); } }

/* Cards and grids */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; align-items: start; }
.card { border-radius: var(--radius); padding: clamp(20px, 2.6vw, 30px); }
.card--4 { grid-column: span 4; }
.card--5 { grid-column: span 5; }
.card--6 { grid-column: span 6; }
.card--7 { grid-column: span 7; }
.card--8 { grid-column: span 8; }
.card--12 { grid-column: span 12; }
@media (max-width: 860px) { .grid > .card { grid-column: span 12; } }
.card h3 { margin: 14px 0 8px; }
.card p { color: var(--text-2); font-size: 16px; }

/* The levels */
.levels { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.level { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 2px 8px rgba(74, 115, 156, 0.14); }
.level i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }

/* A route drawn as steps */
.steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.step { display: grid; grid-template-columns: 4px 1fr auto; gap: 14px; align-items: center; padding: 8px 0; }
.step i { align-self: stretch; border-radius: 2px; background: var(--c); }
.step b { font-weight: 600; display: block; }
.step span { color: var(--text-2); font-size: 14px; }
.step em { font-style: normal; color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* The day card, rebuilt from the app */
.day { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .day { grid-template-columns: 1fr; } }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 12px; margin-top: 18px; }
.stat-grid dt { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.stat-grid dd { margin: 4px 0 0; font-size: clamp(26px, 3vw, 36px); font-weight: 200; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-grid dd small { font-size: 0.5em; color: var(--text-2); margin-left: 3px; }
.stat-grid .top dd { color: var(--orange); }
.profile { width: 100%; height: 170px; margin-top: 18px; }
.runs { list-style: none; margin: 14px 0 0; padding: 0; }
.run { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--hairline); font-size: 15px; }
.run i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.run span { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 14px; }
.run b { font-weight: 500; }

/* Features */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { border-radius: 22px; padding: 22px; }
.feature__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; box-shadow: 0 2px 8px rgba(74, 115, 156, 0.18); }
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; margin: 14px 0 6px; }
.feature p { font-size: 15px; color: var(--text-2); }
.feature__badge { display: inline-block; margin-inline-start: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 2px; background: rgba(57, 157, 235, 0.12); color: var(--piste-blue); letter-spacing: 0.02em; }

/* Statement */
.statement { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.statement .lead { margin: 0 auto; }

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.review { margin: 0; padding: 24px; border-radius: 22px; }
.review__stars { color: var(--orange); letter-spacing: 2px; }
.review blockquote { margin: 12px 0; }
.review figcaption { font-size: 13px; color: var(--text-2); }

/* FAQ */
.faq { max-width: 860px; display: flex; flex-direction: column; gap: 10px; }
.faq details { border-radius: 20px; padding: 0 22px; background: rgba(255, 255, 255, 0.7); box-shadow: 0 2px 10px rgba(74, 115, 156, 0.1); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 28px 20px 0; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 16px; font-size: 24px; font-weight: 200; color: var(--blue); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq__answer { padding: 0 0 22px; color: var(--text-2); }
.faq__answer a { text-decoration: underline; }

/* Final */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; padding-bottom: clamp(80px, 12vw, 140px); }
.final__icon { width: 120px; height: 120px; border-radius: 28px; box-shadow: 0 20px 50px rgba(74, 115, 156, 0.35); }

.footer {
    max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 10px 24px;
    font-size: 13px; color: var(--text-2); border-top: 1px solid var(--hairline);
}
.footer a:hover { color: var(--text); }
.footer__legal { flex-basis: 100%; font-size: 12px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero__content, .hero__legend { transform: none; opacity: 1; }
}

/* map/: the map on its own, full screen */
.map-page { height: 100svh; overflow: hidden; background: var(--bg); }
.map-page__map { position: fixed; inset: 0; }
.map-page__bar {
    position: fixed; z-index: 5; top: 12px; right: 70px; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 8px; border-radius: 999px;
}
.map-page__brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.map-page__brand img { border-radius: 8px; }
.map-page__note { font-size: 13px; color: var(--text-2); }
@media (max-width: 640px) {
    .map-page__bar { right: 64px; left: auto; }
    .map-page__note, .map-page__brand span { display: none; }
}
@media (min-width: 641px) and (max-width: 900px) { .map-page__note { display: none; } }
