/* Guide pages (/guides/<slug>/). Loaded after style.css on guide pages only, so the homepage never changes. */

/* Light top bar instead of the photo hero */
.g-top { border-bottom: 1px solid var(--line); }
.g-top .btn { border-color: var(--pink); color: var(--wine); }
.g-top .btn:hover { background: var(--pink); }
@media (max-width: 899px) { .g-top .nav-links { display: none; } .g-top .nav-end .btn { display: inline-flex; } }

/* Title block */
.g-head { display: grid; gap: 24px; padding-block: 64px 48px; }
.g-crumbs { display: flex; gap: 8px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.g-crumbs a { text-decoration: none; }
.g-crumbs a:hover { color: var(--pink-ink); }
.g-title { font-size: clamp(48px, 9vw, 136px); font-weight: 500; line-height: .96; letter-spacing: -0.045em; color: var(--wine); }
.g-dek { font-size: clamp(18px, 1.8vw, 24px); font-weight: 300; line-height: 1.5; max-width: 44ch; color: var(--muted); }
.g-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.g-hero { aspect-ratio: 4 / 3; }
@media (min-width: 720px) { .g-head { padding-block: 96px 64px; } .g-hero { aspect-ratio: 21 / 9; } }

/* Article layout: sticky contents on the left, reading column on the right */
.g-layout { display: grid; gap: 48px; padding-block: 80px var(--section); }
.g-toc { display: grid; gap: 16px; align-content: start; }
.g-toc ol { margin: 0; padding: 0 0 0 24px; list-style: none; counter-reset: toc; display: grid; gap: 0; }
.g-toc li { counter-increment: toc; font-size: 14px; padding-block: 4px; display: flex; }
.g-toc li::before { content: counter(toc, decimal-leading-zero); flex: none; width: 32px; color: var(--rose); font-variant-numeric: tabular-nums; }
.g-toc a { text-decoration: none; color: var(--muted); }
.g-toc a:hover { color: var(--ink); }

/* Reading progress: a rose line fills down the track to the section being read, with a small dot at its head */
.g-toc-track { position: relative; }
.g-toc-track::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.g-toc-fill {
  position: absolute; left: -0.5px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--pink), var(--rose));
  transform: scaleY(0); transform-origin: top;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.g-toc-track::after {
  content: ""; position: absolute; left: -3.5px; top: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rose); box-shadow: 0 0 0 4px var(--paper);
  transform: translateY(calc(var(--head, 0px) - 4px)) scale(0); opacity: 0;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .4s ease;
}
.g-toc-track.started::after { opacity: 1; transform: translateY(calc(var(--head, 0px) - 4px)) scale(1); }
.g-toc li a, .g-toc li::before { transition: color .5s ease, opacity .5s ease; }
.g-toc li a { display: block; flex: 1; transition: color .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.g-js .g-toc li.done a { color: var(--ink); opacity: .72; }
.g-js .g-toc li.on a { color: var(--wine); font-weight: 500; transform: translateX(4px); }
.g-js .g-toc li.on::before { color: var(--pink-ink); }

/* Narrow screens: the contents list scrolls away, so a thin bar at the top shows progress instead */
.g-progress { position: fixed; z-index: 10; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; }
.g-progress span {
  position: absolute; inset: 0; background: linear-gradient(90deg, var(--pink), var(--rose));
  transform: scaleX(var(--p, 0)); transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 1024px) { .g-progress { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .g-toc-fill, .g-toc-track::after, .g-toc li a, .g-progress span { transition: none; }
  .g-js .g-toc li.on a { transform: none; }
}
@media (min-width: 1024px) {
  .g-layout { grid-template-columns: repeat(12, 1fr); gap: 24px; padding-block: 120px var(--section); }
  .g-toc { grid-column: 1 / 4; position: sticky; top: 32px; align-self: start; }
  .g-body { grid-column: 5 / 13; }
}

/* Reading column */
.g-body { min-width: 0; font-size: 18px; line-height: 1.7; }
.g-body p { max-width: 68ch; }
.g-body p + p, .g-body h3 + p { margin-top: 16px; }
.g-body a:not(.btn):not(.link-cta) { color: var(--pink-ink); text-decoration-color: var(--pink); text-underline-offset: 4px; }
.g-body b { font-weight: 600; }
.g-sec { scroll-margin-top: 32px; }
.g-sec + .g-sec { margin-top: 96px; padding-top: 96px; border-top: 1px solid var(--line); }
.g-h2 { font-size: clamp(32px, 3.6vw, 48px); margin-bottom: 32px; color: var(--wine); }
.g-body h3 { margin: 48px 0 0; font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; }
.g-body .g-h2 + h3 { margin-top: 0; }
.g-list { display: grid; gap: 16px; margin-top: 24px; }
.g-list li { position: relative; padding-left: 32px; max-width: 68ch; }
.g-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }

/* Places to visit */
.g-spot { padding-block: 40px; border-top: 1px solid var(--line); }
.g-spot:first-of-type { margin-top: 32px; }
.g-spot:last-of-type { border-bottom: 1px solid var(--line); }
.g-spot h3 { margin-top: 0; margin-bottom: 16px; }
.g-facts { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 24px 0 0; font-size: 14px; line-height: 1.5; }
.g-facts dt { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.g-facts dd { margin: 0; color: var(--wine); }

.g-tip { margin-top: 40px; padding: 24px 32px; background: var(--blush); border-left: 2px solid var(--pink); display: grid; gap: 8px; }
.g-tip p { font-size: 16px; margin: 0; }

/* Day-by-day plan */
.g-days { margin: 0; padding: 0; list-style: none; display: grid; }
.g-days li { display: grid; gap: 8px; padding-block: 32px; border-top: 1px solid var(--line); }
.g-days li:last-child { border-bottom: 1px solid var(--line); }
.g-days h3 { margin: 0 0 8px; }
.g-days li .label { padding-top: 8px; }
@media (min-width: 720px) { .g-days li { grid-template-columns: 120px 1fr; gap: 24px; } }
.g-days + p { margin-top: 32px; }

/* FAQ */
.g-faq details { border-top: 1px solid var(--line); }
.g-faq details:last-child { border-bottom: 1px solid var(--line); }
.g-faq summary { display: flex; justify-content: space-between; gap: 24px; padding-block: 24px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer; list-style: none; }
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after { content: "+"; color: var(--rose); font-weight: 400; flex: none; }
.g-faq details[open] summary::after { content: "−"; }
.g-faq details p { padding-bottom: 24px; color: var(--muted); }

/* Stay at UME */
.g-stay-in { display: grid; gap: 40px; }
.g-stay-img { aspect-ratio: 4 / 3; }
.g-stay-copy { display: grid; gap: 24px; align-content: center; }
.g-stay-copy > p:not(.label) { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 44ch; }
.g-stay-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 8px; }
.g-stay .btn { background: var(--pink); border-color: var(--pink); color: var(--wine); }
@media (min-width: 900px) {
  .g-stay-in { grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: center; }
  .g-stay-img { grid-column: 1 / 7; }
  .g-stay-copy { grid-column: 8 / 13; }
}

/* Light header: a soft blush wash fading into the page, wine title, thin pink rule; the wine band is kept for the footer */
.g-band { background: var(--blush); }
.g-band .g-top { border-bottom-color: rgba(200, 154, 171, .45); }
.g-band-in { background: linear-gradient(var(--blush), var(--paper)); }
.g-band-in .g-title { color: var(--wine); }
.g-band-in .g-head { position: relative; }
.g-band-in .g-head::after { content: ""; width: 64px; height: 2px; background: var(--rose); }
.g-hero-wrap { background: var(--paper); }
.g-hero > img { animation: hero-zoom 9s cubic-bezier(.2, .6, .2, 1) both; transform-origin: 50% 60%; }

/* Section and place photos, with their Commons credit */
.g-fig { margin: 0 0 40px; }
.g-fig .ph { aspect-ratio: 3 / 2; }
.g-fig-lead .ph { aspect-ratio: 16 / 9; }
.g-fig-spot { margin-bottom: 24px; }
.g-fig figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.g-fig figcaption a { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted) !important; text-decoration: none !important; }
.g-fig figcaption a:hover { color: var(--pink-ink) !important; }
@media (min-width: 720px) { .g-spot:has(.g-fig-spot) { display: grid; grid-template-columns: 5fr 7fr; column-gap: 32px; align-items: start; } .g-spot:has(.g-fig-spot) > :not(.g-fig-spot) { grid-column: 2; } .g-fig-spot { grid-row: 1 / span 9; margin: 0; } }

