/* Myrra, mymyrra.com. Fraunces is self-hosted (SIL Open Font License, see /assets/fonts/OFL-Fraunces.txt). */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/fraunces-latin-full-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/fraunces-latin-full-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/fraunces-latin-full-italic.woff2") format("woff2-variations"),
       url("/assets/fonts/fraunces-latin-full-italic.woff2") format("woff2");
}

:root {
  --cream: #F5EFE6;
  --wheat: #C8B89A;
  --wheat-light: #DCCFB8; /* secondary text set directly on the scene */
  --forest: #1A2A1F;
  --moss: #2A3A2E;
  --bark: #3D2A1C;
  --amber: #C88020;      /* never carries text */
  --amber-soft: #E0A56B; /* hover and link underline */
  --p: 0;                /* hero to content, set by scene.js */
  --s: 0;                /* whole page progress, set by scene.js */
  --measure: 36rem;
  --gutter: clamp(16px, 5vw, 48px);
  color-scheme: dark;
}
.is-page { --p: 1; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--forest);
  color: var(--cream);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 0.35vw + 15.8px, 19.5px);
  font-weight: 380;
  line-height: 1.62;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

a { color: inherit; text-decoration: underline; text-decoration-color: rgba(224, 165, 107, .7); text-decoration-thickness: 1px; text-underline-offset: .2em; transition: color .2s, text-decoration-color .2s; }
a:hover { color: var(--amber-soft); text-decoration-color: var(--amber-soft); }
:focus-visible { outline: 2px solid var(--amber-soft); outline-offset: 4px; border-radius: 4px; }

/* ------------------------------------------------------------ the scene */
.scene { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: -1; overflow: hidden; background: var(--forest); }
.scene > div { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; }
.scene-sharp { background-image: url("/assets/img/chalet-landscape.webp"); background-position: 50% 62%; }
.scene > .scene-soft {
  /* the full portrait splash, blurred; as the page goes down, the view goes down from the chalet to its reflection */
  --h: 179.2vw;
  inset: 0 0 auto 0; height: var(--h);
  background-image: url("/assets/img/chalet-portrait-soft.jpg"); background-size: 100% 100%;
  opacity: var(--p);
  transform: translate3d(0, calc(-.263 * var(--h) - var(--s) * (.737 * var(--h) - 100lvh)), 0);
  will-change: transform, opacity;
}
.scene-veil {
  background: linear-gradient(180deg, rgba(22, 30, 24, .40) 0%, rgba(30, 24, 18, .44) 55%, rgba(18, 24, 20, .62) 100%);
  opacity: var(--p);
}
@media (orientation: portrait) {
  .scene-sharp { background-image: url("/assets/img/chalet-portrait.webp"); background-position: 50% 50%; }
  .scene > .scene-soft { inset: 0; height: auto; background-size: cover; background-position: 50% 50%; transform-origin: 50% 100%; transform: scale(calc(1.02 + var(--s) * .8)); }
}
@media (orientation: portrait) and (max-width: 600px) {
  .scene-sharp { background-image: url("/assets/img/chalet-portrait-sm.webp"); }
}

