/* Version 4 changes for every page, on top of Kevin's version 3 styles (css/focor.css). */

/* The menu: no band or card behind it. Ink, 15 px or more, medium. While content scrolls beneath it, at most a soft,
   edgeless light at the very top. */
body:not(.subpage) .site-head, .subpage .site-head, body.nav-scrolled .site-head, body.nav-scrolled.is-night .site-head {
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent;
}
.site-head::before {
  content: ""; position: absolute; inset: 0 0 -64px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.5s ease;
  background: linear-gradient(180deg, rgba(236, 232, 224, 0.97) 0%, rgba(236, 232, 224, 0.93) 62%, rgba(236, 232, 224, 0) 100%);
}
body.nav-scrolled .site-head::before { opacity: 1; }
body.is-night .site-head::before { background: linear-gradient(180deg, rgba(18, 20, 22, 0.9) 0%, rgba(18, 20, 22, 0.72) 52%, rgba(18, 20, 22, 0) 100%); }
/* On the homepage the journey's room stands still under the menu; the light comes only once Kevin's sections scroll. */
.home.nav-scrolled:not(.past) .site-head::before { opacity: 0; }
.site-nav a, .site-join { font-size: clamp(15px, 1.05vw, 17px); font-weight: 500; color: inherit; }
.site-nav a { opacity: 1; }
@media (max-width: 760px) {
  .site-nav a { font-size: 15px; }
  .site-join { font-size: 14px; }
  /* The phone's menu is two rows high, so its light reaches a little further. */
  .site-head::before { inset: 0 0 -40px; background: linear-gradient(180deg, rgba(236, 232, 224, 0.97) 0%, rgba(236, 232, 224, 0.94) 70%, rgba(236, 232, 224, 0) 100%); }
  body.is-night .site-head::before { background: linear-gradient(180deg, rgba(18, 20, 22, 0.95) 0%, rgba(18, 20, 22, 0.9) 70%, rgba(18, 20, 22, 0) 100%); }
}

