/* The site's small pages (privacy, license, built on goose, join, not found), in the landing page's world.
   Loaded after site.css, which gives the fonts, colours, buttons, sky, top bar and footer; this file adds the
   page shell: one calm time of day per page, a header on the sky with one picture melting into it, and the words
   on a warm sheet that stands on the picture's own ground. */

/* ---------- one time of day per page ---------- */
.pg { --s0: #10173A; --s1: #1A2150; --s2: #262C5E; --sm: 60%; --ground: #0F153B; --cloud: #262E66; --haze: .6; }
.pg.t-evening { --s0: #10173A; --s1: #1C2252; --s2: #2E2C66; --sm: 58%; --ground: #0F153B; --cloud: #2E3270; --haze: .55; }
.pg.t-morning { --s0: #8EC5E8; --s1: #C4E0EE; --s2: #FDE8C9; --sm: 60%; --ground: #234A20; --cloud: #FFFFFF; --haze: .6; }
.pg.t-noon { --s0: #4FA6E6; --s1: #93CAF0; --s2: #D5EEFC; --sm: 60%; --ground: #234A20; --cloud: #FFFFFF; --haze: .55; }
.pg.t-afternoon { --s0: #63ACE2; --s1: #B4D6EA; --s2: #F7E6C4; --sm: 62%; --ground: #234A20; --cloud: #FFFAF0; --haze: .58; }
.pg .sky { background: linear-gradient(180deg, var(--s0) 0%, var(--s1) var(--sm), var(--s2) 100%); }
.pg .clouds { color: var(--cloud); opacity: var(--haze); }
.pg .stars, .pg .twinkles { opacity: 0; }
.pg.t-evening .stars, .pg.t-evening .twinkles { opacity: .75; }
/* the sun or the moon, still, high in a corner of the sky */
.pg .sun { transform: translate3d(88vw, 15vh, 0); }
.pg.t-morning .sun { display: none; }
.pg.t-afternoon .sun { transform: translate3d(90vw, 22vh, 0); color: #FFD25E; }
.pg.t-evening .sun { display: none; }
/* on a wide screen the moon stands clear of the sheet's right edge (1040px wide, centred), so it never peeks from behind it */
.pg.t-evening .moon { opacity: 1; transform: translate3d(max(86vw, 50vw + 536px + var(--sun-d) * .43), 17vh, 0); }

/* ---------- the header: the bar, the words in the open sky, the picture under them ---------- */
.pg-head { position: relative; container-type: inline-size; color: var(--fg); }
.pg-head .top { position: relative; z-index: 4; }
.pg-title { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; padding: clamp(44px, 9vh, 112px) var(--pad) 0; text-align: center; }
.pg-title h1 { max-width: 13em; margin-bottom: .32em; font: 400 clamp(46px, 5.9vw, 100px)/.98 var(--display); letter-spacing: -.016em; text-wrap: balance; }
.pg-lede { max-width: 31em; font: 400 clamp(17.5px, 1.45vw, 22px)/1.5 var(--text); text-wrap: balance; }
.pg-lede a { text-decoration-thickness: 1.5px; text-underline-offset: .18em; }

/* The picture: as wide as the window (to a point), its empty top sky under the words and melted into the page's
   own sky. --ar is its aspect ratio, --top the share of its height that rises behind the words. On a phone it is
   shown larger than the screen (--zoom) and cropped round --fx, the part of it that matters. */
.pg-art { --ar: 2; --top: var(--top-d, .3); --zoom: 1; --fx: .5; --w: min(100cqw, 1800px); position: relative; z-index: 1; width: var(--w); height: calc(var(--w) * var(--zoom) / var(--ar)); margin: calc(var(--w) * var(--zoom) / var(--ar) * var(--top) * -1) auto 0; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .3) calc(var(--top) * 45%), rgba(0, 0, 0, .85) calc(var(--top) * 80%), #000 calc(var(--top) * 100%)); mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .3) calc(var(--top) * 45%), rgba(0, 0, 0, .85) calc(var(--top) * 80%), #000 calc(var(--top) * 100%)); }
.pg-art .plate { position: absolute; top: 0; left: calc((var(--zoom) - 1) * var(--w) * var(--fx) * -1); width: calc(var(--w) * var(--zoom)); height: 100%; }
.pg-art img { display: block; width: 100%; height: 100%; }
@media (min-width: 1801px) {
  .pg-art { -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .3) calc(var(--top) * 45%), rgba(0, 0, 0, .85) calc(var(--top) * 80%), #000 calc(var(--top) * 100%)), linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .3) calc(var(--top) * 45%), rgba(0, 0, 0, .85) calc(var(--top) * 80%), #000 calc(var(--top) * 100%)), linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask-composite: intersect; }
}
/* a picture whose own ground runs to its bottom edge (the door, the flowerbed) eases into the plain ground below */
.pg-art.foot-fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; background: linear-gradient(180deg, transparent, var(--ground) 92%); pointer-events: none; }
/* the picture's ground carries on under it, the sheet stands on it, and it ends in a soft hill line */
.pg-ground { position: relative; z-index: 1; height: var(--gh, clamp(40px, 4vw, 72px)); margin-top: -1px; background: var(--ground); }
.pg-ground svg { position: absolute; left: 0; top: calc(100% - 1px); display: block; width: 100%; height: clamp(30px, 3.4vw, 56px); fill: var(--ground); }

/* lit windows and the lantern breathe, gently, as on the landing page */
.pg-art .st-glow { mix-blend-mode: screen; }

/* ---------- the words, on a warm sheet ---------- */
/* the sheet rises from the plain band of ground at the foot of the picture */
.pg-main { position: relative; z-index: 2; margin-top: calc(var(--gh, clamp(40px, 4vw, 72px)) * -1 - min(6.5vw, 116px)); }
/* on the privacy page the sheet is part of the first screen: it rises well into the picture, over the foot of the
   house and the tree, so the words start without a screen of picture before them */
.pg-main-up { margin-top: calc(var(--gh, clamp(40px, 4vw, 72px)) * -1 - min(19vw, 340px)); }
.pg-sheet { max-width: 1040px; margin: 0 auto; padding: clamp(28px, 4.6vw, 68px) clamp(22px, 5.4vw, 84px) clamp(24px, 4.2vw, 60px); border-radius: 18px; background: var(--sheet); color: var(--ink); box-shadow: var(--lift); }
.pg-sheet :focus-visible { outline-color: var(--ink); }
.pg-sheet a { text-decoration-thickness: 1.5px; text-underline-offset: .16em; }
.pg-sheet a:hover { text-decoration-thickness: 2.5px; }
/* each part a row, as in the landing page's questions: its subhead on the left, what it says on the right */
.part-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 10px clamp(24px, 4vw, 56px); padding: clamp(22px, 2.8vw, 34px) 0; border-top: 1px solid var(--rule); }
.part-row:first-child { padding-top: 0; border-top: 0; }
.part-row h2 { font: 400 clamp(25px, 2.15vw, 33px)/1.15 var(--display); letter-spacing: -.008em; text-wrap: balance; }
.part-body { max-width: 36em; font: 400 clamp(17px, 1.3vw, 19px)/1.6 var(--text); color: rgba(20, 32, 58, .88); text-wrap: pretty; }
.part-body p + p, .part-body p + ul, .part-body ul + p, .part-body ul + form { margin-top: .8em; }
.pts li { position: relative; padding-left: 1.15em; }
.pts li + li { margin-top: .62em; }
.pts li::before { content: ""; position: absolute; left: 0; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: #C9A23A; }
.pts b { font-weight: 600; color: var(--ink); }
.sheet-end { margin-top: clamp(4px, 1vw, 12px); padding-top: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--rule); font-size: 16px; color: var(--dim); }

/* one way onward at the foot of a sheet */
/* a page that is only a picture and a line (not found) has no sheet */
.pg-main-empty { margin-top: 0; }
.pg-lost .foot { margin-top: clamp(130px, 18vh, 210px); }
/* its picture is framed, like a page from a picture book, under the line */
.pg-frame { max-width: 900px; margin: clamp(36px, 6vh, 64px) auto 0; padding: clamp(10px, 1.1vw, 16px); border-radius: 20px; background: var(--sheet); box-shadow: var(--lift); }
.pg-frame img { display: block; width: 100%; height: auto; border-radius: 12px; }

/* buttons on the sheet: gold for the one that matters, an ink outline for the rest */
.pg-sheet .btn-sun { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 20px -12px rgba(20, 32, 58, .55); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(20, 32, 58, .4); }
.btn-line:hover { box-shadow: inset 0 0 0 2px var(--ink); }

/* a small form on the sheet (the privacy page's "leave the list") */
.pg-form { margin-top: 1.1em; }
.pg-form label { display: block; margin-bottom: 8px; font: 600 17px/1.3 var(--text); color: var(--ink); }
.pg-form .row { display: flex; gap: 12px; }
.pg-form input { flex: 1 1 auto; min-width: 0; height: 54px; padding: 0 18px; border: 0; border-radius: 13px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(20, 32, 58, .22); font: 500 18px/1 var(--text); }
.pg-form input::placeholder { color: rgba(20, 32, 58, .45); }
.pg-form input:focus-visible { outline: 3px solid #E0B43C; outline-offset: 2px; }
.pg-form input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #B4462F; }
.pg-form .err { margin-top: 10px; font-weight: 600; color: #9C3A25; }
.pg-form .err:empty { display: none; }
.pg-said { margin-top: 1.1em; padding: 22px 24px; border-radius: 14px; background: #FFF4D6; box-shadow: inset 0 0 0 1px rgba(201, 162, 58, .35); }
.pg-said h3 { margin-bottom: .35em; font: 400 clamp(25px, 2.15vw, 32px)/1.15 var(--display); }
.pg-said p + p { margin-top: .5em; }
.pg-said:focus { outline: none; }

/* ---------- the footer stands a little closer on these short pages ---------- */
.pg .foot { margin-top: clamp(130px, 18vh, 210px); }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  /* on a phone the words fill the sky's width, so the picture carries the light */
  .pg .sun, .pg .moon { display: none; }
  .pg-title { padding-top: clamp(34px, 6svh, 60px); }
  .pg-title h1 { font-size: clamp(42px, 12.4vw, 64px); }
  .pg-lede { font-size: 17.5px; line-height: 1.48; text-wrap: pretty; }
  .pg-art { --zoom: var(--zoom-m, 1.8); --top: var(--top-m, .26); }
  .pg-ground { --gh: 40px; }
  .pg-main { margin-top: -78px; }
  .pg-main-up { margin-top: -112px; }
  .pg-main .wrap { width: calc(100% - 2 * var(--pad) * .65); }
  .pg-sheet { border-radius: 14px; padding: 28px 22px 26px; }
  .part-row { grid-template-columns: minmax(0, 1fr); padding: 24px 0; }
  .part-row h2 { font-size: 27px; }
  .part-body { font-size: 17px; }
  .pg-form .row { flex-direction: column; }
  .pg .foot { margin-top: 110px; }
  .pg-frame { margin-top: 28px; padding: 8px; border-radius: 16px; }
  .pg-frame img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 22% 50%; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-art .st-glow { animation: none !important; opacity: .36; }
}
