/* Daylight hero: the full alpine illustration, with the introduction set in its sky.
   The hero keeps light-sky colours in both themes because it is a picture. */
#hero.illustrated-hero {
  --ink: #14140F; --ink-2: #33404A; --ink-3: #46566A;
  --accent: #1D4586; --accent-2: #15315E;
  --line-2: rgba(20,20,15,0.28);
  --sky: #CCE5F4;
  display: block; min-height: 0; padding: 0;
  background: var(--sky); color: var(--ink);
  color-scheme: light; isolation: isolate; overflow: hidden;
}
/* Keep the page texture beneath the artwork so its colours render as supplied. */
body:has(.illustrated-hero)::before { z-index: 0; }
.illustrated-hero .container-hero { position: relative; z-index: 1; padding-top: clamp(104px, 9vw, 132px); }
.illustrated-hero .hero-copy { max-width: 820px; margin-inline: auto; text-align: center; }
.illustrated-hero .hero-actions { justify-content: center; }
.illustrated-hero .hero-name { font-size: clamp(64px, 8.4vw, 128px); margin: 0 0 14px; }
.illustrated-hero .hero-display { font-size: clamp(26px, 2.9vw, 42px); }
.illustrated-hero .hero-actions { margin-top: clamp(20px, 2.2vw, 30px); }
.illustrated-hero .btn-accent { color: #fff; }
/* Pull the picture up under the text; its sky is the top quarter of its width. */
/* The painting, then the text, then the painting's mountains (sky cut out) on top,
   so the text can pass behind the peaks. The figure is not its own stacking layer. */
.illustrated-hero .hero-scenery { position: relative; margin: -21vw 0 0; }
.hero-scenery img { display: block; width: 100%; height: auto; }
.hero-scenery .hero-peaks { position: absolute; inset: 0; z-index: 2; height: 100%; pointer-events: none; }

/* On load the introduction rises from behind the mountains. It starts its own height
   plus 30vw lower: below the deepest dip in the ridge, and clipped at the hero's edge.
   The tagline and buttons trail a little. */
@media (prefers-reduced-motion: no-preference) {
  .hero-rise { animation: hero-rise 1.5s cubic-bezier(.2, .8, .2, 1) .2s both; }
  .hero-rise > .hero-display { animation: hero-trail 1.5s cubic-bezier(.2, .8, .2, 1) .2s both; --trail: 70px; }
  .hero-rise > .hero-actions { animation: hero-trail 1.6s cubic-bezier(.2, .8, .2, 1) .2s both; --trail: 130px; }
  @keyframes hero-rise { from { transform: translateY(calc(100% + 30vw)); } to { transform: none; } }
  @keyframes hero-trail { from { transform: translateY(var(--trail)); } to { transform: none; } }
}

/* Nav sits on the light sky until the page scrolls. */
nav:not(.scrolled) { --ink: #14140F; --ink-2: #33404A; --ink-3: #46566A; --accent: #1D4586; --line-2: rgba(20,20,15,0.28); }
nav:not(.scrolled) .nav-action { color: #14140F; }

/* Intro with portrait, directly below the hero. */
.intro { padding-block: clamp(44px, 4.6vw, 68px) 0; overflow: visible; }
.intro-grid { display: grid; grid-template-columns: minmax(160px, 230px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.intro-portrait { margin: 0; }
.intro .portrait-frame { aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; position: relative; }
.intro #portrait-img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: none; filter: none; }
.intro .portrait-cap { display: flex; justify-content: space-between; padding: 10px 2px 0; color: var(--ink-3); text-transform: uppercase; }
.intro-copy .sec-index { margin-bottom: 16px; }
.intro-text { font-family: 'Instrument Serif', Georgia, serif; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.18; letter-spacing: -.02em; color: var(--ink); max-width: 34ch; text-wrap: pretty; margin: 0; }

#contact.alpine-contact {
  --ink: #fff9e9;
  --ink-2: #e1eafa;
  --ink-3: #e1eafa;
  --accent: #fff9e9;
  --line: #ffffff40;
  --line-2: #ffffff70;
  position: relative; padding: 90px 0 0;
  background: #0c4099; border: 0; isolation: isolate;
  color-scheme: dark;
}
.alpine-sky { position: relative; z-index: 2; }
.alpine-contact-head { display: grid; grid-template-columns: 1.15fr 1fr; align-items: end; gap: 6vw; }
.alpine-contact .sec-index { margin-bottom: 18px; color: var(--ink-2); }
.alpine-headline { font: 400 clamp(90px, 11.5vw, 172px)/.93 'Instrument Serif', Georgia, serif; letter-spacing: -.035em; color: var(--ink); }
.alpine-headline em { color: var(--accent); }
.alpine-invitation { padding-bottom: 8px; }
.alpine-invitation > p { font-size: 17px; line-height: 1.75; max-width: 42ch; color: var(--ink-2); }
.alpine-email { display: inline-flex; align-items: center; gap: 18px; margin-top: 25px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); color: var(--ink); font-size: clamp(20px, 2.4vw, 33px); letter-spacing: -.025em; }
.alpine-email span { transition: transform .25s; }
.alpine-email:hover span { transform: translate(4px, -4px); }
.alpine-details { display: grid; grid-template-columns: 1.15fr .65fr .35fr; gap: 6vw; margin-top: 55px; padding-top: 23px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.alpine-details > p { padding-top: 8px; }
.alpine-socials { display: flex; flex-wrap: wrap; gap: 24px; }
.alpine-socials a { display: inline-flex; align-items: center; min-height: 36px; }
.alpine-socials a:hover { text-decoration: underline; text-underline-offset: 5px; }
.alpine-message summary { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; white-space: nowrap; color: var(--ink); }
.alpine-message summary::-webkit-details-marker { display: none; }
.alpine-message summary span { font-size: 20px; transition: transform .25s; }
.alpine-message[open] summary span { transform: rotate(45deg); }
.alpine-message[open] { grid-column: 1 / -1; }
.alpine-message[open] summary { max-width: 300px; }
.alpine-message .contact-form { max-width: 620px; padding: 25px 0 20px; }
.alpine-contact input, .alpine-contact textarea { color: var(--ink); }
.alpine-contact .contact-form select option { color: #fff9e9; background: #0c4099; }
.alpine-contact .btn { background: #fff9e9; color: #0c4099; }
.alpine-contact :focus-visible { outline-color: #fff9e9; }
.alpine-landscape { position: relative; z-index: 1; margin-top: -28px; }
.alpine-landscape picture { display: block; overflow: hidden; }
.alpine-landscape img { width: 100%; height: clamp(360px, 44vw, 700px); object-fit: cover; object-position: 50% 100%; mask-image: linear-gradient(transparent, #000 24%); }
.alpine-landscape::after { content: ''; position: absolute; inset: 86% 0 0; background: linear-gradient(transparent, #122b49); pointer-events: none; }
.alpine-landscape figcaption { position: absolute; z-index: 2; bottom: 32px; left: max(var(--gut), calc((100vw - 1180px) / 2)); color: #fff; font-size: 12px; line-height: 1.8; letter-spacing: .015em; }
.alpine-landscape figcaption span { display: block; opacity: .78; font-size: 11px; }
.alpine-footer { background: #122b49; color: #fff; border: 0; padding-top: 10px; padding-bottom: 32px; }
.alpine-footer .footer-copy, .alpine-footer .footer-links a { color: #e4eae5; }
.alpine-footer .footer-inner { border-top: 1px solid rgba(255,255,255,.24); padding-top: 20px; }
.alpine-footer .footer-links a:hover { color: #fff; }
.alpine-footer :focus-visible { outline-color: #fff9e9; }

@media (max-width: 980px) and (min-width: 681px) {
}
@media (max-width: 980px) {
  .alpine-contact-head { grid-template-columns: 1fr 1fr; gap: 35px; }
  .alpine-headline { font-size: clamp(80px, 12vw, 125px); }
  .alpine-details { grid-template-columns: 1fr 1fr; gap: 15px 35px; }
  .alpine-message { grid-column: 1 / -1; max-width: 360px; }
  .alpine-landscape { margin-top: 10px; }
}
@media (max-width: 680px) {
  .illustrated-hero .container-hero { padding-top: 96px; }
  .illustrated-hero .hero-kicker { margin: 0 0 10px; }
  .illustrated-hero .hero-name { font-size: clamp(56px, 17vw, 96px); }
  .illustrated-hero .hero-display { font-size: clamp(24px, 6.6vw, 34px); margin: 0; }
  .illustrated-hero .hero-actions { margin-top: 20px; flex-direction: row; justify-content: center; }
  .illustrated-hero .hero-scenery { margin-top: -12vw; }
  .intro-grid { grid-template-columns: 1fr; justify-items: start; }
  .intro-portrait { width: min(240px, 70%); }
  #contact.alpine-contact { padding-top: 64px; }
  .alpine-contact-head { grid-template-columns: 1fr; gap: 30px; }
  .alpine-headline { font-size: clamp(82px, 21vw, 126px); }
  .alpine-invitation > p { font-size: 15px; }
  .alpine-email { font-size: 24px; margin-top: 20px; }
  .alpine-details { margin-top: 32px; grid-template-columns: 1fr; gap: 12px; }
  .alpine-socials { gap: 30px; }
  .alpine-message { max-width: none; }
  .alpine-landscape { margin-top: -14px; }
  .alpine-landscape img { height: 370px; width: 145%; max-width: none; margin-left: -22.5%; object-position: 42% 100%; mask-image: linear-gradient(transparent, #000 23%); }
  .alpine-landscape figcaption { bottom: 25px; }
  .alpine-footer { padding-bottom: 28px; }
  .alpine-footer .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .alpine-footer .footer-links { gap: 0 21px; }
}
@media (prefers-reduced-motion: no-preference) {
  .alpine-contact-head { animation: sky-arrive .7s ease-out both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes sky-arrive { from { opacity: .4; translate: 0 20px; } to { opacity: 1; translate: 0 0; } }
}

/* Tablet and up: show the whole blue-hour scene. The section shares the painting's sky colour, so the
   sky runs up behind the contact details and the peaks start just below them. On very wide screens
   only empty sky is trimmed. 42vw is the height from the bottom of the painting to its tallest peak. */
@media (min-width: 681px) {
  .alpine-landscape {
    --scene-h: min(66.667vw, max(1100px, 47vw));
    margin-top: calc(42vw - var(--scene-h) + 70px);
  }
  .alpine-landscape img { height: var(--scene-h); mask-image: linear-gradient(transparent, #000 12%); }
}