/* Photos reveal like the homepage: a soft curtain lifts while the image settles from a slight zoom */
.js-anim .g-fig .ph { clip-path: inset(12% 0 0 0); transition: clip-path 1.4s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
.js-anim .g-fig .ph img { transform: scale(1.12); transition: transform 2s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
.js-anim .g-fig.in .ph { clip-path: inset(0); }
.js-anim .g-fig.in .ph img { transform: none; }
.js-anim .g-title .wi { transition-duration: 1.4s; }
@media (prefers-reduced-motion: reduce) { .g-hero > img { animation: none; } }

/* Active contents entry: deep rose text on a soft blush highlight that slides in, so it stands apart from the read entries */
.g-toc li a { margin-left: -8px; padding: 2px 8px; border-radius: 4px; background: transparent; transition: color .5s ease, background-color .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.g-js .g-toc li.on a { color: #a84a6b; background: var(--blush); }
.g-js .g-toc li.on::before { color: #a84a6b; }

/* "Things to do" map: the homepage ski map, full width, with its list of places below */
.g-map { margin: 0 0 48px; }
.g-map .ski-map { height: clamp(480px, 72vh, 760px); }
.g-map .ski-list { margin-top: 48px; font-size: 16px; line-height: 1.5; }
.g-map .ski-list li { padding: 0; }
.g-map .ski-list a { display: flex; align-items: center; gap: 16px; width: 100%; padding-block: 16px; text-decoration: none; color: inherit; }
.g-map .ski-list a:hover span:first-of-type { color: var(--pink-ink); }
.g-map .ski-list img { width: 48px; height: 32px; object-fit: cover; flex: none; }
.ski-pin.is-link { cursor: pointer; }
.ski-pin.is-link:hover b { text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; }

/* Photo hero: the title sits over a full-bleed photo, darkened at the bottom so the text reads */
.g-photo-hero { position: relative; min-height: 78vh; min-height: 78svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.g-hero-bg { position: absolute; inset: 0; }
.g-hero-bg > img { animation: hero-zoom 9s cubic-bezier(.2, .6, .2, 1) both; transform-origin: 50% 60%; }
.g-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21, 12, 13, .55), rgba(21, 12, 13, .1) 70%), linear-gradient(rgba(21, 12, 13, 0) 35%, rgba(21, 12, 13, .6)); }
.g-photo-hero .g-band-in { position: relative; z-index: 1; width: 100%; background: none; }
.g-photo-hero .g-head { padding-block: 120px 64px; }
.g-photo-hero .g-title { color: #fff; }
.g-photo-hero .g-dek { color: rgba(255, 255, 255, .86); }
.g-photo-hero .g-meta, .g-photo-hero .g-crumbs { color: rgba(255, 255, 255, .72); }
.g-photo-hero .g-head::after { background: var(--pink); }
@media (prefers-reduced-motion: reduce) { .g-hero-bg > img { animation: none; } }
.g-hero-bg > img { object-position: 50% 65%; }
.g-photo-hero .g-dek { max-width: 34ch; } @media (min-width: 1200px) { .g-hero-bg > img { object-position: 65% 65%; } }

/* Header floats over the hero photo, as on the homepage */
.g-band { position: absolute; z-index: 3; top: 0; left: 0; right: 0; background: none; color: #fff; }
.g-band .g-top { border-bottom: 1px solid rgba(255, 255, 255, .18); }
.g-band .g-top .btn { color: #fff; border-color: var(--pink); background: transparent; }
.g-band .g-top .btn:hover { background: var(--pink); color: var(--wine); }
.g-band::before { content: ""; position: absolute; inset: 0 0 -40px; background: linear-gradient(rgba(21, 12, 13, .38), rgba(21, 12, 13, 0)); pointer-events: none; z-index: -1; }
.g-photo-hero { min-height: 100vh; min-height: 100svh; }
.g-photo-hero .g-head { padding-top: 160px; }

/* Intro statement under the hero */
.g-intro-main { margin-bottom: 96px; padding-bottom: 96px; border-bottom: 1px solid var(--line); }
.g-intro-text { max-width: 26ch; font-size: clamp(24px, 2.6vw, 34px); font-weight: 400; line-height: 1.25; letter-spacing: -0.02em; color: var(--wine); }

@media (max-width: 1279px) { .g-map .ski-pin img { width: 52px; height: 36px; } .g-map .ski-pin small { display: none; } }

.g-intro-body { margin-top: 24px; max-width: 52ch; font-size: 18px; line-height: 1.7; color: var(--muted); }