/* ------------------------------------------------------------ hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 320px; }
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
.hero::before, .hero::after { opacity: calc(1 - var(--p)); }
.hero::before { top: 0; height: 22%; background: linear-gradient(180deg, rgba(20, 24, 20, .38), rgba(20, 24, 20, 0)); }
.hero::after { bottom: 0; height: 46%; background: linear-gradient(180deg, rgba(24, 20, 15, 0) 0%, rgba(24, 20, 15, .42) 55%, rgba(22, 26, 21, .78) 100%); }
.wordmark {
  position: absolute; z-index: 1; left: 50%; transform: translateX(-50%);
  bottom: 15%;
  margin: 0;
  font-size: clamp(88px, 10.5vw, 168px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--cream);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
  white-space: nowrap;
  opacity: calc(1 - var(--p) * 1.15);
}
.tagline span { display: inline-block; }
.tagline {
  position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter);
  bottom: calc(15% - 2.6em);
  margin: 0;
  text-align: center;
  font-size: clamp(16px, 1.25vw, 20px);
  font-style: italic;
  font-weight: 340;
  letter-spacing: .01em;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
  opacity: calc(.92 - var(--p) * 1.3);
}
@media (orientation: portrait) {
  /* the app splash, as specified: 16 percent of the screen width, top of the letters at 58 percent */
  .wordmark { top: 58%; bottom: auto; font-size: 16vw; }
  .tagline { top: calc(58% + 16vw * 1.2); bottom: auto; font-size: clamp(14px, 3.9vw, 19px); }
  .hero::after { height: 40%; background: linear-gradient(180deg, rgba(24, 20, 15, 0), rgba(22, 26, 21, .62)); }
}
@media (orientation: landscape) and (max-height: 560px) {
  /* phones held sideways */
  .wordmark { font-size: 24vh; bottom: 20%; }
  .tagline { font-size: 14px; bottom: calc(20% - 2.4em); }
  .cue { display: none; }
}
.lang { font-size: .86rem; letter-spacing: .02em; text-decoration: none; padding: .4em .1em; border-bottom: 1px solid rgba(224, 165, 107, .7); }
.lang-hero { position: absolute; z-index: 2; top: max(16px, env(safe-area-inset-top)); right: calc(var(--gutter) - 14px); padding: .45em 14px; border: 0; border-radius: 999px; background: rgba(22, 28, 22, .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lang-hero:hover { color: var(--cream); background: rgba(22, 28, 22, .6); }

.cue { position: absolute; z-index: 1; left: 50%; bottom: 22px; width: 1px; height: 46px; background: linear-gradient(rgba(245, 239, 230, 0), rgba(245, 239, 230, .7)); opacity: calc(.8 - var(--p) * 2); }

@media (prefers-reduced-motion: no-preference) {
  .wordmark { animation: rise-in 720ms ease-out 150ms both; }
  .tagline { animation: rise-in 900ms ease-out 650ms both; }
  .cue { animation: rise-in 900ms ease-out 1300ms both; }
  @keyframes rise-in { from { opacity: 0; } }
}

/* ------------------------------------------------------------ main flow */
main { position: relative; }
section { padding: clamp(72px, 11vh, 140px) var(--gutter); }

h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; font-weight: 340; font-variation-settings: "SOFT" 100; letter-spacing: -.005em; margin-bottom: .55em; }
.display { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.08; font-weight: 320; font-variation-settings: "SOFT" 100; letter-spacing: -.01em; margin: 0 0 .6em; text-wrap: balance; }
h3 { font-size: 1.12em; line-height: 1.3; font-weight: 520; margin-bottom: .35em; }
.lead { font-size: 1.14em; line-height: 1.55; }
.aside { font-style: italic; color: var(--wheat-light); }

/* intro, centred like a letter opening */
.intro { text-align: center; padding-top: clamp(96px, 16vh, 190px); }
.intro > * { max-width: 34rem; margin-left: auto; margin-right: auto; }
.intro .display { max-width: 15em; }
.intro .lead { max-width: 33rem; }
.intro .aside { margin-top: 1.6em; }

/* learning path, a true sequence */
.learn { max-width: calc(64rem + 2 * var(--gutter)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto 1fr; gap: 0 clamp(32px, 6vw, 96px); align-items: start; }
.learn h2, .learn > .lead { grid-column: 1; }
.learn .path { grid-column: 2; grid-row: 1 / span 2; }
.learn > .lead { color: var(--wheat-light); max-width: 24rem; }
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 5px; top: .75em; bottom: 2.2em; width: 1px; background: linear-gradient(var(--amber), rgba(200, 128, 32, .35)); }
.path li { position: relative; padding-left: 40px; margin-bottom: 2.1em; max-width: var(--measure); }
.path li:last-child { margin-bottom: 0; }
.path li::before { content: ""; position: absolute; left: 0; top: .52em; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(200, 128, 32, .16); }
.path .when { font-style: italic; font-size: 1.3em; line-height: 1.25; margin-bottom: .3em; font-variation-settings: "SOFT" 100; }
.path p:last-child { margin: 0; }

/* features, one glass sheet read as a contents page */
.features { max-width: calc(72rem + 2 * var(--gutter)); margin: 0 auto; }
.sheet {
  background: rgba(26, 42, 31, .5);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  backdrop-filter: blur(20px) saturate(1.1);
  border: 1px solid rgba(245, 239, 230, .12);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 72px);
}
.features h2 { max-width: 16em; margin-bottom: 1.1em; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 80px); }
.feature-list li { padding: 1.35em 0 1.4em; border-top: 1px solid rgba(200, 184, 154, .28); }
.feature-list h3 { position: relative; padding-left: 20px; }
.feature-list h3::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.feature-list p { margin: 0; color: rgba(245, 239, 230, .86); }

/* Weekly Wisdom, the wilderness reading room */
.ww { max-width: calc(72rem + 2 * var(--gutter)); margin: 0 auto; }
.ww .room {
  background: rgba(20, 32, 24, .72);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-radius: 32px;
  padding: clamp(32px, 6vw, 96px) clamp(24px, 6vw, 96px);
  border: 1px solid rgba(200, 184, 154, .16);
}
.ww-name { font-size: clamp(56px, 9vw, 132px); line-height: .95; font-style: italic; font-weight: 300; font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; margin: 0 0 .25em; }
.ww .display { font-size: clamp(26px, 3vw, 40px); color: var(--wheat); font-style: italic; margin-bottom: 1.4em; }
.ww-text { columns: 2 22rem; column-gap: clamp(32px, 5vw, 72px); max-width: 64rem; }
.ww-text p { break-inside: avoid; }
.year-intro { margin-top: 2.2em; color: var(--wheat); }
.year { list-style: none; margin: 1.2em 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; position: relative; }
.year::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: linear-gradient(90deg, var(--amber), rgba(200, 128, 32, .25)); }
.year li { position: relative; padding-top: 30px; }
.year li::before { content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); }
.season { display: block; font-size: .92em; color: var(--wheat); margin-bottom: .2em; }
.promise { display: block; font-size: clamp(21px, 1.9vw, 27px); line-height: 1.25; font-style: italic; font-variation-settings: "SOFT" 100; }
.titles { margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(28px, 4vw, 44px); border-top: 1px solid rgba(200, 184, 154, .22); }
.titles h3 { font-weight: 400; color: var(--wheat); font-size: 1em; margin-bottom: 1em; }
.titles ul { list-style: none; margin: 0; padding: 0; }
.titles li { font-size: clamp(21px, 2.1vw, 30px); line-height: 1.3; font-style: italic; font-weight: 330; margin-bottom: .7em; max-width: 30em; }

