OperationFactory / assets /motion-plus.css
Aisnsio's picture
Site in 30 languages (ja + 29 translations), language switcher, per-script fonts (part 2)
8f5c81b verified
Raw History Blame Contribute Delete
15.4 kB
/* ==========================================================================
OPERATION FACTORY — motion layer 2 ("encore").
Additive on top of style.css + motion.js. Every effect is off under
prefers-reduced-motion, and the page is complete without it.
========================================================================== */
/* ---------- 1. page-to-page transitions (cross-document View Transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .55s cubic-bezier(.7, 0, .3, 1) both; }
::view-transition-new(root) { animation: vt-in .75s cubic-bezier(.2, .7, .1, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-2.5vh) scale(.985); filter: blur(6px); } }
@keyframes vt-in { from { clip-path: inset(100% 0 0 0); transform: translateY(4vh); } to { clip-path: inset(0 0 0 0); transform: none; } }
/* gold wipe used when View Transitions are unavailable */
.of-wipe { position: fixed; inset: 0; z-index: 9998; pointer-events: none; background: var(--night, #070605); transform: scaleY(0); transform-origin: bottom; }
.of-wipe::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold-grad); }
.of-wipe.go { transition: transform .5s cubic-bezier(.7, 0, .3, 1); transform: scaleY(1); }
/* ---------- 2. scroll progress hairline ---------- */
.of-progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 9997; pointer-events: none; background: var(--gold-grad); transform-origin: left; transform: scaleX(var(--p, 0)); box-shadow: 0 0 12px rgba(241, 209, 150, .6); }
/* ---------- 3. cursor (desktop) ---------- */
.of-cursor, .of-dot { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; border-radius: 50%; will-change: transform; }
.of-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent-2); }
.of-cursor { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(214, 170, 96, .6); display: grid; place-items: center;
transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s, border-color .35s, opacity .3s; }
.of-cursor span { font: 500 .58rem/1 var(--f-mono); letter-spacing: .18em; color: var(--accent-ink); opacity: 0; transition: opacity .25s; }
.of-cursor.link { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(214, 170, 96, .12); border-color: var(--accent); }
.of-cursor.view { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--accent); border-color: var(--accent); }
.of-cursor.view span { opacity: 1; }
.of-cursor.hide, .of-dot.hide { opacity: 0; }
.of-cursor.press { transform-origin: center; }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: auto; }
/* ---------- 4. per-character headline reveal ---------- */
.of-chars .ch { display: inline-block; opacity: 0; transform: translateY(.7em) rotate(4deg); filter: blur(5px);
transition: opacity .8s var(--ease), transform 1s var(--ease), filter .8s var(--ease); transition-delay: calc(var(--c) * 38ms + var(--d, 0ms)); }
.of-chars .ch.sp { width: .3em; }
.of-chars.go .ch { opacity: 1; transform: none; filter: none; }
/* a gold glint runs across the letters once they have landed */
.page-head .wordmark.of-chars.go .ch, .r-hero h1.of-chars.go .ch { animation: glint 1.3s calc(var(--c) * 55ms + var(--d, 0ms) + 1100ms) ease-in-out both; }
@keyframes glint { 50% { color: var(--accent-2); text-shadow: 0 0 22px rgba(241, 209, 150, .55); } }
/* ---------- 5. buttons: click ripple (the hover sheen lives in style.css) ---------- */
.of-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .35); transform: scale(0); animation: ripple .7s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
/* ---------- 6. image reveals: a gold bar wipes across, then the photo ---------- */
.of-img { position: relative; overflow: hidden; }
.of-img::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--gold-grad); transform: scaleX(0); transform-origin: left; }
.of-img.pre > img, .of-img.pre > video { clip-path: inset(0 100% 0 0); transform: scale(1.18); }
.of-img > img, .of-img > video { transition: clip-path 1.1s .45s cubic-bezier(.7, 0, .2, 1), transform 1.8s .45s var(--ease); }
.of-img.on::after { animation: barwipe 1.1s cubic-bezier(.7, 0, .2, 1) both; }
@keyframes barwipe { 0% { transform: scaleX(0); transform-origin: left; } 45% { transform: scaleX(1); transform-origin: left; } 55% { transform: scaleX(1); transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
/* slow zoom on hover for any revealed photo */
@media (hover: hover) { .of-img:hover > img { transform: scale(1.06); transition: transform 1.4s var(--ease); } }
/* ---------- 7. section eyebrows: decode + drawn rule ---------- */
.eyebrow.of-scr { font-variant-numeric: tabular-nums; }
/* ---------- 8. velocity skew on marquee / rails ---------- */
.marquee .track, [data-drag] { transition: transform .5s var(--ease); }
.marquee { transform: skewX(var(--skew, 0deg)); }
/* ---------- 9. back to top, with a progress ring ---------- */
.of-top { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); z-index: 60; width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0;
background: rgba(22, 18, 14, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--accent); display: grid; place-items: center;
opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: opacity .4s var(--ease), transform .5s var(--ease); }
.of-top.show { opacity: 1; transform: none; pointer-events: auto; }
.of-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.of-top circle { fill: none; stroke-width: 1.5; }
.of-top .trk { stroke: var(--rule); }
.of-top .bar { stroke: var(--accent); stroke-dasharray: 150.8; stroke-dashoffset: calc(150.8 * (1 - var(--p, 0))); }
.of-top i { font-style: normal; font-size: 1.1rem; transition: transform .3s var(--ease); }
.of-top:hover i { transform: translateY(-3px); }
/* phones have a fixed booking bar at the bottom: sit above it */
@media (max-width: 860px) { .of-top { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); width: 44px; height: 44px; } }
/* ---------- 10. ambient: gold glow that breathes behind night bands ---------- */
.band-night { position: relative; overflow-x: clip; }
.band-night::before { content: ""; position: absolute; inset: -10% -10% auto auto; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; pointer-events: none; z-index: 0;
background: radial-gradient(closest-side, rgba(214, 170, 96, .10), transparent); animation: breathe 9s ease-in-out infinite alternate; }
.band-night > * { position: relative; z-index: 1; }
@keyframes breathe { from { transform: translate(0, 0) scale(.9); opacity: .6; } to { transform: translate(-6vw, 8vw) scale(1.15); opacity: 1; } }
/* ---------- 11. footer links: underline that draws itself ---------- */
.foot-bottom nav a { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .45s var(--ease), color .3s; }
.foot-bottom nav a:hover { background-size: 100% 1px; }
@media (prefers-reduced-motion: reduce) {
@view-transition { navigation: none; }
.of-progress, .of-cursor, .of-dot, .of-wipe { display: none !important; }
.of-chars .ch { opacity: 1 !important; transform: none !important; filter: none !important; }
.of-img.pre > img, .of-img.pre > video { clip-path: none !important; transform: none !important; }
.of-img::after, .band-night::before, .of-ripple { display: none; }
.marquee { transform: none !important; }
}
/* ==========================================================================
Language switcher (30 languages) — header pill + full-screen menu
========================================================================== */
button.lang { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid var(--rule-soft); border-radius: 999px; padding: .35rem .75rem .35rem .55rem; color: var(--muted); font: 500 .78rem/1 var(--f-mono); letter-spacing: .1em; cursor: pointer; transition: color .3s, border-color .3s; }
button.lang svg { width: 16px; height: 16px; transition: transform .8s var(--ease); }
button.lang:hover { color: var(--accent); border-color: var(--accent); }
button.lang:hover svg { transform: rotate(180deg); }
dialog.langsw { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7, 6, 5, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--ink); overflow-y: auto; }
dialog.langsw::backdrop { background: transparent; }
dialog.langsw[open] { animation: lsIn .5s var(--ease) both; }
@keyframes lsIn { from { opacity: 0; } }
.langsw-in { width: min(1100px, 100% - 32px); margin: 0 auto; padding: clamp(4.5rem, 10vh, 7rem) 0 4rem; }
.langsw-hd { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 1.6rem; }
.langsw .x { background: none; border: 1px solid var(--rule-soft); color: var(--ink); width: 44px; height: 44px; border-radius: 50%; font-size: 1rem; cursor: pointer; transition: transform .4s var(--ease), border-color .3s; }
.langsw .x:hover { transform: rotate(90deg); border-color: var(--accent); }
.langsw ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .25rem 1.5rem; }
.langsw li { opacity: 0; transform: translateY(14px); }
dialog.langsw[open] li { animation: lsItem .6s var(--ease) forwards; animation-delay: calc(var(--n, 0) * 18ms + 80ms); }
@keyframes lsItem { to { opacity: 1; transform: none; } }
.langsw a { display: flex; align-items: center; justify-content: space-between; padding: .8rem .2rem; border-bottom: 1px solid var(--rule-soft); font-family: var(--f-mincho); font-size: 1.15rem; transition: color .3s, padding .4s var(--ease); }
.langsw a::after { content: "→"; font-family: var(--f-serif); color: var(--accent); opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .4s var(--ease); }
.langsw a:hover { color: var(--accent-2); padding-inline-start: .7rem; }
.langsw a:hover::after { opacity: 1; transform: none; }
.langsw a[aria-current] { color: var(--accent); }
.langsw a[aria-current]::after { content: "✦"; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .langsw li { opacity: 1; transform: none; animation: none !important; } dialog.langsw[open] { animation: none; } }
/* "view in your language?" suggestion (Japanese pages, browser language ≠ ja) */
.lang-toast { position: fixed; z-index: 70; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 88px); transform: translate(-50%, -30px); opacity: 0;
display: flex; align-items: center; gap: .9rem; width: max-content; max-width: calc(100% - 32px); padding: .7rem .7rem .7rem 1.2rem;
background: rgba(22, 18, 14, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--rule); border-radius: 999px; box-shadow: var(--shadow);
transition: transform .7s var(--ease), opacity .5s; font-size: var(--s0); }
.lang-toast.show { transform: translate(-50%, 0); opacity: 1; }
.lang-toast .x { background: none; border: 0; color: var(--muted); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex: none; }
.lang-toast .x:hover { color: var(--ink); }
@media (max-width: 860px) { .lang-toast { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); transform: translate(-50%, 140%); border-radius: 18px; flex-wrap: wrap; justify-content: center; text-align: center; } }
/* ---------- per-language type ----------
The Japanese faces carry full-width Cyrillic/Greek and Japanese glyph shapes for Chinese,
so every other language gets its own stack. Cormorant Garamond (the brand serif) covers
Latin, Vietnamese and Cyrillic; other scripts fall through to good system faces. */
html:not([lang="ja"]) { --f-mincho: "Cormorant Garamond", Georgia, "Noto Serif", "Times New Roman", serif;
--f-jp: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
html:not([lang="ja"]) body { letter-spacing: .005em; line-height: 1.75; }
html:not([lang="ja"]) h1, html:not([lang="ja"]) h2 { letter-spacing: .005em; font-weight: 500; }
html[lang="zh-Hans"] { --f-mincho: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, serif; --f-jp: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
html[lang="zh-Hant"] { --f-mincho: "Songti TC", "Noto Serif TC", "Source Han Serif TC", PMingLiU, serif; --f-jp: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
html[lang="ko"] { --f-mincho: "Nanum Myeongjo", AppleMyungjo, "Noto Serif KR", Batang, serif; --f-jp: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }
html[lang="zh-Hans"] body, html[lang="zh-Hant"] body, html[lang="ko"] body { letter-spacing: .02em; }
html[lang="el"] { --f-mincho: Georgia, "Noto Serif", "Times New Roman", serif; }
html[lang="ar"] { --f-mincho: "Geeza Pro", "Noto Naskh Arabic", "Times New Roman", serif; --f-jp: "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif; }
html[lang="ar"] body, html[lang="ar"] h1, html[lang="ar"] h2 { letter-spacing: 0; }
html[lang="hi"], html[lang="ne"] { --f-mincho: "Kohinoor Devanagari", "Noto Serif Devanagari", "Devanagari Sangam MN", serif; --f-jp: "Kohinoor Devanagari", "Noto Sans Devanagari", sans-serif; }
html[lang="th"] { --f-mincho: "Thonburi", "Noto Serif Thai", serif; --f-jp: "Thonburi", "Noto Sans Thai", Tahoma, sans-serif; }
html[lang="my"] { --f-mincho: "Myanmar Sangam MN", "Noto Serif Myanmar", serif; --f-jp: "Myanmar Sangam MN", "Noto Sans Myanmar", sans-serif; }
html[lang="my"] body, html[lang="th"] body, html[lang="hi"] body, html[lang="ne"] body { line-height: 1.95; }
/* the language list shows each name in its own script */
.langsw a { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; letter-spacing: .01em; }
.langsw a:lang(ja) { font-family: "Shippori Mincho B1", serif; font-size: 1.15rem; }
.langsw a:lang(zh-Hans) { font-family: "Songti SC", "Noto Serif SC", serif; }
.langsw a:lang(zh-Hant) { font-family: "Songti TC", "Noto Serif TC", serif; }
.langsw a:lang(ko) { font-family: AppleMyungjo, "Noto Serif KR", serif; }
.langsw a:lang(el) { font-family: Georgia, serif; }
/* right-to-left (Arabic): mirror the few physical directions the layout relies on */
[dir="rtl"] .link-arrow, [dir="rtl"] .arr, [dir="rtl"] a > span.go, [dir="rtl"] .orb { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .marquee .track { animation-direction: reverse; }
[dir="rtl"] .of-progress { transform-origin: right; }
[dir="rtl"] .of-top { right: auto; left: max(18px, env(safe-area-inset-left, 0px)); }
[dir="rtl"] .page-head .wordmark[dir="ltr"], [dir="rtl"] .r-hero h1[dir="ltr"] { text-align: right; }