/* Focor website: the night room's life (the lamp, its light on the rug, the stars, the mist) and the footer's
   opening aperture, shared by every page that ends in the night room (round 18). */
/* The night room comes alive: the lamp's glow breathes very slowly, and a few stars come out one by one in the
   window's sky. Placed by journey.js in the night picture's coordinates; moving only while the night is shown. */
.night-life { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.night-glow { position: absolute; left: var(--lx); top: var(--ly); width: calc(var(--lr) * 14); height: calc(var(--lr) * 14); margin: calc(var(--lr) * -7) 0 0 calc(var(--lr) * -7);
  border-radius: 50%; mix-blend-mode: screen; opacity: 0.7; transform: scale(0.97);
  background: radial-gradient(circle, rgba(255, 196, 128, 0.34) 0%, rgba(255, 178, 102, 0.14) 32%, rgba(255, 170, 90, 0) 68%); }
.night-life.on .night-glow { animation: night-breathe 9s ease-in-out infinite alternate; }
@keyframes night-breathe { from { opacity: 0.5; transform: scale(0.95); } to { opacity: 0.95; transform: scale(1.05); } }
.night-stars i { position: absolute; left: calc(var(--wx) + var(--x) * var(--wr)); top: calc(var(--wy) + var(--y) * var(--wr)); width: calc(var(--s) * 1px); height: calc(var(--s) * 1px);
  border-radius: 50%; background: #f4f1ff; box-shadow: 0 0 6px rgba(220, 225, 255, 0.6); opacity: 0; transition: opacity 2.4s ease; transition-delay: var(--d); }
.night-life.stars-in .night-stars i { opacity: var(--o); }
/* The footer's aperture opens once, like a lens. */
.home-footer.lens-ready .brand svg:first-child g path { transform-box: view-box; transform-origin: 50% 50%; transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease; }
.home-footer.lens-ready:not(.lens-open) .brand svg:first-child g path { transform: rotate(-50deg) scale(0.5); opacity: 0; }
.home-footer.lens-open .brand svg:first-child g path:nth-child(2) { transition-delay: 0.07s; }
.home-footer.lens-open .brand svg:first-child g path:nth-child(3) { transition-delay: 0.14s; }
.home-footer.lens-open .brand svg:first-child g path:nth-child(4) { transition-delay: 0.21s; }
@media (prefers-reduced-motion: reduce) {
  .night-life.on .night-glow { animation: none; }
  .night-stars i { opacity: var(--o); transition: none; }
}

/* The night room, more visibly alive: the lamp's glow and its light on the rug breathe; the stars twinkle once they
   are out; a slow mist drifts across the mountains in the window. Paused whenever the night is not shown. */
.night-life.on .night-glow { animation: night-breathe 6s ease-in-out infinite alternate; }
@keyframes night-breathe { from { opacity: 0.3; transform: scale(0.88); } to { opacity: 1; transform: scale(1.12); } }
.night-floor { position: absolute; left: var(--fx); top: var(--fy); width: var(--fw); height: calc(var(--fw) * 0.32); margin: calc(var(--fw) * -0.16) 0 0 calc(var(--fw) * -0.5);
  border-radius: 50%; mix-blend-mode: screen; opacity: 0.4; background: radial-gradient(closest-side, rgba(255, 186, 112, 0.36), rgba(255, 176, 100, 0.12) 55%, rgba(255, 170, 90, 0)); }
.night-life.on .night-floor { animation: night-floor 6s ease-in-out infinite alternate; }
@keyframes night-floor { from { opacity: 0.25; transform: scale(0.92); } to { opacity: 0.95; transform: scale(1.06); } }
.night-stars i:nth-child(1) { --t: 3.4s; } .night-stars i:nth-child(2) { --t: 4.6s; } .night-stars i:nth-child(3) { --t: 3.9s; }
.night-stars i:nth-child(4) { --t: 5.2s; } .night-stars i:nth-child(5) { --t: 4.2s; } .night-stars i:nth-child(6) { --t: 3.1s; } .night-stars i:nth-child(7) { --t: 4.9s; }
.night-life.stars-in .night-stars i { animation: night-twinkle var(--t) ease-in-out calc(var(--d) + 2.4s) infinite; }
@keyframes night-twinkle { 0%, 100% { opacity: var(--o); transform: scale(1); } 50% { opacity: calc(var(--o) * 0.2); transform: scale(0.7); } }
.night-mist { position: absolute; left: calc(var(--wx) - var(--wr)); top: calc(var(--wy) - var(--wr)); width: calc(var(--wr) * 2); height: calc(var(--wr) * 2); border-radius: 50%; overflow: hidden; }
.night-mist i { position: absolute; top: 46%; left: -40%; width: 90%; height: 20%; border-radius: 50%; filter: blur(18px); opacity: 0.55;
  background: radial-gradient(closest-side, rgba(196, 204, 230, 0.32), rgba(196, 204, 230, 0)); transform: translateX(-20%); }
.night-mist i + i { top: 56%; width: 120%; height: 16%; opacity: 0.45; }
.night-life.on .night-mist i { animation: night-mist 46s linear infinite; }
.night-life.on .night-mist i + i { animation-duration: 64s; animation-delay: -24s; }
@keyframes night-mist { from { transform: translateX(-30%); } to { transform: translateX(160%); } }
.night-life:not(.on) .night-glow, .night-life:not(.on) .night-floor, .night-life:not(.on) .night-mist i, .night-life:not(.on) .night-stars i { animation-play-state: paused; }
/* The aperture opens more noticeably: from a small, turned closed mark to the open lens. */
.home-footer.lens-ready .brand svg:first-child g path { transition: transform 2.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.4s ease; }
.home-footer.lens-ready:not(.lens-open) .brand svg:first-child g path { transform: rotate(-120deg) scale(0.2); opacity: 0; }
.home-footer.lens-open .brand svg:first-child g path:nth-child(2) { transition-delay: 0.12s; }
.home-footer.lens-open .brand svg:first-child g path:nth-child(3) { transition-delay: 0.24s; }
.home-footer.lens-open .brand svg:first-child g path:nth-child(4) { transition-delay: 0.36s; }
@media (prefers-reduced-motion: reduce) {
  .night-life.on .night-glow, .night-life.on .night-floor, .night-life.on .night-mist i, .night-life.stars-in .night-stars i { animation: none; }
}

/* Every page ends in the night room (round 18): the picture runs straight into the dark footer, with no light band,
   and the footer sits on the night as the homepage's does. Product, vision and press keep their closing words; the
   research and legal pages show the room and the footer only. */
.night-end { position: relative; isolation: isolate; overflow: hidden; background: #121416; color: #f3f2ef; }
.night-end > .night-room { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.night-end > .night-life { z-index: -1; opacity: 1; }
.night-end-compact { display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(380px, 64vh, 640px); padding: 0 0 4px; }
.night-end-compact > .night-room { object-position: 50% 58%; }
.night-end > .home-footer { position: relative; width: 90.8%; max-width: none; margin: 0 auto; padding: 25px 0 0; gap: 23px; background: transparent; color: #f3f2ef; border-top: 1px solid rgba(214, 206, 189, 0.27); }
@media (max-width: 760px) {
  .night-end > .home-footer { width: calc(100% - 52px); padding-top: 27px; }
  .night-end-compact { min-height: 420px; }
  .night-end-compact > .night-room { object-position: 65% 58%; }
}

/* The tagline closes the page: "Focor." and "Your place of mind." each on a line of their own. */
.invitation #invitation-title { max-width: none; }
.invitation #invitation-title .nowrap { white-space: nowrap; }
@media (max-width: 760px) { .invitation #invitation-title { font-size: clamp(38px, 11vw, 54px); } }
/* The shorter ending (research and the legal pages): the closing words above the footer, as on the homepage. */
.night-end-compact { min-height: clamp(560px, 92vh, 960px); }
.night-end-compact > .section-inner { width: 100%; padding: 0 4.6%; margin: 0 0 auto; padding-top: clamp(120px, 22vh, 230px); }
@media (max-width: 760px) {
  .night-end-compact { min-height: 640px; }
  .night-end-compact > .section-inner { padding: 120px 26px 0; }
}
/* "place" turns "peace of mind" into the tagline: the site's teal, lightened for the night room (the dark theme's
   teal), and the supporting line keeps each of its lines whole on the desktop. */
.invitation #invitation-title .teal { color: #65b7ab; }
.invitation .invite-copy > p:not(.human) { max-width: none; }
/* The shorter ending takes the homepage's closing type and a full screen, so the night always reaches the menu. */
.night-end-compact { min-height: 100svh; }
.night-end-compact h2 { margin: 0; font: 500 clamp(52px, 5.3vw, 96px)/1.03 'Cormorant Garamond', serif; letter-spacing: -0.025em; color: #f3f2ef; }
@media (max-width: 760px) { .night-end-compact { min-height: 100svh; } }