/* The closing room fades in from what is above it, rather than starting at a hard line. */
.closing-room { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 150px); mask-image: linear-gradient(to bottom, transparent 0, #000 150px); }

/* Phones: each product screen is a readable crop of its main organism (tap still enlarges the whole screen). */
@media (max-width: 760px) {
  /* Each crop's own shape, known before it loads (Lighthouse, 4 Nov: the page below shifted as they arrived). */
  .product-shot-open img[src*="meeting-"] { aspect-ratio: 878 / 586; }
  .product-shot-open img[src*="person-"] { aspect-ratio: 878 / 758; }
  .product-shot-open img[src*="priorities-"] { aspect-ratio: 1106 / 772; }
}

/* The product page: the room fixed behind, softening as the page scrolls; each product screen rises gently into view. */
.room-behind { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #ece8e0; }
.room-behind img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room-behind .rb-soft { opacity: 0.4; }
.room-behind .rb-veil { position: absolute; inset: 0; background: rgba(236, 232, 224, 1); opacity: 0.5; }

/* Round 2: the marks under the comparison's bars are large enough to read. */
.bar-labels .provider-marks img, .bar-labels .provider-marks svg { width: 24px !important; height: 24px !important; }

/* Round 2: one calm footer on every page. */
.page-footer.calm-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 30px 48px; padding: 80px 0 46px; margin-top: 0; border-top: 1px solid rgba(163, 154, 134, 0.28); }
.calm-footer .cf-brand { display: flex; align-items: center; gap: 22px; }
.calm-footer .cf-tag { font-size: 13px; letter-spacing: 0.02em; opacity: 0.72; }
.calm-footer .footer-links { display: flex; gap: 34px; margin: 0; }
.calm-footer .footer-links a { font-size: 15px; font-weight: 500; text-decoration: none; }
.calm-footer .cf-small { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 12px; opacity: 0.62; }
.calm-footer .cf-small a { text-decoration: none; }
@media (max-width: 760px) {
  .page-footer.calm-footer { grid-template-columns: minmax(0, 1fr); padding: 56px 0 34px; gap: 26px; }
  .calm-footer .cf-brand { flex-direction: column; align-items: flex-start; gap: 12px; }
  .calm-footer .footer-links { flex-wrap: wrap; gap: 14px 26px; }
}

/* Round 9 (Kevin): a lighter, shorter fade behind the menu, so the page reads through it; and the menu follows the
   room into night. --night (0 to 1, set as the room darkens) crossfades a light fade into a fade of the night room's
   own tone, and the menu's ink into light words: never a light band over a dark room. */
.site-head::before, .site-head::after {
  content: ""; position: absolute; top: calc(-1 * (var(--review-height, 0px) + 27px)); left: -5vw; right: -5vw; bottom: -30px;
  z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
}
.site-head::before { background: linear-gradient(180deg, rgba(236, 232, 224, 0.8) 0%, rgba(236, 232, 224, 0.58) 55%, rgba(236, 232, 224, 0) 100%); }
.site-head::after { background: linear-gradient(180deg, rgba(17, 12, 13, 0.74) 0%, rgba(17, 12, 13, 0.5) 55%, rgba(17, 12, 13, 0) 100%); }
.home.is-night .site-head::before { background: linear-gradient(180deg, rgba(236, 232, 224, 0.8) 0%, rgba(236, 232, 224, 0.58) 55%, rgba(236, 232, 224, 0) 100%); }
body.nav-scrolled .site-head::before { opacity: calc(1 - var(--night, 0)); }
body.nav-scrolled .site-head::after { opacity: var(--night, 0); }
.home.nav-scrolled:not(.past) .site-head::before, .home:not(.past) .site-head::after { opacity: 0; }
.home .site-head, .home.is-night .site-head { color: color-mix(in srgb, #f3f2ef calc(var(--night, 0) * 100%), #2b2722); transition: none; }
.home .site-join, .home.is-night .site-join { border-color: color-mix(in srgb, #c8c3b6 calc(var(--night, 0) * 100%), #8d877b); }
@media (max-width: 760px) {
  .site-head::before, .site-head::after { bottom: -22px; }
  .site-head::before, .home.is-night .site-head::before { background: linear-gradient(180deg, rgba(236, 232, 224, 0.84) 0%, rgba(236, 232, 224, 0.66) 62%, rgba(236, 232, 224, 0) 100%); }
  .site-head::after { background: linear-gradient(180deg, rgba(17, 12, 13, 0.8) 0%, rgba(17, 12, 13, 0.6) 62%, rgba(17, 12, 13, 0) 100%); }
}

/* Round 9 (Kevin): the footer is one quiet line, no rule above it: the brand on the left, the small print on the right. */
.page-footer.calm-footer { border-top: 0; grid-template-columns: minmax(0, 1fr) auto; }
#invitation > .home-footer.calm-footer { border-top: 0; }
.calm-footer .cf-small { grid-column: auto; justify-self: end; }
@media (max-width: 760px) {
  .page-footer.calm-footer { grid-template-columns: minmax(0, 1fr); }
  .calm-footer .cf-small { justify-self: start; }
}

/* Go-live pass: the product page's screens and cards arrive as the homepage's cards do (js/arrive.js); the
   placeholders lie on a layer inside each. */
.product-shot, .thinking-scene, .context-note { position: relative; }

/* Go-live pass: the sub-pages' menu over their night room ending blends to night as the homepage's does. */
.subpage .site-head, .subpage.is-night .site-head { color: color-mix(in srgb, #f3f2ef calc(var(--night, 0) * 100%), #2b2722); }
.subpage .site-join, .subpage.is-night .site-join { border-color: color-mix(in srgb, #c8c3b6 calc(var(--night, 0) * 100%), #8d877b); }

/* The tagline (Alejandro's, placed by Kevin): the vision page opens with Focor as a refuge for your attention, in the
   statement's serif, and "Focor. Your place of mind." stands on its own line under it. */
.vision-photo figcaption .vp-statement { font-size: clamp(16px, 1.38vw, 21px); line-height: 1.42; letter-spacing: -0.005em; }
.vision-photo figcaption .vp-sign { margin-top: 1.1em; font-size: clamp(21px, 2.05vw, 30px); line-height: 1.15; color: #2b7a6f; }
@media (max-width: 760px) {
  .vision-photo figcaption .vp-statement { font-size: 18px; }
  .vision-photo figcaption .vp-sign { font-size: 24px; }
}

/* Accessibility (SEO round): the small teal words on the light pages (eyebrows, the product page's terms) are one
   step darker, so they pass AA (4.7 to 4.9:1 on the page and on the cards; the teal itself was 4.0 to 4.2:1). Only the
   teal ones: Research's "Start a conversation" (in .application) keeps its grey. */
.subpage p.eyebrow:not(.application p), .subpage dt { color: #266f64; }

/* Fix round (4 Nov): nothing inside the page can make it wider than the screen (a phone would zoom out over it). */
main.website { overflow-x: clip; }
/* The comparison bars' names, for screen readers only: the visible score counts up, so it is not the name. */
.bar-button .bar-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The partner marks (NVIDIA Inception, C2PA) in a quiet band before the closing room: one line in the display face on the
   left, both marks in the page's ink on the right, framed by hairlines (Kevin, 6-7 Nov). On narrower screens the line sits
   above the marks. The NVIDIA mark must be NVIDIA's own one-colour badge before release. */
.partner-band { padding: 64px 0 72px; }
.partner-band .pb-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 56px;
  border-top: 1px solid var(--pb-hairline, rgba(43, 39, 34, 0.14)); border-bottom: 1px solid var(--pb-hairline, rgba(43, 39, 34, 0.14)); padding-top: 44px; padding-bottom: 44px; }
.partner-band .pb-line { margin: 0; max-width: 20ch; font: 500 clamp(26px, 2.4vw, 38px)/1.12 'Cormorant Garamond', serif; letter-spacing: -0.01em; color: var(--pb-ink, #2b2722); }
.partner-band .pb-marks { display: flex; align-items: center; justify-content: flex-end; margin: 0; padding: 0; list-style: none; }
.partner-band .pb-marks li { padding: 6px 48px; border-left: 1px solid var(--pb-hairline, rgba(43, 39, 34, 0.16)); }
.partner-band .pb-marks li:first-child { border-left: 0; padding-left: 0; }
.partner-band .pb-marks li:last-child { padding-right: 0; }
.partner-band .pb-marks a { display: block; }
.partner-band .pb-mark { display: block; background: var(--pb-ink, #2b2722); opacity: 0.78; transition: opacity 0.25s;
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.partner-band a:hover .pb-mark, .partner-band a:focus-visible .pb-mark { opacity: 1; }
.partner-band .pb-mark-nvidia { --mark: url(../assets/badges/nvidia-inception-badge-one-colour.svg?v=efa7b13aad); height: 66px; aspect-ratio: 500.4288 / 216; }
.partner-band .pb-mark-c2pa { --mark: url(../assets/badges/c2pa-one-colour.svg?v=20d497d0cb); height: 54px; aspect-ratio: 68 / 54; }
@media (max-width: 900px) { .partner-band .pb-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; } .partner-band .pb-marks { justify-content: flex-start; } }
@media (max-width: 760px) { .partner-band { padding: 44px 0 52px; } .partner-band .pb-inner { padding-top: 32px; padding-bottom: 32px; gap: 24px; }
  .partner-band .pb-marks li { padding: 4px 28px; } .partner-band .pb-mark-nvidia { height: 54px; } .partner-band .pb-mark-c2pa { height: 44px; } }
@media (prefers-reduced-motion: reduce) { .partner-band .pb-mark { transition: none; } }
/* On the home page the band sits over the room as it turns to night (js/journey.js sets --night): its line, marks and
   hairlines blend to the night ink with it, as the menu does. The sub-pages' band sits on the page's own ground. */
.home .partner-band { --pb-ink: color-mix(in srgb, #f3f2ef calc(var(--night, 0) * 100%), #2b2722);
  --pb-hairline: color-mix(in srgb, rgba(243, 242, 239, 0.22) calc(var(--night, 0) * 100%), rgba(43, 39, 34, 0.14)); }

/* Press: Find Focor as tiles, icon, name and handle (Kevin, 6 Nov). */
.find-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.find-grid a { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 18px 20px;
  border: 1px solid rgba(43, 39, 34, 0.13); border-radius: 14px; background: rgba(255, 255, 255, 0.34); color: #2b2722; text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.find-grid a:hover, .find-grid a:focus-visible { background: rgba(255, 255, 255, 0.62); border-color: rgba(43, 39, 34, 0.22); transform: translateY(-2px); }
.find-grid svg { grid-row: 1 / span 2; width: 26px; height: 26px; }
.find-grid .fg-name { font-size: 15px; font-weight: 500; }
.find-grid .fg-handle { font-size: 13px; color: #6e665b; }
@media (max-width: 1000px) { .find-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .find-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .find-grid a { transition: none; } .find-grid a:hover, .find-grid a:focus-visible { transform: none; } }

/* Press: the programmes as two large panels in the partners' own colours; NVIDIA's trademark line in the smallest print. */
.pp-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pp-panel { margin: 0; display: grid; grid-template-rows: 1fr auto; min-height: 260px; padding: 28px; border: 1px solid rgba(43, 39, 34, 0.13);
  border-radius: 18px; background: rgba(255, 255, 255, 0.34); }
.pp-panel .pp-logo { display: grid; place-items: center; }
.pp-panel .pp-logo img { height: 88px; width: auto; }
.pp-panel:last-child .pp-logo img { height: 100px; }
.pp-panel figcaption { text-align: center; font-size: 13px; color: #6e665b; }
.boilerplate p.trademark-note { margin: 14px 0 0; font-size: 10px; line-height: 1.5; letter-spacing: 0.01em; color: #8a8276; max-width: none; }
@media (max-width: 760px) { .pp-panels { grid-template-columns: 1fr; } .pp-panel { min-height: 210px; } }

/* The menu over the room (Kevin, 7 Nov: option A of the menu mockups). js/menu.js measures the room and sets
   --wall-shift, --wall-gap and .wall-glass. The menu itself is unchanged: the same words, size and spacing; it moves,
   slowly, as the room does, and comes a little closer together only when that is what it takes to stay clear. */
@media not ((max-width: 760px) or ((max-height: 500px) and (pointer: coarse))) {
  .site-nav { translate: var(--wall-shift, 0px) 0; column-gap: var(--wall-gap, 2.2vw); }
  .site-nav.wall-ready { transition: translate 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), column-gap 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease, margin 0.5s ease,
    -webkit-backdrop-filter 0.5s ease, backdrop-filter 0.5s ease; }
  /* No clean place in this room: the links stay in their place on a small piece of the room's frosted glass (the
     margin takes back exactly the padding, so the words don't move and js/menu.js measures them where they were). */
  .site-nav.wall-glass {
    margin-left: -19px; padding: 0 19px; border-radius: 999px;
    background: color-mix(in srgb, rgba(24, 22, 22, 0.42) calc(var(--night, 0) * 100%), rgba(246, 243, 237, 0.5));
    -webkit-backdrop-filter: blur(16px) saturate(1.08); backdrop-filter: blur(16px) saturate(1.08);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, rgba(255, 255, 255, 0.1) calc(var(--night, 0) * 100%), rgba(255, 255, 255, 0.55)),
      0 1px 2px rgba(43, 39, 34, 0.05), 0 12px 32px -20px rgba(43, 39, 34, 0.45);
  }
}
@media (max-width: 1050px) and (min-width: 761px) { .site-nav { column-gap: var(--wall-gap, 22px); } }

/* Hover (Kevin, 7 Nov). The word you point at keeps its full ink and the others step back. One marker glides from word
   to word, stretching as it travels (js/menu.js): a teal hairline wherever the menu stands on its own (on either side
   of the pillar, and on the page once the room has gone), a lighter lens inside the glass. On the page you are on it
   rests on that page's word, which replaces the old underline. Both turn to night with the menu in the night room. */
@media not ((max-width: 760px) or ((max-height: 500px) and (pointer: coarse))) {
  .site-nav { position: relative; }
  .site-nav > a { position: relative; z-index: 1; transition: opacity 0.45s ease; }
  .site-nav > a[aria-current='page'] { border-bottom-color: transparent; }
  .nav-mark { --ease: cubic-bezier(0.22, 1, 0.36, 1); position: absolute; z-index: 0; top: 0; bottom: 0; left: var(--l, 0px); right: var(--r, 100%);
    pointer-events: none; opacity: 0;
    transition: left 0.6s var(--ease) var(--lag-l, 0s), right 0.6s var(--ease) var(--lag-r, 0s), opacity 0.35s ease, scale 0.5s var(--ease); }
  .nav-mark.still { transition: opacity 0.35s ease, scale 0.5s var(--ease); }
  .nav-mark.on { opacity: 1; }
  .nav-mark::before { content: ''; position: absolute; }

  /* The menu on its own: a teal hairline that draws out from the word's middle. */
  .site-nav:not(.wall-glass) .nav-mark::before { left: 0; right: 0; bottom: 6px; height: 1px; border-radius: 1px;
    background: color-mix(in srgb, #65b7ab calc(var(--night, 0) * 100%), #2b7a6f); scale: 0 1; transition: scale 0.55s var(--ease); }
  .site-nav:not(.wall-glass) .nav-mark.on::before { scale: 1 1; }

  /* In the glass: a lighter lens that springs from word to word, and the glass lifts a little while you are in it. */
  .site-nav.wall-glass .nav-mark { --ease: cubic-bezier(0.34, 1.3, 0.64, 1); scale: 0.9; }
  .site-nav.wall-glass .nav-mark.on { scale: 1; }
  .site-nav.wall-glass:has(> a:active) .nav-mark.on { scale: 0.96; }
  .site-nav.wall-glass .nav-mark::before { inset: 6px -13px; border-radius: 999px;
    background: color-mix(in srgb, rgba(255, 255, 255, 0.14) calc(var(--night, 0) * 100%), rgba(255, 255, 255, 0.7));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, rgba(255, 255, 255, 0.16) calc(var(--night, 0) * 100%), rgba(255, 255, 255, 0.95)),
      0 1px 2px rgba(43, 39, 34, 0.07), 0 6px 14px -8px rgba(43, 39, 34, 0.32); }
}
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .site-nav:has(> a:hover) > a:not(:hover), .site-nav:has(> a:focus-visible) > a:not(:focus-visible) { opacity: 0.45; }
  .site-nav.wall-glass:hover {
    background: color-mix(in srgb, rgba(24, 22, 22, 0.5) calc(var(--night, 0) * 100%), rgba(247, 244, 239, 0.62));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, rgba(255, 255, 255, 0.14) calc(var(--night, 0) * 100%), rgba(255, 255, 255, 0.7)),
      0 1px 2px rgba(43, 39, 34, 0.06), 0 18px 40px -22px rgba(43, 39, 34, 0.55);
  }

  /* Request access: the letters roll up in a wave, left to right, and come back in teal (each letter's twin is its own
     shadow one line below, hidden by the line's edge until it rolls in); a teal line draws over the grey one from the
     left and, on leaving, slips away to the right while the letters roll back. */
  .site-join { --join-teal: color-mix(in srgb, #65b7ab calc(var(--night, 0) * 100%), #2b7a6f); position: relative; }
  .join-roll { --lh: 1.3em; display: inline-flex; vertical-align: top; height: var(--lh); line-height: var(--lh); overflow: hidden; }
  .join-roll > span { display: inline-block; white-space: pre; text-shadow: 0 var(--lh) 0 var(--join-teal);
    transition: translate 0.62s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 18ms); }
  .site-join:hover .join-roll > span, .site-join:focus-visible .join-roll > span { translate: 0 calc(-1 * var(--lh)); }
  .site-join::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--join-teal);
    scale: 0 1; transform-origin: right; transition: scale 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
  .site-join:hover::after, .site-join:focus-visible::after { scale: 1 1; transform-origin: left; }
}
/* The letters are drawing only: a click lands on the link itself (its own text for analytics, its own listeners). */
.join-roll { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .site-nav.wall-ready { transition: none; }
  .nav-mark, .nav-mark::before { transition: opacity 0.2s ease !important; }
  .join-roll > span { transition: none !important; }
  .site-join:hover .join-roll > span, .site-join:focus-visible .join-roll > span { translate: none; color: var(--join-teal); }
  .site-join::after { transition: none; }
}