/* Rim */
.rim { text-align: center; }
.rim > * { max-width: 36rem; margin-left: auto; margin-right: auto; }
.rim h2 { font-size: clamp(40px, 5vw, 68px); font-style: italic; font-weight: 320; }
.rim .lead { max-width: 34rem; }
.sign { margin: 2.4em auto 0; }
.sign blockquote { margin: 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; font-style: italic; font-weight: 330; font-variation-settings: "SOFT" 100; }
.sign figcaption { margin-top: .6em; font-style: italic; color: var(--cream); font-size: 1.15em; }
.sign figcaption::before { content: ""; display: block; width: 40px; height: 1px; background: var(--amber); margin: 0 auto .9em; }

/* coming soon */
.soon { text-align: center; padding-bottom: clamp(80px, 12vh, 140px); }
.soon h2 { font-size: clamp(30px, 3.6vw, 48px); }
.soon p { max-width: 30rem; margin: 0 auto; color: rgba(245, 239, 230, .9); }

/* footer */
.site-footer { padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom)); text-align: center; font-size: .8rem; line-height: 1.6; color: var(--wheat-light); background: linear-gradient(rgba(18, 24, 20, 0), rgba(18, 24, 20, .6) 40%); }
.site-footer p { max-width: 46rem; margin: 0 auto .8em; }
.site-footer .disclaimer { color: var(--cream); font-size: .9rem; margin-bottom: 1.6em; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4em 1.6em; margin-bottom: 1.4em; font-size: .9rem; }
.site-footer nav a { color: var(--cream); }

/* ------------------------------------------------------------ inner pages */
.page-top { width: 100%; display: flex; justify-content: space-between; align-items: baseline; padding: max(22px, env(safe-area-inset-top)) var(--gutter) 0; max-width: calc(52rem + 2 * var(--gutter)); margin: 0 auto; }
.mark { font-size: 34px; line-height: 1; text-decoration: none; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.mark:hover { color: var(--cream); }
.reading { padding: clamp(28px, 6vh, 64px) var(--gutter) clamp(48px, 8vh, 96px); }
.panel {
  max-width: 52rem; margin: 0 auto;
  background: rgba(26, 42, 31, .74);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 239, 230, .12);
  border-radius: 28px;
  padding: clamp(28px, 6vw, 72px);
}
.panel h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; font-weight: 320; font-variation-settings: "SOFT" 100; margin-bottom: .4em; }
.panel h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 450; font-variation-settings: "SOFT" 50; margin: 1.8em 0 .5em; }
.panel p, .panel li { max-width: 40rem; }
.panel .meta { color: var(--wheat); font-style: italic; }
.panel ul { padding-left: 1.2em; }
.panel ul li { margin-bottom: .55em; }
.panel ul li::marker { color: var(--amber); }
.panel ul.kv { list-style: none; padding: 0; }
.panel ul.kv li { padding-left: 0; }
.panel strong { font-weight: 560; }
.contacts { margin: 1.2em 0 0; }
.contacts dt { color: var(--wheat); font-style: italic; margin-top: 1.4em; }
.contacts dd { margin: .2em 0 0; font-size: 1.15em; }

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 860px) {
  .learn { display: block; }
  .learn > .lead { margin-bottom: 2.2em; }
  .feature-list { grid-template-columns: 1fr; }
  .year { grid-template-columns: 1fr; gap: 0; }
  .year::before { left: 5px; right: auto; top: 6px; bottom: 1.4em; width: 1px; height: auto; background: linear-gradient(var(--amber), rgba(200, 128, 32, .3)); }
  .year li { padding: 0 0 1.3em 34px; }
  .sheet, .ww .room, .panel { border-radius: 22px; }
}
@media (max-width: 480px) {
  .sheet, .ww .room { padding: 28px 20px; }
  .panel { padding: 28px 20px; }
}
@media (prefers-reduced-transparency: reduce) {
  .sheet, .ww .room, .panel { background: rgba(26, 42, 31, .94); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
